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// RenameObjectRequest wrapper for the RenameObject operation
12type RenameObjectRequest 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 sourceName and newName of rename operation.
22	RenameObjectDetails `contributesTo:"body"`
23
24	// The client request ID for tracing.
25	OpcClientRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-client-request-id"`
26
27	// Metadata about the request. This information will not be transmitted to the service, but
28	// represents information that the SDK will consume to drive retry behavior.
29	RequestMetadata common.RequestMetadata
30}
31
32func (request RenameObjectRequest) String() string {
33	return common.PointerString(request)
34}
35
36// HTTPRequest implements the OCIRequest interface
37func (request RenameObjectRequest) HTTPRequest(method, path string) (http.Request, error) {
38	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
39}
40
41// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
42func (request RenameObjectRequest) RetryPolicy() *common.RetryPolicy {
43	return request.RequestMetadata.RetryPolicy
44}
45
46// RenameObjectResponse wrapper for the RenameObject operation
47type RenameObjectResponse struct {
48
49	// The underlying http response
50	RawResponse *http.Response
51
52	// Echoes back the value passed in the opc-client-request-id header, for use by clients when debugging.
53	OpcClientRequestId *string `presentIn:"header" name:"opc-client-request-id"`
54
55	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular
56	// request, provide this request ID.
57	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
58
59	// The entity tag (ETag) for the object.
60	ETag *string `presentIn:"header" name:"etag"`
61
62	// The time the object was modified, as described in RFC 2616 (https://tools.ietf.org/rfc/rfc2616), section 14.29.
63	LastModified *common.SDKTime `presentIn:"header" name:"last-modified"`
64}
65
66func (response RenameObjectResponse) String() string {
67	return common.PointerString(response)
68}
69
70// HTTPResponse implements the OCIResponse interface
71func (response RenameObjectResponse) HTTPResponse() *http.Response {
72	return response.RawResponse
73}
74