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// GetRetentionRuleRequest wrapper for the GetRetentionRule operation 13type GetRetentionRuleRequest 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 ID of the retention rule. 23 RetentionRuleId *string `mandatory:"true" contributesTo:"path" name:"retentionRuleId"` 24 25 // The client request ID for tracing. 26 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 27 28 // Metadata about the request. This information will not be transmitted to the service, but 29 // represents information that the SDK will consume to drive retry behavior. 30 RequestMetadata common.RequestMetadata 31} 32 33func (request GetRetentionRuleRequest) String() string { 34 return common.PointerString(request) 35} 36 37// HTTPRequest implements the OCIRequest interface 38func (request GetRetentionRuleRequest) HTTPRequest(method, path string) (http.Request, error) { 39 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 40} 41 42// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 43func (request GetRetentionRuleRequest) RetryPolicy() *common.RetryPolicy { 44 return request.RequestMetadata.RetryPolicy 45} 46 47// GetRetentionRuleResponse wrapper for the GetRetentionRule operation 48type GetRetentionRuleResponse struct { 49 50 // The underlying http response 51 RawResponse *http.Response 52 53 // The RetentionRule instance 54 RetentionRule `presentIn:"body"` 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 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular 60 // request, provide this request ID. 61 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 62 63 // The entity tag (ETag) for the retention rule. 64 Etag *string `presentIn:"header" name:"etag"` 65 66 // The time the retention rule was last modified, as described in RFC 2616 (https://tools.ietf.org/html/rfc2616#section-14.29) 67 LastModified *common.SDKTime `presentIn:"header" name:"last-modified"` 68} 69 70func (response GetRetentionRuleResponse) String() string { 71 return common.PointerString(response) 72} 73 74// HTTPResponse implements the OCIResponse interface 75func (response GetRetentionRuleResponse) HTTPResponse() *http.Response { 76 return response.RawResponse 77} 78