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// CreateBucketRequest wrapper for the CreateBucket operation
12type CreateBucketRequest struct {
13
14	// The Object Storage namespace used for the request.
15	NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"`
16
17	// Request object for creating a bucket.
18	CreateBucketDetails `contributesTo:"body"`
19
20	// The client request ID for tracing.
21	OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"`
22
23	// Metadata about the request. This information will not be transmitted to the service, but
24	// represents information that the SDK will consume to drive retry behavior.
25	RequestMetadata common.RequestMetadata
26}
27
28func (request CreateBucketRequest) String() string {
29	return common.PointerString(request)
30}
31
32// HTTPRequest implements the OCIRequest interface
33func (request CreateBucketRequest) HTTPRequest(method, path string) (http.Request, error) {
34	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
35}
36
37// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
38func (request CreateBucketRequest) RetryPolicy() *common.RetryPolicy {
39	return request.RequestMetadata.RetryPolicy
40}
41
42// CreateBucketResponse wrapper for the CreateBucket operation
43type CreateBucketResponse struct {
44
45	// The underlying http response
46	RawResponse *http.Response
47
48	// The Bucket instance
49	Bucket `presentIn:"body"`
50
51	// Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging.
52	OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"`
53
54	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular
55	// request, provide this request ID.
56	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
57
58	// The entity tag (ETag) for the bucket that was created.
59	ETag *string `presentIn:"header" name:"etag"`
60
61	// The full path to the bucket that was created.
62	Location *string `presentIn:"header" name:"location"`
63}
64
65func (response CreateBucketResponse) String() string {
66	return common.PointerString(response)
67}
68
69// HTTPResponse implements the OCIResponse interface
70func (response CreateBucketResponse) HTTPResponse() *http.Response {
71	return response.RawResponse
72}
73