1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package core 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// UpdateVolumeBackupPolicyRequest wrapper for the UpdateVolumeBackupPolicy operation 12type UpdateVolumeBackupPolicyRequest struct { 13 14 // The OCID of the volume backup policy. 15 PolicyId *string `mandatory:"true" contributesTo:"path" name:"policyId"` 16 17 // Update volume backup policy fields 18 UpdateVolumeBackupPolicyDetails `contributesTo:"body"` 19 20 // For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` 21 // parameter to the value of the etag from a previous GET or POST response for that resource. The resource 22 // will be updated or deleted only if the etag you provide matches the resource's current etag value. 23 IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"` 24 25 // Unique identifier for the request. 26 // If you need to contact Oracle about a particular request, please provide the request ID. 27 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 28 29 // A token that uniquely identifies a request so it can be retried in case of a timeout or 30 // server error without risk of executing that same action again. Retry tokens expire after 24 31 // hours, but can be invalidated before then due to conflicting operations (for example, if a resource 32 // has been deleted and purged from the system, then a retry of the original creation request 33 // may be rejected). 34 OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` 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 UpdateVolumeBackupPolicyRequest) String() string { 42 return common.PointerString(request) 43} 44 45// HTTPRequest implements the OCIRequest interface 46func (request UpdateVolumeBackupPolicyRequest) 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 UpdateVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { 52 return request.RequestMetadata.RetryPolicy 53} 54 55// UpdateVolumeBackupPolicyResponse wrapper for the UpdateVolumeBackupPolicy operation 56type UpdateVolumeBackupPolicyResponse struct { 57 58 // The underlying http response 59 RawResponse *http.Response 60 61 // The VolumeBackupPolicy instance 62 VolumeBackupPolicy `presentIn:"body"` 63 64 // For optimistic concurrency control. See `if-match`. 65 Etag *string `presentIn:"header" name:"etag"` 66 67 // Unique Oracle-assigned identifier for the request. If you need to contact 68 // Oracle about a particular request, please provide the request ID. 69 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 70} 71 72func (response UpdateVolumeBackupPolicyResponse) String() string { 73 return common.PointerString(response) 74} 75 76// HTTPResponse implements the OCIResponse interface 77func (response UpdateVolumeBackupPolicyResponse) HTTPResponse() *http.Response { 78 return response.RawResponse 79} 80