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