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// PutObjectLifecyclePolicyRequest wrapper for the PutObjectLifecyclePolicy operation 12type PutObjectLifecyclePolicyRequest 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 lifecycle policy to apply to the bucket. 22 PutObjectLifecyclePolicyDetails `contributesTo:"body"` 23 24 // The client request ID for tracing. 25 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 26 27 // The entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. 28 // For uploading a part, this is the entity tag of the target part. 29 IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` 30 31 // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object 32 // already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a 33 // part, this is the entity tag of the target part. 34 IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` 35 36 // Metadata about the request. This information will not be transmitted to the service, but 37 // represents information that the SDK will consume to drive retry behavior. 38 RequestMetadata common.RequestMetadata 39} 40 41func (request PutObjectLifecyclePolicyRequest) String() string { 42 return common.PointerString(request) 43} 44 45// HTTPRequest implements the OCIRequest interface 46func (request PutObjectLifecyclePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { 47 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 48} 49 50// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 51func (request PutObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy { 52 return request.RequestMetadata.RetryPolicy 53} 54 55// PutObjectLifecyclePolicyResponse wrapper for the PutObjectLifecyclePolicy operation 56type PutObjectLifecyclePolicyResponse struct { 57 58 // The underlying http response 59 RawResponse *http.Response 60 61 // The ObjectLifecyclePolicy instance 62 ObjectLifecyclePolicy `presentIn:"body"` 63 64 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 65 // provide this request ID. 66 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 67 68 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 69 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 70 71 // The entity tag (ETag) for the object lifecycle policy. 72 ETag *string `presentIn:"header" name:"etag"` 73} 74 75func (response PutObjectLifecyclePolicyResponse) String() string { 76 return common.PointerString(response) 77} 78 79// HTTPResponse implements the OCIResponse interface 80func (response PutObjectLifecyclePolicyResponse) HTTPResponse() *http.Response { 81 return response.RawResponse 82} 83