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// CreateVolumeBackupPolicyAssignmentRequest wrapper for the CreateVolumeBackupPolicyAssignment operation 12type CreateVolumeBackupPolicyAssignmentRequest struct { 13 14 // Request to assign a specified policy to a particular asset. 15 CreateVolumeBackupPolicyAssignmentDetails `contributesTo:"body"` 16 17 // Unique Oracle-assigned identifier for the request. 18 // If you need to contact Oracle about a particular request, please provide the request ID. 19 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 20 21 // Metadata about the request. This information will not be transmitted to the service, but 22 // represents information that the SDK will consume to drive retry behavior. 23 RequestMetadata common.RequestMetadata 24} 25 26func (request CreateVolumeBackupPolicyAssignmentRequest) String() string { 27 return common.PointerString(request) 28} 29 30// HTTPRequest implements the OCIRequest interface 31func (request CreateVolumeBackupPolicyAssignmentRequest) HTTPRequest(method, path string) (http.Request, error) { 32 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 33} 34 35// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 36func (request CreateVolumeBackupPolicyAssignmentRequest) RetryPolicy() *common.RetryPolicy { 37 return request.RequestMetadata.RetryPolicy 38} 39 40// CreateVolumeBackupPolicyAssignmentResponse wrapper for the CreateVolumeBackupPolicyAssignment operation 41type CreateVolumeBackupPolicyAssignmentResponse struct { 42 43 // The underlying http response 44 RawResponse *http.Response 45 46 // The VolumeBackupPolicyAssignment instance 47 VolumeBackupPolicyAssignment `presentIn:"body"` 48 49 // For optimistic concurrency control. See `if-match`. 50 Etag *string `presentIn:"header" name:"etag"` 51 52 // Unique Oracle-assigned identifier for the request. If you need to contact 53 // Oracle about a particular request, please provide the request ID. 54 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 55} 56 57func (response CreateVolumeBackupPolicyAssignmentResponse) String() string { 58 return common.PointerString(response) 59} 60 61// HTTPResponse implements the OCIResponse interface 62func (response CreateVolumeBackupPolicyAssignmentResponse) HTTPResponse() *http.Response { 63 return response.RawResponse 64} 65