1// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. 2// This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 3// Code generated. DO NOT EDIT. 4 5package core 6 7import ( 8 "github.com/oracle/oci-go-sdk/common" 9 "net/http" 10) 11 12// CreateVolumeBackupPolicyRequest wrapper for the CreateVolumeBackupPolicy operation 13type CreateVolumeBackupPolicyRequest struct { 14 15 // Request to create a new scheduled backup policy. 16 CreateVolumeBackupPolicyDetails `contributesTo:"body"` 17 18 // A token that uniquely identifies a request so it can be retried in case of a timeout or 19 // server error without risk of executing that same action again. Retry tokens expire after 24 20 // hours, but can be invalidated before then due to conflicting operations (for example, if a resource 21 // has been deleted and purged from the system, then a retry of the original creation request 22 // may be rejected). 23 OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` 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 // Metadata about the request. This information will not be transmitted to the service, but 30 // represents information that the SDK will consume to drive retry behavior. 31 RequestMetadata common.RequestMetadata 32} 33 34func (request CreateVolumeBackupPolicyRequest) String() string { 35 return common.PointerString(request) 36} 37 38// HTTPRequest implements the OCIRequest interface 39func (request CreateVolumeBackupPolicyRequest) HTTPRequest(method, path string) (http.Request, error) { 40 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 41} 42 43// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 44func (request CreateVolumeBackupPolicyRequest) RetryPolicy() *common.RetryPolicy { 45 return request.RequestMetadata.RetryPolicy 46} 47 48// CreateVolumeBackupPolicyResponse wrapper for the CreateVolumeBackupPolicy operation 49type CreateVolumeBackupPolicyResponse struct { 50 51 // The underlying http response 52 RawResponse *http.Response 53 54 // The VolumeBackupPolicy instance 55 VolumeBackupPolicy `presentIn:"body"` 56 57 // For optimistic concurrency control. See `if-match`. 58 Etag *string `presentIn:"header" name:"etag"` 59 60 // Unique Oracle-assigned identifier for the request. If you need to contact 61 // Oracle about a particular request, please provide the request ID. 62 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 63} 64 65func (response CreateVolumeBackupPolicyResponse) String() string { 66 return common.PointerString(response) 67} 68 69// HTTPResponse implements the OCIResponse interface 70func (response CreateVolumeBackupPolicyResponse) HTTPResponse() *http.Response { 71 return response.RawResponse 72} 73