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 database
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// RestoreDatabaseRequest wrapper for the RestoreDatabase operation
13type RestoreDatabaseRequest struct {
14
15	// The database OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm).
16	DatabaseId *string `mandatory:"true" contributesTo:"path" name:"databaseId"`
17
18	// Request to perform database restore.
19	RestoreDatabaseDetails `contributesTo:"body"`
20
21	// For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match`
22	// parameter to the value of the etag from a previous GET or POST response for that resource.  The resource
23	// will be updated or deleted only if the etag you provide matches the resource's current etag value.
24	IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
25
26	// Unique Oracle-assigned identifier for the request.
27	// If you need to contact Oracle about a particular request, please provide the request ID.
28	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
29
30	// Metadata about the request. This information will not be transmitted to the service, but
31	// represents information that the SDK will consume to drive retry behavior.
32	RequestMetadata common.RequestMetadata
33}
34
35func (request RestoreDatabaseRequest) String() string {
36	return common.PointerString(request)
37}
38
39// HTTPRequest implements the OCIRequest interface
40func (request RestoreDatabaseRequest) HTTPRequest(method, path string) (http.Request, error) {
41	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
42}
43
44// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
45func (request RestoreDatabaseRequest) RetryPolicy() *common.RetryPolicy {
46	return request.RequestMetadata.RetryPolicy
47}
48
49// RestoreDatabaseResponse wrapper for the RestoreDatabase operation
50type RestoreDatabaseResponse struct {
51
52	// The underlying http response
53	RawResponse *http.Response
54
55	// The Database instance
56	Database `presentIn:"body"`
57
58	// The OCID (https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the work request. Multiple OCID values are returned in a comma-separated list. Use GetWorkRequest with a work request OCID to track the status of the request.
59	OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
60
61	// For optimistic concurrency control. See `if-match`.
62	Etag *string `presentIn:"header" name:"etag"`
63
64	// Unique Oracle-assigned identifier for the request. If you need to contact Oracle about
65	// a particular request, please provide the request ID.
66	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
67}
68
69func (response RestoreDatabaseResponse) String() string {
70	return common.PointerString(response)
71}
72
73// HTTPResponse implements the OCIResponse interface
74func (response RestoreDatabaseResponse) HTTPResponse() *http.Response {
75	return response.RawResponse
76}
77