1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved.
2// Code generated. DO NOT EDIT.
3
4package objectstorage
5
6import (
7	"github.com/oracle/oci-go-sdk/common"
8	"net/http"
9)
10
11// GetObjectLifecyclePolicyRequest wrapper for the GetObjectLifecyclePolicy operation
12type GetObjectLifecyclePolicyRequest struct {
13
14	// The Object Storage namespace used for the request.
15	NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"`
16
17	// The name of the bucket. Avoid entering confidential information.
18	// Example: `my-new-bucket1`
19	BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"`
20
21	// The client request ID for tracing.
22	OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"`
23
24	// Metadata about the request. This information will not be transmitted to the service, but
25	// represents information that the SDK will consume to drive retry behavior.
26	RequestMetadata common.RequestMetadata
27}
28
29func (request GetObjectLifecyclePolicyRequest) String() string {
30	return common.PointerString(request)
31}
32
33// HTTPRequest implements the OCIRequest interface
34func (request GetObjectLifecyclePolicyRequest) HTTPRequest(method, path string) (http.Request, error) {
35	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
36}
37
38// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
39func (request GetObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy {
40	return request.RequestMetadata.RetryPolicy
41}
42
43// GetObjectLifecyclePolicyResponse wrapper for the GetObjectLifecyclePolicy operation
44type GetObjectLifecyclePolicyResponse struct {
45
46	// The underlying http response
47	RawResponse *http.Response
48
49	// The ObjectLifecyclePolicy instance
50	ObjectLifecyclePolicy `presentIn:"body"`
51
52	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request,
53	// provide this request ID.
54	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
55
56	// Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging.
57	OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"`
58
59	// The entity tag (ETag) for the object lifecycle policy.
60	ETag *string `presentIn:"header" name:"etag"`
61}
62
63func (response GetObjectLifecyclePolicyResponse) String() string {
64	return common.PointerString(response)
65}
66
67// HTTPResponse implements the OCIResponse interface
68func (response GetObjectLifecyclePolicyResponse) HTTPResponse() *http.Response {
69	return response.RawResponse
70}
71