1// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. 2// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 3// Code generated. DO NOT EDIT. 4 5package objectstorage 6 7import ( 8 "github.com/oracle/oci-go-sdk/common" 9 "net/http" 10) 11 12// PutObjectLifecyclePolicyRequest wrapper for the PutObjectLifecyclePolicy operation 13type PutObjectLifecyclePolicyRequest struct { 14 15 // The Object Storage namespace used for the request. 16 NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"` 17 18 // The name of the bucket. Avoid entering confidential information. 19 // Example: `my-new-bucket1` 20 BucketName *string `mandatory:"true" contributesTo:"path" name:"bucketName"` 21 22 // The lifecycle policy to apply to the bucket. 23 PutObjectLifecyclePolicyDetails `contributesTo:"body"` 24 25 // The client request ID for tracing. 26 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 27 28 // 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. 29 // For uploading a part, this is the entity tag of the target part. 30 IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` 31 32 // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object 33 // already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a 34 // part, this is the entity tag of the target part. 35 IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` 36 37 // Metadata about the request. This information will not be transmitted to the service, but 38 // represents information that the SDK will consume to drive retry behavior. 39 RequestMetadata common.RequestMetadata 40} 41 42func (request PutObjectLifecyclePolicyRequest) String() string { 43 return common.PointerString(request) 44} 45 46// HTTPRequest implements the OCIRequest interface 47func (request PutObjectLifecyclePolicyRequest) HTTPRequest(method, path string) (http.Request, error) { 48 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 49} 50 51// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 52func (request PutObjectLifecyclePolicyRequest) RetryPolicy() *common.RetryPolicy { 53 return request.RequestMetadata.RetryPolicy 54} 55 56// PutObjectLifecyclePolicyResponse wrapper for the PutObjectLifecyclePolicy operation 57type PutObjectLifecyclePolicyResponse struct { 58 59 // The underlying http response 60 RawResponse *http.Response 61 62 // The ObjectLifecyclePolicy instance 63 ObjectLifecyclePolicy `presentIn:"body"` 64 65 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, 66 // provide this request ID. 67 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 68 69 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 70 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 71 72 // The entity tag (ETag) for the object lifecycle policy. 73 ETag *string `presentIn:"header" name:"etag"` 74} 75 76func (response PutObjectLifecyclePolicyResponse) String() string { 77 return common.PointerString(response) 78} 79 80// HTTPResponse implements the OCIResponse interface 81func (response PutObjectLifecyclePolicyResponse) HTTPResponse() *http.Response { 82 return response.RawResponse 83} 84