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// ChangeInstanceConfigurationCompartmentRequest wrapper for the ChangeInstanceConfigurationCompartment operation
12type ChangeInstanceConfigurationCompartmentRequest struct {
13
14	// The OCID of the instance configuration.
15	InstanceConfigurationId *string `mandatory:"true" contributesTo:"path" name:"instanceConfigurationId"`
16
17	// Request to change the compartment of given instance configuration.
18	ChangeInstanceConfigurationCompartmentDetails `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 ChangeInstanceConfigurationCompartmentRequest) String() string {
42	return common.PointerString(request)
43}
44
45// HTTPRequest implements the OCIRequest interface
46func (request ChangeInstanceConfigurationCompartmentRequest) 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 ChangeInstanceConfigurationCompartmentRequest) RetryPolicy() *common.RetryPolicy {
52	return request.RequestMetadata.RetryPolicy
53}
54
55// ChangeInstanceConfigurationCompartmentResponse wrapper for the ChangeInstanceConfigurationCompartment operation
56type ChangeInstanceConfigurationCompartmentResponse struct {
57
58	// The underlying http response
59	RawResponse *http.Response
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
65	// Oracle about a particular request, please provide the request ID.
66	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
67}
68
69func (response ChangeInstanceConfigurationCompartmentResponse) String() string {
70	return common.PointerString(response)
71}
72
73// HTTPResponse implements the OCIResponse interface
74func (response ChangeInstanceConfigurationCompartmentResponse) HTTPResponse() *http.Response {
75	return response.RawResponse
76}
77