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// CreateMultipartUploadRequest wrapper for the CreateMultipartUpload operation 12type CreateMultipartUploadRequest 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 // Request object for creating a multi-part upload. 22 CreateMultipartUploadDetails `contributesTo:"body"` 23 24 // 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. 25 // For uploading a part, this is the entity tag of the target part. 26 IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` 27 28 // The entity tag (ETag) to avoid matching. The only valid value is '*', which indicates that the request should fail if the object 29 // already exists. For creating and committing a multipart upload, this is the entity tag of the target object. For uploading a 30 // part, this is the entity tag of the target part. 31 IfNoneMatch *string `mandatory:"false" contributesTo:"header" name:"if-none-match"` 32 33 // The client request ID for tracing. 34 OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"` 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 CreateMultipartUploadRequest) String() string { 42 return common.PointerString(request) 43} 44 45// HTTPRequest implements the OCIRequest interface 46func (request CreateMultipartUploadRequest) 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 CreateMultipartUploadRequest) RetryPolicy() *common.RetryPolicy { 52 return request.RequestMetadata.RetryPolicy 53} 54 55// CreateMultipartUploadResponse wrapper for the CreateMultipartUpload operation 56type CreateMultipartUploadResponse struct { 57 58 // The underlying http response 59 RawResponse *http.Response 60 61 // The MultipartUpload instance 62 MultipartUpload `presentIn:"body"` 63 64 // Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging. 65 OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"` 66 67 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular 68 // request, provide this request ID. 69 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 70 71 // The full path to the new upload. 72 Location *string `presentIn:"header" name:"location"` 73} 74 75func (response CreateMultipartUploadResponse) String() string { 76 return common.PointerString(response) 77} 78 79// HTTPResponse implements the OCIResponse interface 80func (response CreateMultipartUploadResponse) HTTPResponse() *http.Response { 81 return response.RawResponse 82} 83