1// Copyright (c) 2016, 2018, 2019, Oracle and/or its affiliates. All rights reserved. 2// Code generated. DO NOT EDIT. 3 4package oce 5 6import ( 7 "github.com/oracle/oci-go-sdk/common" 8 "net/http" 9) 10 11// CreateOceInstanceRequest wrapper for the CreateOceInstance operation 12type CreateOceInstanceRequest struct { 13 14 // Details for the new OceInstance. 15 CreateOceInstanceDetails `contributesTo:"body"` 16 17 // A token that uniquely identifies a request so it can be retried in case of a timeout or 18 // server error without risk of executing that same action again. Retry tokens expire after 24 19 // hours, but can be invalidated before then due to conflicting operations. For example, if a resource 20 // has been deleted and purged from the system, then a retry of the original creation request 21 // might be rejected. 22 OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"` 23 24 // The client request ID for tracing. 25 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 26 27 // Metadata about the request. This information will not be transmitted to the service, but 28 // represents information that the SDK will consume to drive retry behavior. 29 RequestMetadata common.RequestMetadata 30} 31 32func (request CreateOceInstanceRequest) String() string { 33 return common.PointerString(request) 34} 35 36// HTTPRequest implements the OCIRequest interface 37func (request CreateOceInstanceRequest) HTTPRequest(method, path string) (http.Request, error) { 38 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 39} 40 41// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 42func (request CreateOceInstanceRequest) RetryPolicy() *common.RetryPolicy { 43 return request.RequestMetadata.RetryPolicy 44} 45 46// CreateOceInstanceResponse wrapper for the CreateOceInstance operation 47type CreateOceInstanceResponse struct { 48 49 // The underlying http response 50 RawResponse *http.Response 51 52 // Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation. 53 OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"` 54 55 // Unique Oracle-assigned identifier for the request. If 56 // you need to contact Oracle about a particular request, 57 // please provide the request ID. 58 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 59} 60 61func (response CreateOceInstanceResponse) String() string { 62 return common.PointerString(response) 63} 64 65// HTTPResponse implements the OCIResponse interface 66func (response CreateOceInstanceResponse) HTTPResponse() *http.Response { 67 return response.RawResponse 68} 69