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// GetBucketRequest wrapper for the GetBucket operation 12type GetBucketRequest 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 entity tag (ETag) to match. For creating and committing a multipart upload to an object, this is the entity tag of the target object. 22 // For uploading a part, this is the entity tag of the target part. 23 IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` 24 25 // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object 26 // already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a 27 // part, this is the entity tag of the target part. 28 IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` 29 30 // The client request ID for tracing. 31 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 32 33 // Bucket summary includes the 'namespace', 'name', 'compartmentId', 'createdBy', 'timeCreated', 34 // and 'etag' fields. This parameter can also include 'approximateCount' (approximate number of objects) and 'approximateSize' 35 // (total approximate size in bytes of all objects). For example 'approximateCount,approximateSize'. 36 Fields []GetBucketFieldsEnum `contributesTo:"query" name:"fields" omitEmpty:"true" collectionFormat:"csv"` 37 38 // Metadata about the request. This information will not be transmitted to the service, but 39 // represents information that the SDK will consume to drive retry behavior. 40 RequestMetadata common.RequestMetadata 41} 42 43func (request GetBucketRequest) String() string { 44 return common.PointerString(request) 45} 46 47// HTTPRequest implements the OCIRequest interface 48func (request GetBucketRequest) HTTPRequest(method, path string) (http.Request, error) { 49 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 50} 51 52// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 53func (request GetBucketRequest) RetryPolicy() *common.RetryPolicy { 54 return request.RequestMetadata.RetryPolicy 55} 56 57// GetBucketResponse wrapper for the GetBucket operation 58type GetBucketResponse struct { 59 60 // The underlying http response 61 RawResponse *http.Response 62 63 // The Bucket instance 64 Bucket `presentIn:"body"` 65 66 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 67 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 68 69 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular 70 // request, provide this request ID. 71 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 72 73 // The current entity tag (ETag) for the bucket. 74 ETag *string `presentIn:"header" name:"etag"` 75 76 // Flag to indicate whether or not the object was modified. If this is true, 77 // the getter for the object itself will return null. Callers should check this 78 // if they specified one of the request params that might result in a conditional 79 // response (like 'if-match'/'if-none-match'). 80 IsNotModified bool 81} 82 83func (response GetBucketResponse) String() string { 84 return common.PointerString(response) 85} 86 87// HTTPResponse implements the OCIResponse interface 88func (response GetBucketResponse) HTTPResponse() *http.Response { 89 return response.RawResponse 90} 91 92// GetBucketFieldsEnum Enum with underlying type: string 93type GetBucketFieldsEnum string 94 95// Set of constants representing the allowable values for GetBucketFieldsEnum 96const ( 97 GetBucketFieldsApproximatecount GetBucketFieldsEnum = "approximateCount" 98 GetBucketFieldsApproximatesize GetBucketFieldsEnum = "approximateSize" 99) 100 101var mappingGetBucketFields = map[string]GetBucketFieldsEnum{ 102 "approximateCount": GetBucketFieldsApproximatecount, 103 "approximateSize": GetBucketFieldsApproximatesize, 104} 105 106// GetGetBucketFieldsEnumValues Enumerates the set of values for GetBucketFieldsEnum 107func GetGetBucketFieldsEnumValues() []GetBucketFieldsEnum { 108 values := make([]GetBucketFieldsEnum, 0) 109 for _, v := range mappingGetBucketFields { 110 values = append(values, v) 111 } 112 return values 113} 114