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