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// GetOsnRequest wrapper for the GetOsn operation
13type GetOsnRequest struct {
14
15	// Unique service identifier.
16	BlockchainPlatformId *string `mandatory:"true" contributesTo:"path" name:"blockchainPlatformId"`
17
18	// OSN identifier.
19	OsnId *string `mandatory:"true" contributesTo:"path" name:"osnId"`
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 GetOsnRequest) String() string {
30	return common.PointerString(request)
31}
32
33// HTTPRequest implements the OCIRequest interface
34func (request GetOsnRequest) 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 GetOsnRequest) RetryPolicy() *common.RetryPolicy {
40	return request.RequestMetadata.RetryPolicy
41}
42
43// GetOsnResponse wrapper for the GetOsn operation
44type GetOsnResponse struct {
45
46	// The underlying http response
47	RawResponse *http.Response
48
49	// The Osn instance
50	Osn `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 GetOsnResponse) String() string {
61	return common.PointerString(response)
62}
63
64// HTTPResponse implements the OCIResponse interface
65func (response GetOsnResponse) HTTPResponse() *http.Response {
66	return response.RawResponse
67}
68