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 blockchain 6 7import ( 8 "github.com/oracle/oci-go-sdk/common" 9 "net/http" 10) 11 12// GetPeerRequest wrapper for the GetPeer operation 13type GetPeerRequest struct { 14 15 // Unique service identifier. 16 BlockchainPlatformId *string `mandatory:"true" contributesTo:"path" name:"blockchainPlatformId"` 17 18 // Peer identifier. 19 PeerId *string `mandatory:"true" contributesTo:"path" name:"peerId"` 20 21 // The client request ID for tracing. 22 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 23 24 // Metadata about the request. This information will not be transmitted to the service, but 25 // represents information that the SDK will consume to drive retry behavior. 26 RequestMetadata common.RequestMetadata 27} 28 29func (request GetPeerRequest) String() string { 30 return common.PointerString(request) 31} 32 33// HTTPRequest implements the OCIRequest interface 34func (request GetPeerRequest) HTTPRequest(method, path string) (http.Request, error) { 35 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 36} 37 38// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 39func (request GetPeerRequest) RetryPolicy() *common.RetryPolicy { 40 return request.RequestMetadata.RetryPolicy 41} 42 43// GetPeerResponse wrapper for the GetPeer operation 44type GetPeerResponse struct { 45 46 // The underlying http response 47 RawResponse *http.Response 48 49 // The Peer instance 50 Peer `presentIn:"body"` 51 52 // For optimistic concurrency control. See `if-match`. 53 Etag *string `presentIn:"header" name:"etag"` 54 55 // Unique Oracle-assigned identifier for the request. If you need to contact 56 // Oracle about a particular request, please provide the request ID. 57 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 58} 59 60func (response GetPeerResponse) String() string { 61 return common.PointerString(response) 62} 63 64// HTTPResponse implements the OCIResponse interface 65func (response GetPeerResponse) HTTPResponse() *http.Response { 66 return response.RawResponse 67} 68