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// ChangeDrgCompartmentRequest wrapper for the ChangeDrgCompartment operation 13type ChangeDrgCompartmentRequest struct { 14 15 // The OCID of the DRG. 16 DrgId *string `mandatory:"true" contributesTo:"path" name:"drgId"` 17 18 // Request to change the compartment of a DRG. 19 ChangeDrgCompartmentDetails `contributesTo:"body"` 20 21 // Unique identifier for the request. 22 // If you need to contact Oracle about a particular request, please provide the request ID. 23 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 24 25 // A token that uniquely identifies a request so it can be retried in case of a timeout or 26 // server error without risk of executing that same action again. Retry tokens expire after 24 27 // hours, but can be invalidated before then due to conflicting operations (for example, if a resource 28 // has been deleted and purged from the system, then a retry of the original creation request 29 // may be rejected). 30 OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` 31 32 // Metadata about the request. This information will not be transmitted to the service, but 33 // represents information that the SDK will consume to drive retry behavior. 34 RequestMetadata common.RequestMetadata 35} 36 37func (request ChangeDrgCompartmentRequest) String() string { 38 return common.PointerString(request) 39} 40 41// HTTPRequest implements the OCIRequest interface 42func (request ChangeDrgCompartmentRequest) HTTPRequest(method, path string) (http.Request, error) { 43 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 44} 45 46// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 47func (request ChangeDrgCompartmentRequest) RetryPolicy() *common.RetryPolicy { 48 return request.RequestMetadata.RetryPolicy 49} 50 51// ChangeDrgCompartmentResponse wrapper for the ChangeDrgCompartment operation 52type ChangeDrgCompartmentResponse struct { 53 54 // The underlying http response 55 RawResponse *http.Response 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 // The OCID of the work request. Use GetWorkRequest (https://docs.cloud.oracle.com/api/#/en/workrequests/20160918/WorkRequest/GetWorkRequest) 65 // with this ID to track the status of the request. 66 OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` 67} 68 69func (response ChangeDrgCompartmentResponse) String() string { 70 return common.PointerString(response) 71} 72 73// HTTPResponse implements the OCIResponse interface 74func (response ChangeDrgCompartmentResponse) HTTPResponse() *http.Response { 75 return response.RawResponse 76} 77