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// HeadBucketRequest wrapper for the HeadBucket operation 12type HeadBucketRequest 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 // Metadata about the request. This information will not be transmitted to the service, but 34 // represents information that the SDK will consume to drive retry behavior. 35 RequestMetadata common.RequestMetadata 36} 37 38func (request HeadBucketRequest) String() string { 39 return common.PointerString(request) 40} 41 42// HTTPRequest implements the OCIRequest interface 43func (request HeadBucketRequest) HTTPRequest(method, path string) (http.Request, error) { 44 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 45} 46 47// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 48func (request HeadBucketRequest) RetryPolicy() *common.RetryPolicy { 49 return request.RequestMetadata.RetryPolicy 50} 51 52// HeadBucketResponse wrapper for the HeadBucket operation 53type HeadBucketResponse struct { 54 55 // The underlying http response 56 RawResponse *http.Response 57 58 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 59 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 60 61 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular 62 // request, provide this request ID. 63 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 64 65 // The current entity tag (ETag) for the bucket. 66 ETag *string `presentIn:"header" name:"etag"` 67 68 // Flag to indicate whether or not the object was modified. If this is true, 69 // the getter for the object itself will return null. Callers should check this 70 // if they specified one of the request params that might result in a conditional 71 // response (like 'if-match'/'if-none-match'). 72 IsNotModified bool 73} 74 75func (response HeadBucketResponse) String() string { 76 return common.PointerString(response) 77} 78 79// HTTPResponse implements the OCIResponse interface 80func (response HeadBucketResponse) HTTPResponse() *http.Response { 81 return response.RawResponse 82} 83