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// ScaleBlockchainPlatformRequest wrapper for the ScaleBlockchainPlatform operation
13type ScaleBlockchainPlatformRequest struct {
14
15	// Unique service identifier.
16	BlockchainPlatformId *string `mandatory:"true" contributesTo:"path" name:"blockchainPlatformId"`
17
18	// Input payload to scaleout blockchain platform. The payload cannot be empty.
19	ScaleBlockchainPlatformDetails `contributesTo:"body"`
20
21	// For optimistic concurrency control. In the PUT or DELETE call
22	// for a resource, set the `if-match` parameter to the value of the
23	// etag from a previous GET or POST response for that resource.
24	// The resource will be updated or deleted only if the etag you
25	// provide matches the resource's current etag value.
26	IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
27
28	// The client request ID for tracing.
29	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
30
31	// A token that uniquely identifies a request so it can be retried in case of a timeout or
32	// server error without risk of executing that same action again. Retry tokens expire after 24
33	// hours, but can be invalidated before then due to conflicting operations. For example, if a resource
34	// has been deleted and purged from the system, then a retry of the original creation request
35	// might be rejected.
36	OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
37
38	// Metadata about the request. This information will not be transmitted to the service, but
39	// represents information that the SDK will consume to drive retry behavior.
40	RequestMetadata common.RequestMetadata
41}
42
43func (request ScaleBlockchainPlatformRequest) String() string {
44	return common.PointerString(request)
45}
46
47// HTTPRequest implements the OCIRequest interface
48func (request ScaleBlockchainPlatformRequest) HTTPRequest(method, path string) (http.Request, error) {
49	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
50}
51
52// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
53func (request ScaleBlockchainPlatformRequest) RetryPolicy() *common.RetryPolicy {
54	return request.RequestMetadata.RetryPolicy
55}
56
57// ScaleBlockchainPlatformResponse wrapper for the ScaleBlockchainPlatform operation
58type ScaleBlockchainPlatformResponse struct {
59
60	// The underlying http response
61	RawResponse *http.Response
62
63	// Unique Oracle-assigned identifier for the request. If you need to contact
64	// Oracle about a particular request, please provide the request ID.
65	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
66
67	// Unique Oracle-assigned identifier for the asynchronous request. You can use this to query status of the asynchronous operation.
68	OpcWorkRequestId *string `presentIn:"header" name:"opc-work-request-id"`
69}
70
71func (response ScaleBlockchainPlatformResponse) String() string {
72	return common.PointerString(response)
73}
74
75// HTTPResponse implements the OCIResponse interface
76func (response ScaleBlockchainPlatformResponse) HTTPResponse() *http.Response {
77	return response.RawResponse
78}
79