oci-marketplaceprivateoffer 2.86.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +89 -0
- package/NOTICE.txt +1 -0
- package/README.md +22 -0
- package/THIRD_PARTY_LICENSES.txt +576 -0
- package/index.d.ts +25 -0
- package/index.js +48 -0
- package/index.js.map +1 -0
- package/lib/attachment-waiter.d.ts +29 -0
- package/lib/attachment-waiter.js +65 -0
- package/lib/attachment-waiter.js.map +1 -0
- package/lib/client.d.ts +272 -0
- package/lib/client.js +1065 -0
- package/lib/client.js.map +1 -0
- package/lib/model/attachment-collection.d.ts +26 -0
- package/lib/model/attachment-collection.js +61 -0
- package/lib/model/attachment-collection.js.map +1 -0
- package/lib/model/attachment-summary.d.ts +63 -0
- package/lib/model/attachment-summary.js +29 -0
- package/lib/model/attachment-summary.js.map +1 -0
- package/lib/model/attachment.d.ts +100 -0
- package/lib/model/attachment.js +56 -0
- package/lib/model/attachment.js.map +1 -0
- package/lib/model/buyer-information.d.ts +35 -0
- package/lib/model/buyer-information.js +67 -0
- package/lib/model/buyer-information.js.map +1 -0
- package/lib/model/contact.d.ts +33 -0
- package/lib/model/contact.js +29 -0
- package/lib/model/contact.js.map +1 -0
- package/lib/model/create-attachment-details.d.ts +33 -0
- package/lib/model/create-attachment-details.js +29 -0
- package/lib/model/create-attachment-details.js.map +1 -0
- package/lib/model/create-offer-details.d.ts +83 -0
- package/lib/model/create-offer-details.js +85 -0
- package/lib/model/create-offer-details.js.map +1 -0
- package/lib/model/custom-field.d.ts +29 -0
- package/lib/model/custom-field.js +29 -0
- package/lib/model/custom-field.js.map +1 -0
- package/lib/model/index.d.ts +52 -0
- package/lib/model/index.js +75 -0
- package/lib/model/index.js.map +1 -0
- package/lib/model/offer-collection.d.ts +26 -0
- package/lib/model/offer-collection.js +61 -0
- package/lib/model/offer-collection.js.map +1 -0
- package/lib/model/offer-internal-detail.d.ts +30 -0
- package/lib/model/offer-internal-detail.js +61 -0
- package/lib/model/offer-internal-detail.js.map +1 -0
- package/lib/model/offer-summary.d.ts +95 -0
- package/lib/model/offer-summary.js +65 -0
- package/lib/model/offer-summary.js.map +1 -0
- package/lib/model/offer.d.ts +137 -0
- package/lib/model/offer.js +112 -0
- package/lib/model/offer.js.map +1 -0
- package/lib/model/package-type.d.ts +28 -0
- package/lib/model/package-type.js +39 -0
- package/lib/model/package-type.js.map +1 -0
- package/lib/model/pricing.d.ts +41 -0
- package/lib/model/pricing.js +38 -0
- package/lib/model/pricing.js.map +1 -0
- package/lib/model/publisher-summary.d.ts +128 -0
- package/lib/model/publisher-summary.js +63 -0
- package/lib/model/publisher-summary.js.map +1 -0
- package/lib/model/resource-bundle.d.ts +57 -0
- package/lib/model/resource-bundle.js +51 -0
- package/lib/model/resource-bundle.js.map +1 -0
- package/lib/model/seller-information.d.ts +27 -0
- package/lib/model/seller-information.js +67 -0
- package/lib/model/seller-information.js.map +1 -0
- package/lib/model/sort-order.d.ts +23 -0
- package/lib/model/sort-order.js +34 -0
- package/lib/model/sort-order.js.map +1 -0
- package/lib/model/update-offer-details.d.ts +79 -0
- package/lib/model/update-offer-details.js +85 -0
- package/lib/model/update-offer-details.js.map +1 -0
- package/lib/model/upload-data.d.ts +33 -0
- package/lib/model/upload-data.js +29 -0
- package/lib/model/upload-data.js.map +1 -0
- package/lib/offer-waiter.d.ts +29 -0
- package/lib/offer-waiter.js +65 -0
- package/lib/offer-waiter.js.map +1 -0
- package/lib/request/create-attachment-request.d.ts +40 -0
- package/lib/request/create-attachment-request.js +15 -0
- package/lib/request/create-attachment-request.js.map +1 -0
- package/lib/request/create-offer-request.d.ts +36 -0
- package/lib/request/create-offer-request.js +15 -0
- package/lib/request/create-offer-request.js.map +1 -0
- package/lib/request/delete-attachment-request.d.ts +39 -0
- package/lib/request/delete-attachment-request.js +15 -0
- package/lib/request/delete-attachment-request.js.map +1 -0
- package/lib/request/delete-offer-request.d.ts +35 -0
- package/lib/request/delete-offer-request.js +15 -0
- package/lib/request/delete-offer-request.js.map +1 -0
- package/lib/request/get-attachment-content-request.d.ts +30 -0
- package/lib/request/get-attachment-content-request.js +15 -0
- package/lib/request/get-attachment-content-request.js.map +1 -0
- package/lib/request/get-attachment-request.d.ts +30 -0
- package/lib/request/get-attachment-request.js +15 -0
- package/lib/request/get-attachment-request.js.map +1 -0
- package/lib/request/get-offer-internal-detail-request.d.ts +26 -0
- package/lib/request/get-offer-internal-detail-request.js +15 -0
- package/lib/request/get-offer-internal-detail-request.js.map +1 -0
- package/lib/request/get-offer-request.d.ts +26 -0
- package/lib/request/get-offer-request.js +15 -0
- package/lib/request/get-offer-request.js.map +1 -0
- package/lib/request/index.d.ts +34 -0
- package/lib/request/index.js +39 -0
- package/lib/request/index.js.map +1 -0
- package/lib/request/list-attachments-request.d.ts +70 -0
- package/lib/request/list-attachments-request.js +24 -0
- package/lib/request/list-attachments-request.js.map +1 -0
- package/lib/request/list-offers-request.d.ts +66 -0
- package/lib/request/list-offers-request.js +24 -0
- package/lib/request/list-offers-request.js.map +1 -0
- package/lib/request/update-offer-request.d.ts +40 -0
- package/lib/request/update-offer-request.js +15 -0
- package/lib/request/update-offer-request.js.map +1 -0
- package/lib/response/create-attachment-response.d.ts +30 -0
- package/lib/response/create-attachment-response.js +15 -0
- package/lib/response/create-attachment-response.js.map +1 -0
- package/lib/response/create-offer-response.d.ts +30 -0
- package/lib/response/create-offer-response.js +15 -0
- package/lib/response/create-offer-response.js.map +1 -0
- package/lib/response/delete-attachment-response.d.ts +25 -0
- package/lib/response/delete-attachment-response.js +15 -0
- package/lib/response/delete-attachment-response.js.map +1 -0
- package/lib/response/delete-offer-response.d.ts +25 -0
- package/lib/response/delete-offer-response.js +15 -0
- package/lib/response/delete-offer-response.js.map +1 -0
- package/lib/response/get-attachment-content-response.d.ts +26 -0
- package/lib/response/get-attachment-content-response.js +15 -0
- package/lib/response/get-attachment-content-response.js.map +1 -0
- package/lib/response/get-attachment-response.d.ts +30 -0
- package/lib/response/get-attachment-response.js +15 -0
- package/lib/response/get-attachment-response.js.map +1 -0
- package/lib/response/get-offer-internal-detail-response.d.ts +30 -0
- package/lib/response/get-offer-internal-detail-response.js +15 -0
- package/lib/response/get-offer-internal-detail-response.js.map +1 -0
- package/lib/response/get-offer-response.d.ts +30 -0
- package/lib/response/get-offer-response.js +15 -0
- package/lib/response/get-offer-response.js.map +1 -0
- package/lib/response/index.d.ts +34 -0
- package/lib/response/index.js +15 -0
- package/lib/response/index.js.map +1 -0
- package/lib/response/list-attachments-response.d.ts +32 -0
- package/lib/response/list-attachments-response.js +15 -0
- package/lib/response/list-attachments-response.js.map +1 -0
- package/lib/response/list-offers-response.d.ts +32 -0
- package/lib/response/list-offers-response.js +15 -0
- package/lib/response/list-offers-response.js.map +1 -0
- package/lib/response/update-offer-response.d.ts +30 -0
- package/lib/response/update-offer-response.js +15 -0
- package/lib/response/update-offer-response.js.map +1 -0
- package/package.json +29 -0
package/lib/client.js
ADDED
|
@@ -0,0 +1,1065 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* MarketplacePrivateOffer API
|
|
4
|
+
* Use the Marketplace Publisher API to manage the publishing of applications in Oracle Cloud Infrastructure Marketplace.
|
|
5
|
+
* OpenAPI spec version: 20220901
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OracleSDKGenerator.
|
|
9
|
+
* Do not edit the class manually.
|
|
10
|
+
*
|
|
11
|
+
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
|
|
12
|
+
* 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.
|
|
13
|
+
*/
|
|
14
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
|
+
if (k2 === undefined) k2 = k;
|
|
16
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
17
|
+
}) : (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
o[k2] = m[k];
|
|
20
|
+
}));
|
|
21
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
22
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
23
|
+
}) : function(o, v) {
|
|
24
|
+
o["default"] = v;
|
|
25
|
+
});
|
|
26
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
27
|
+
if (mod && mod.__esModule) return mod;
|
|
28
|
+
var result = {};
|
|
29
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
30
|
+
__setModuleDefault(result, mod);
|
|
31
|
+
return result;
|
|
32
|
+
};
|
|
33
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
34
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
35
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
36
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
37
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
38
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
39
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
43
|
+
exports.OfferClient = exports.OfferApiKeys = exports.AttachmentClient = exports.AttachmentApiKeys = void 0;
|
|
44
|
+
const common = require("oci-common");
|
|
45
|
+
const model = __importStar(require("./model"));
|
|
46
|
+
const attachment_waiter_1 = require("./attachment-waiter");
|
|
47
|
+
const offer_waiter_1 = require("./offer-waiter");
|
|
48
|
+
const oci_common_1 = require("oci-common");
|
|
49
|
+
const Breaker = require("opossum");
|
|
50
|
+
// ===============================================
|
|
51
|
+
// This file is autogenerated - Please do not edit
|
|
52
|
+
// ===============================================
|
|
53
|
+
var AttachmentApiKeys;
|
|
54
|
+
(function (AttachmentApiKeys) {
|
|
55
|
+
})(AttachmentApiKeys = exports.AttachmentApiKeys || (exports.AttachmentApiKeys = {}));
|
|
56
|
+
/**
|
|
57
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
58
|
+
*/
|
|
59
|
+
class AttachmentClient {
|
|
60
|
+
constructor(params, clientConfiguration) {
|
|
61
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
62
|
+
this["_endpoint"] = "";
|
|
63
|
+
this["_defaultHeaders"] = {};
|
|
64
|
+
this._circuitBreaker = null;
|
|
65
|
+
this._httpOptions = undefined;
|
|
66
|
+
this._bodyDuplexMode = undefined;
|
|
67
|
+
this.targetService = "Attachment";
|
|
68
|
+
this._regionId = "";
|
|
69
|
+
this._lastSetRegionOrRegionId = "";
|
|
70
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
71
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
72
|
+
: null;
|
|
73
|
+
if (clientConfiguration) {
|
|
74
|
+
this._clientConfiguration = clientConfiguration;
|
|
75
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
76
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
77
|
+
: null;
|
|
78
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
79
|
+
? clientConfiguration.httpOptions
|
|
80
|
+
: undefined;
|
|
81
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
82
|
+
? clientConfiguration.bodyDuplexMode
|
|
83
|
+
: undefined;
|
|
84
|
+
}
|
|
85
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("marketplaceprivateoffer")) {
|
|
86
|
+
let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
|
|
87
|
+
throw errmsg.concat("marketplaceprivateoffer");
|
|
88
|
+
}
|
|
89
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
90
|
+
const specCircuitBreakerEnabled = true;
|
|
91
|
+
if (!this._circuitBreaker &&
|
|
92
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
93
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
94
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
95
|
+
}
|
|
96
|
+
this._httpClient =
|
|
97
|
+
params.httpClient ||
|
|
98
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
99
|
+
if (params.authenticationDetailsProvider &&
|
|
100
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
101
|
+
const provider = params.authenticationDetailsProvider;
|
|
102
|
+
if (provider.getRegion()) {
|
|
103
|
+
this.region = provider.getRegion();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
109
|
+
*/
|
|
110
|
+
get endpoint() {
|
|
111
|
+
return this._endpoint;
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
115
|
+
* @param endpoint The endpoint of the service.
|
|
116
|
+
*/
|
|
117
|
+
set endpoint(endpoint) {
|
|
118
|
+
this._endpoint = endpoint;
|
|
119
|
+
this._endpoint = this._endpoint + "/20220901";
|
|
120
|
+
if (this.logger)
|
|
121
|
+
this.logger.info(`AttachmentClient endpoint set to ${this._endpoint}`);
|
|
122
|
+
}
|
|
123
|
+
get logger() {
|
|
124
|
+
return common.LOG.logger;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
128
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
129
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
130
|
+
*/
|
|
131
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
132
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
133
|
+
if (this.logger)
|
|
134
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
135
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
136
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AttachmentClient.serviceEndpointTemplate, this._region, AttachmentClient.endpointServiceName);
|
|
137
|
+
}
|
|
138
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
139
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AttachmentClient.serviceEndpointTemplate, this._regionId, AttachmentClient.endpointServiceName);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
144
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
145
|
+
* @param region The region of the service.
|
|
146
|
+
*/
|
|
147
|
+
set region(region) {
|
|
148
|
+
this._region = region;
|
|
149
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AttachmentClient.serviceEndpointTemplate, region, AttachmentClient.endpointServiceName);
|
|
150
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
154
|
+
*
|
|
155
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
156
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
157
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
158
|
+
* @param regionId The public region ID.
|
|
159
|
+
*/
|
|
160
|
+
set regionId(regionId) {
|
|
161
|
+
this._regionId = regionId;
|
|
162
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AttachmentClient.serviceEndpointTemplate, regionId, AttachmentClient.endpointServiceName);
|
|
163
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Creates a new AttachmentWaiter for resources for this service.
|
|
167
|
+
*
|
|
168
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
169
|
+
* @return The service waiters.
|
|
170
|
+
*/
|
|
171
|
+
createWaiters(config) {
|
|
172
|
+
this._waiters = new attachment_waiter_1.AttachmentWaiter(this, config);
|
|
173
|
+
return this._waiters;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Gets the waiters available for resources for this service.
|
|
177
|
+
*
|
|
178
|
+
* @return The service waiters.
|
|
179
|
+
*/
|
|
180
|
+
getWaiters() {
|
|
181
|
+
if (this._waiters) {
|
|
182
|
+
return this._waiters;
|
|
183
|
+
}
|
|
184
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
188
|
+
*/
|
|
189
|
+
shutdownCircuitBreaker() {
|
|
190
|
+
if (this._circuitBreaker) {
|
|
191
|
+
this._circuitBreaker.shutdown();
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Close the client once it is no longer needed
|
|
196
|
+
*/
|
|
197
|
+
close() {
|
|
198
|
+
this.shutdownCircuitBreaker();
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Creates a new Attachment.
|
|
202
|
+
*
|
|
203
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
204
|
+
* @param CreateAttachmentRequest
|
|
205
|
+
* @return CreateAttachmentResponse
|
|
206
|
+
* @throws OciError when an error occurs
|
|
207
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/CreateAttachment.ts.html |here} to see how to use CreateAttachment API.
|
|
208
|
+
*/
|
|
209
|
+
createAttachment(createAttachmentRequest) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
if (this.logger)
|
|
212
|
+
this.logger.debug("Calling operation AttachmentClient#createAttachment.");
|
|
213
|
+
const operationName = "createAttachment";
|
|
214
|
+
const apiReferenceLink = "";
|
|
215
|
+
const pathParams = {
|
|
216
|
+
"{offerId}": createAttachmentRequest.offerId
|
|
217
|
+
};
|
|
218
|
+
const queryParams = {};
|
|
219
|
+
let headerParams = {
|
|
220
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
221
|
+
"opc-retry-token": createAttachmentRequest.opcRetryToken,
|
|
222
|
+
"opc-request-id": createAttachmentRequest.opcRequestId
|
|
223
|
+
};
|
|
224
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
225
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAttachmentRequest.retryConfiguration, specRetryConfiguration);
|
|
226
|
+
if (this.logger)
|
|
227
|
+
retrier.logger = this.logger;
|
|
228
|
+
const request = yield oci_common_1.composeRequest({
|
|
229
|
+
baseEndpoint: this._endpoint,
|
|
230
|
+
defaultHeaders: this._defaultHeaders,
|
|
231
|
+
path: "/offers/{offerId}/attachments",
|
|
232
|
+
method: "POST",
|
|
233
|
+
bodyContent: common.ObjectSerializer.serialize(createAttachmentRequest.createAttachmentDetails, "CreateAttachmentDetails", model.CreateAttachmentDetails.getJsonObj),
|
|
234
|
+
pathParams: pathParams,
|
|
235
|
+
headerParams: headerParams,
|
|
236
|
+
queryParams: queryParams
|
|
237
|
+
});
|
|
238
|
+
try {
|
|
239
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
240
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
241
|
+
responseObject: {},
|
|
242
|
+
body: yield response.json(),
|
|
243
|
+
bodyKey: "attachment",
|
|
244
|
+
bodyModel: model.Attachment,
|
|
245
|
+
type: "model.Attachment",
|
|
246
|
+
responseHeaders: [
|
|
247
|
+
{
|
|
248
|
+
value: response.headers.get("etag"),
|
|
249
|
+
key: "etag",
|
|
250
|
+
dataType: "string"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
value: response.headers.get("opc-request-id"),
|
|
254
|
+
key: "opcRequestId",
|
|
255
|
+
dataType: "string"
|
|
256
|
+
}
|
|
257
|
+
]
|
|
258
|
+
});
|
|
259
|
+
return sdkResponse;
|
|
260
|
+
}
|
|
261
|
+
catch (err) {
|
|
262
|
+
throw err;
|
|
263
|
+
}
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Deletes a Attachment resource by identifier
|
|
268
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
269
|
+
* @param DeleteAttachmentRequest
|
|
270
|
+
* @return DeleteAttachmentResponse
|
|
271
|
+
* @throws OciError when an error occurs
|
|
272
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/DeleteAttachment.ts.html |here} to see how to use DeleteAttachment API.
|
|
273
|
+
*/
|
|
274
|
+
deleteAttachment(deleteAttachmentRequest) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
if (this.logger)
|
|
277
|
+
this.logger.debug("Calling operation AttachmentClient#deleteAttachment.");
|
|
278
|
+
const operationName = "deleteAttachment";
|
|
279
|
+
const apiReferenceLink = "";
|
|
280
|
+
const pathParams = {
|
|
281
|
+
"{offerId}": deleteAttachmentRequest.offerId,
|
|
282
|
+
"{attachmentId}": deleteAttachmentRequest.attachmentId
|
|
283
|
+
};
|
|
284
|
+
const queryParams = {};
|
|
285
|
+
let headerParams = {
|
|
286
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
287
|
+
"if-match": deleteAttachmentRequest.ifMatch,
|
|
288
|
+
"opc-request-id": deleteAttachmentRequest.opcRequestId
|
|
289
|
+
};
|
|
290
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
291
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAttachmentRequest.retryConfiguration, specRetryConfiguration);
|
|
292
|
+
if (this.logger)
|
|
293
|
+
retrier.logger = this.logger;
|
|
294
|
+
const request = yield oci_common_1.composeRequest({
|
|
295
|
+
baseEndpoint: this._endpoint,
|
|
296
|
+
defaultHeaders: this._defaultHeaders,
|
|
297
|
+
path: "/offers/{offerId}/attachments/{attachmentId}",
|
|
298
|
+
method: "DELETE",
|
|
299
|
+
pathParams: pathParams,
|
|
300
|
+
headerParams: headerParams,
|
|
301
|
+
queryParams: queryParams
|
|
302
|
+
});
|
|
303
|
+
try {
|
|
304
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
305
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
306
|
+
responseObject: {},
|
|
307
|
+
responseHeaders: [
|
|
308
|
+
{
|
|
309
|
+
value: response.headers.get("opc-work-request-id"),
|
|
310
|
+
key: "opcWorkRequestId",
|
|
311
|
+
dataType: "string"
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
value: response.headers.get("opc-request-id"),
|
|
315
|
+
key: "opcRequestId",
|
|
316
|
+
dataType: "string"
|
|
317
|
+
}
|
|
318
|
+
]
|
|
319
|
+
});
|
|
320
|
+
return sdkResponse;
|
|
321
|
+
}
|
|
322
|
+
catch (err) {
|
|
323
|
+
throw err;
|
|
324
|
+
}
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Gets a Attachment by identifier
|
|
329
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
330
|
+
* @param GetAttachmentRequest
|
|
331
|
+
* @return GetAttachmentResponse
|
|
332
|
+
* @throws OciError when an error occurs
|
|
333
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/GetAttachment.ts.html |here} to see how to use GetAttachment API.
|
|
334
|
+
*/
|
|
335
|
+
getAttachment(getAttachmentRequest) {
|
|
336
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
337
|
+
if (this.logger)
|
|
338
|
+
this.logger.debug("Calling operation AttachmentClient#getAttachment.");
|
|
339
|
+
const operationName = "getAttachment";
|
|
340
|
+
const apiReferenceLink = "";
|
|
341
|
+
const pathParams = {
|
|
342
|
+
"{offerId}": getAttachmentRequest.offerId,
|
|
343
|
+
"{attachmentId}": getAttachmentRequest.attachmentId
|
|
344
|
+
};
|
|
345
|
+
const queryParams = {};
|
|
346
|
+
let headerParams = {
|
|
347
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
348
|
+
"opc-request-id": getAttachmentRequest.opcRequestId
|
|
349
|
+
};
|
|
350
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
351
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAttachmentRequest.retryConfiguration, specRetryConfiguration);
|
|
352
|
+
if (this.logger)
|
|
353
|
+
retrier.logger = this.logger;
|
|
354
|
+
const request = yield oci_common_1.composeRequest({
|
|
355
|
+
baseEndpoint: this._endpoint,
|
|
356
|
+
defaultHeaders: this._defaultHeaders,
|
|
357
|
+
path: "/offers/{offerId}/attachments/{attachmentId}",
|
|
358
|
+
method: "GET",
|
|
359
|
+
pathParams: pathParams,
|
|
360
|
+
headerParams: headerParams,
|
|
361
|
+
queryParams: queryParams
|
|
362
|
+
});
|
|
363
|
+
try {
|
|
364
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
365
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
366
|
+
responseObject: {},
|
|
367
|
+
body: yield response.json(),
|
|
368
|
+
bodyKey: "attachment",
|
|
369
|
+
bodyModel: model.Attachment,
|
|
370
|
+
type: "model.Attachment",
|
|
371
|
+
responseHeaders: [
|
|
372
|
+
{
|
|
373
|
+
value: response.headers.get("etag"),
|
|
374
|
+
key: "etag",
|
|
375
|
+
dataType: "string"
|
|
376
|
+
},
|
|
377
|
+
{
|
|
378
|
+
value: response.headers.get("opc-request-id"),
|
|
379
|
+
key: "opcRequestId",
|
|
380
|
+
dataType: "string"
|
|
381
|
+
}
|
|
382
|
+
]
|
|
383
|
+
});
|
|
384
|
+
return sdkResponse;
|
|
385
|
+
}
|
|
386
|
+
catch (err) {
|
|
387
|
+
throw err;
|
|
388
|
+
}
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
/**
|
|
392
|
+
* Gets a Attachment content by identifier
|
|
393
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
394
|
+
* @param GetAttachmentContentRequest
|
|
395
|
+
* @return GetAttachmentContentResponse
|
|
396
|
+
* @throws OciError when an error occurs
|
|
397
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/GetAttachmentContent.ts.html |here} to see how to use GetAttachmentContent API.
|
|
398
|
+
*/
|
|
399
|
+
getAttachmentContent(getAttachmentContentRequest) {
|
|
400
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
401
|
+
if (this.logger)
|
|
402
|
+
this.logger.debug("Calling operation AttachmentClient#getAttachmentContent.");
|
|
403
|
+
const operationName = "getAttachmentContent";
|
|
404
|
+
const apiReferenceLink = "";
|
|
405
|
+
const pathParams = {
|
|
406
|
+
"{offerId}": getAttachmentContentRequest.offerId,
|
|
407
|
+
"{attachmentId}": getAttachmentContentRequest.attachmentId
|
|
408
|
+
};
|
|
409
|
+
const queryParams = {};
|
|
410
|
+
let headerParams = {
|
|
411
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
412
|
+
"opc-request-id": getAttachmentContentRequest.opcRequestId
|
|
413
|
+
};
|
|
414
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
415
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAttachmentContentRequest.retryConfiguration, specRetryConfiguration);
|
|
416
|
+
if (this.logger)
|
|
417
|
+
retrier.logger = this.logger;
|
|
418
|
+
const request = yield oci_common_1.composeRequest({
|
|
419
|
+
baseEndpoint: this._endpoint,
|
|
420
|
+
defaultHeaders: this._defaultHeaders,
|
|
421
|
+
path: "/offers/{offerId}/attachments/{attachmentId}/content",
|
|
422
|
+
method: "GET",
|
|
423
|
+
pathParams: pathParams,
|
|
424
|
+
headerParams: headerParams,
|
|
425
|
+
queryParams: queryParams
|
|
426
|
+
});
|
|
427
|
+
try {
|
|
428
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
429
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
430
|
+
responseObject: {},
|
|
431
|
+
body: response.body,
|
|
432
|
+
bodyKey: "value",
|
|
433
|
+
bodyModel: "string",
|
|
434
|
+
responseHeaders: [
|
|
435
|
+
{
|
|
436
|
+
value: response.headers.get("opc-request-id"),
|
|
437
|
+
key: "opcRequestId",
|
|
438
|
+
dataType: "string"
|
|
439
|
+
}
|
|
440
|
+
]
|
|
441
|
+
});
|
|
442
|
+
return sdkResponse;
|
|
443
|
+
}
|
|
444
|
+
catch (err) {
|
|
445
|
+
throw err;
|
|
446
|
+
}
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Returns a list of Attachments. Requires either the BuyerCompartmentId or the SellerCompartmentId params. If neither or both are provided, then the API will return a 400.
|
|
451
|
+
*
|
|
452
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
453
|
+
* @param ListAttachmentsRequest
|
|
454
|
+
* @return ListAttachmentsResponse
|
|
455
|
+
* @throws OciError when an error occurs
|
|
456
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/ListAttachments.ts.html |here} to see how to use ListAttachments API.
|
|
457
|
+
*/
|
|
458
|
+
listAttachments(listAttachmentsRequest) {
|
|
459
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
460
|
+
if (this.logger)
|
|
461
|
+
this.logger.debug("Calling operation AttachmentClient#listAttachments.");
|
|
462
|
+
const operationName = "listAttachments";
|
|
463
|
+
const apiReferenceLink = "";
|
|
464
|
+
const pathParams = {
|
|
465
|
+
"{offerId}": listAttachmentsRequest.offerId
|
|
466
|
+
};
|
|
467
|
+
const queryParams = {
|
|
468
|
+
"buyerCompartmentId": listAttachmentsRequest.buyerCompartmentId,
|
|
469
|
+
"sellerCompartmentId": listAttachmentsRequest.sellerCompartmentId,
|
|
470
|
+
"lifecycleState": listAttachmentsRequest.lifecycleState,
|
|
471
|
+
"displayName": listAttachmentsRequest.displayName,
|
|
472
|
+
"id": listAttachmentsRequest.id,
|
|
473
|
+
"limit": listAttachmentsRequest.limit,
|
|
474
|
+
"page": listAttachmentsRequest.page,
|
|
475
|
+
"sortOrder": listAttachmentsRequest.sortOrder,
|
|
476
|
+
"sortBy": listAttachmentsRequest.sortBy
|
|
477
|
+
};
|
|
478
|
+
let headerParams = {
|
|
479
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
480
|
+
"opc-request-id": listAttachmentsRequest.opcRequestId
|
|
481
|
+
};
|
|
482
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
483
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAttachmentsRequest.retryConfiguration, specRetryConfiguration);
|
|
484
|
+
if (this.logger)
|
|
485
|
+
retrier.logger = this.logger;
|
|
486
|
+
const request = yield oci_common_1.composeRequest({
|
|
487
|
+
baseEndpoint: this._endpoint,
|
|
488
|
+
defaultHeaders: this._defaultHeaders,
|
|
489
|
+
path: "/offers/{offerId}/attachments",
|
|
490
|
+
method: "GET",
|
|
491
|
+
pathParams: pathParams,
|
|
492
|
+
headerParams: headerParams,
|
|
493
|
+
queryParams: queryParams
|
|
494
|
+
});
|
|
495
|
+
try {
|
|
496
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
497
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
498
|
+
responseObject: {},
|
|
499
|
+
body: yield response.json(),
|
|
500
|
+
bodyKey: "attachmentCollection",
|
|
501
|
+
bodyModel: model.AttachmentCollection,
|
|
502
|
+
type: "model.AttachmentCollection",
|
|
503
|
+
responseHeaders: [
|
|
504
|
+
{
|
|
505
|
+
value: response.headers.get("opc-request-id"),
|
|
506
|
+
key: "opcRequestId",
|
|
507
|
+
dataType: "string"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
value: response.headers.get("opc-next-page"),
|
|
511
|
+
key: "opcNextPage",
|
|
512
|
+
dataType: "string"
|
|
513
|
+
}
|
|
514
|
+
]
|
|
515
|
+
});
|
|
516
|
+
return sdkResponse;
|
|
517
|
+
}
|
|
518
|
+
catch (err) {
|
|
519
|
+
throw err;
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
exports.AttachmentClient = AttachmentClient;
|
|
525
|
+
AttachmentClient.serviceEndpointTemplate = "https://private-offer.{region}.oci.{secondLevelDomain}";
|
|
526
|
+
AttachmentClient.endpointServiceName = "";
|
|
527
|
+
var OfferApiKeys;
|
|
528
|
+
(function (OfferApiKeys) {
|
|
529
|
+
})(OfferApiKeys = exports.OfferApiKeys || (exports.OfferApiKeys = {}));
|
|
530
|
+
/**
|
|
531
|
+
* This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
|
|
532
|
+
*/
|
|
533
|
+
class OfferClient {
|
|
534
|
+
constructor(params, clientConfiguration) {
|
|
535
|
+
this["_realmSpecificEndpointTemplateEnabled"] = undefined;
|
|
536
|
+
this["_endpoint"] = "";
|
|
537
|
+
this["_defaultHeaders"] = {};
|
|
538
|
+
this._circuitBreaker = null;
|
|
539
|
+
this._httpOptions = undefined;
|
|
540
|
+
this._bodyDuplexMode = undefined;
|
|
541
|
+
this.targetService = "Offer";
|
|
542
|
+
this._regionId = "";
|
|
543
|
+
this._lastSetRegionOrRegionId = "";
|
|
544
|
+
const requestSigner = params.authenticationDetailsProvider
|
|
545
|
+
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
546
|
+
: null;
|
|
547
|
+
if (clientConfiguration) {
|
|
548
|
+
this._clientConfiguration = clientConfiguration;
|
|
549
|
+
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
550
|
+
? clientConfiguration.circuitBreaker.circuit
|
|
551
|
+
: null;
|
|
552
|
+
this._httpOptions = clientConfiguration.httpOptions
|
|
553
|
+
? clientConfiguration.httpOptions
|
|
554
|
+
: undefined;
|
|
555
|
+
this._bodyDuplexMode = clientConfiguration.bodyDuplexMode
|
|
556
|
+
? clientConfiguration.bodyDuplexMode
|
|
557
|
+
: undefined;
|
|
558
|
+
}
|
|
559
|
+
if (!oci_common_1.developerToolConfiguration.isServiceEnabled("marketplaceprivateoffer")) {
|
|
560
|
+
let errmsg = "The developerToolConfiguration configuration disabled this service, this behavior is controlled by developerToolConfiguration.ociEnabledServiceSet variable. Please check if your local developer_tool_configuration file has configured the service you're targeting or contact the cloud provider on the availability of this service : ";
|
|
561
|
+
throw errmsg.concat("marketplaceprivateoffer");
|
|
562
|
+
}
|
|
563
|
+
// if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
|
|
564
|
+
const specCircuitBreakerEnabled = true;
|
|
565
|
+
if (!this._circuitBreaker &&
|
|
566
|
+
common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
|
|
567
|
+
(specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
|
|
568
|
+
this._circuitBreaker = new common.CircuitBreaker().circuit;
|
|
569
|
+
}
|
|
570
|
+
this._httpClient =
|
|
571
|
+
params.httpClient ||
|
|
572
|
+
new common.FetchHttpClient(requestSigner, this._circuitBreaker, this._httpOptions, this._bodyDuplexMode);
|
|
573
|
+
if (params.authenticationDetailsProvider &&
|
|
574
|
+
common.isRegionProvider(params.authenticationDetailsProvider)) {
|
|
575
|
+
const provider = params.authenticationDetailsProvider;
|
|
576
|
+
if (provider.getRegion()) {
|
|
577
|
+
this.region = provider.getRegion();
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
583
|
+
*/
|
|
584
|
+
get endpoint() {
|
|
585
|
+
return this._endpoint;
|
|
586
|
+
}
|
|
587
|
+
/**
|
|
588
|
+
* Sets the endpoint to call (ex, https://www.example.com).
|
|
589
|
+
* @param endpoint The endpoint of the service.
|
|
590
|
+
*/
|
|
591
|
+
set endpoint(endpoint) {
|
|
592
|
+
this._endpoint = endpoint;
|
|
593
|
+
this._endpoint = this._endpoint + "/20220901";
|
|
594
|
+
if (this.logger)
|
|
595
|
+
this.logger.info(`OfferClient endpoint set to ${this._endpoint}`);
|
|
596
|
+
}
|
|
597
|
+
get logger() {
|
|
598
|
+
return common.LOG.logger;
|
|
599
|
+
}
|
|
600
|
+
/**
|
|
601
|
+
* Determines whether realm specific endpoint should be used or not.
|
|
602
|
+
* Set realmSpecificEndpointTemplateEnabled to "true" if the user wants to enable use of realm specific endpoint template, otherwise set it to "false"
|
|
603
|
+
* @param realmSpecificEndpointTemplateEnabled flag to enable the use of realm specific endpoint template
|
|
604
|
+
*/
|
|
605
|
+
set useRealmSpecificEndpointTemplate(realmSpecificEndpointTemplateEnabled) {
|
|
606
|
+
this._realmSpecificEndpointTemplateEnabled = realmSpecificEndpointTemplateEnabled;
|
|
607
|
+
if (this.logger)
|
|
608
|
+
this.logger.info(`realmSpecificEndpointTemplateEnabled set to ${this._realmSpecificEndpointTemplateEnabled}`);
|
|
609
|
+
if (this._lastSetRegionOrRegionId === common.Region.REGION_STRING) {
|
|
610
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OfferClient.serviceEndpointTemplate, this._region, OfferClient.endpointServiceName);
|
|
611
|
+
}
|
|
612
|
+
else if (this._lastSetRegionOrRegionId === common.Region.REGION_ID_STRING) {
|
|
613
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OfferClient.serviceEndpointTemplate, this._regionId, OfferClient.endpointServiceName);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
/**
|
|
617
|
+
* Sets the region to call (ex, Region.US_PHOENIX_1).
|
|
618
|
+
* Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
|
|
619
|
+
* @param region The region of the service.
|
|
620
|
+
*/
|
|
621
|
+
set region(region) {
|
|
622
|
+
this._region = region;
|
|
623
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegion(OfferClient.serviceEndpointTemplate, region, OfferClient.endpointServiceName);
|
|
624
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_STRING;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* Sets the regionId to call (ex, 'us-phoenix-1').
|
|
628
|
+
*
|
|
629
|
+
* Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
|
|
630
|
+
* If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
|
|
631
|
+
* and then call {@link #endpoint(String) endpoint}.
|
|
632
|
+
* @param regionId The public region ID.
|
|
633
|
+
*/
|
|
634
|
+
set regionId(regionId) {
|
|
635
|
+
this._regionId = regionId;
|
|
636
|
+
this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(OfferClient.serviceEndpointTemplate, regionId, OfferClient.endpointServiceName);
|
|
637
|
+
this._lastSetRegionOrRegionId = common.Region.REGION_ID_STRING;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Creates a new OfferWaiter for resources for this service.
|
|
641
|
+
*
|
|
642
|
+
* @param config The waiter configuration for termination and delay strategy
|
|
643
|
+
* @return The service waiters.
|
|
644
|
+
*/
|
|
645
|
+
createWaiters(config) {
|
|
646
|
+
this._waiters = new offer_waiter_1.OfferWaiter(this, config);
|
|
647
|
+
return this._waiters;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Gets the waiters available for resources for this service.
|
|
651
|
+
*
|
|
652
|
+
* @return The service waiters.
|
|
653
|
+
*/
|
|
654
|
+
getWaiters() {
|
|
655
|
+
if (this._waiters) {
|
|
656
|
+
return this._waiters;
|
|
657
|
+
}
|
|
658
|
+
throw Error("Waiters do not exist. Please create waiters.");
|
|
659
|
+
}
|
|
660
|
+
/**
|
|
661
|
+
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
662
|
+
*/
|
|
663
|
+
shutdownCircuitBreaker() {
|
|
664
|
+
if (this._circuitBreaker) {
|
|
665
|
+
this._circuitBreaker.shutdown();
|
|
666
|
+
}
|
|
667
|
+
}
|
|
668
|
+
/**
|
|
669
|
+
* Close the client once it is no longer needed
|
|
670
|
+
*/
|
|
671
|
+
close() {
|
|
672
|
+
this.shutdownCircuitBreaker();
|
|
673
|
+
}
|
|
674
|
+
/**
|
|
675
|
+
* Creates a new Offer.
|
|
676
|
+
*
|
|
677
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
678
|
+
* @param CreateOfferRequest
|
|
679
|
+
* @return CreateOfferResponse
|
|
680
|
+
* @throws OciError when an error occurs
|
|
681
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/CreateOffer.ts.html |here} to see how to use CreateOffer API.
|
|
682
|
+
*/
|
|
683
|
+
createOffer(createOfferRequest) {
|
|
684
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
685
|
+
if (this.logger)
|
|
686
|
+
this.logger.debug("Calling operation OfferClient#createOffer.");
|
|
687
|
+
const operationName = "createOffer";
|
|
688
|
+
const apiReferenceLink = "";
|
|
689
|
+
const pathParams = {};
|
|
690
|
+
const queryParams = {};
|
|
691
|
+
let headerParams = {
|
|
692
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
693
|
+
"opc-retry-token": createOfferRequest.opcRetryToken,
|
|
694
|
+
"opc-request-id": createOfferRequest.opcRequestId
|
|
695
|
+
};
|
|
696
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
697
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createOfferRequest.retryConfiguration, specRetryConfiguration);
|
|
698
|
+
if (this.logger)
|
|
699
|
+
retrier.logger = this.logger;
|
|
700
|
+
const request = yield oci_common_1.composeRequest({
|
|
701
|
+
baseEndpoint: this._endpoint,
|
|
702
|
+
defaultHeaders: this._defaultHeaders,
|
|
703
|
+
path: "/offers",
|
|
704
|
+
method: "POST",
|
|
705
|
+
bodyContent: common.ObjectSerializer.serialize(createOfferRequest.createOfferDetails, "CreateOfferDetails", model.CreateOfferDetails.getJsonObj),
|
|
706
|
+
pathParams: pathParams,
|
|
707
|
+
headerParams: headerParams,
|
|
708
|
+
queryParams: queryParams
|
|
709
|
+
});
|
|
710
|
+
try {
|
|
711
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
712
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
713
|
+
responseObject: {},
|
|
714
|
+
body: yield response.json(),
|
|
715
|
+
bodyKey: "offer",
|
|
716
|
+
bodyModel: model.Offer,
|
|
717
|
+
type: "model.Offer",
|
|
718
|
+
responseHeaders: [
|
|
719
|
+
{
|
|
720
|
+
value: response.headers.get("opc-request-id"),
|
|
721
|
+
key: "opcRequestId",
|
|
722
|
+
dataType: "string"
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
value: response.headers.get("etag"),
|
|
726
|
+
key: "etag",
|
|
727
|
+
dataType: "string"
|
|
728
|
+
}
|
|
729
|
+
]
|
|
730
|
+
});
|
|
731
|
+
return sdkResponse;
|
|
732
|
+
}
|
|
733
|
+
catch (err) {
|
|
734
|
+
throw err;
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
}
|
|
738
|
+
/**
|
|
739
|
+
* Deletes an Offer resource by identifier
|
|
740
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
741
|
+
* @param DeleteOfferRequest
|
|
742
|
+
* @return DeleteOfferResponse
|
|
743
|
+
* @throws OciError when an error occurs
|
|
744
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/DeleteOffer.ts.html |here} to see how to use DeleteOffer API.
|
|
745
|
+
*/
|
|
746
|
+
deleteOffer(deleteOfferRequest) {
|
|
747
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
748
|
+
if (this.logger)
|
|
749
|
+
this.logger.debug("Calling operation OfferClient#deleteOffer.");
|
|
750
|
+
const operationName = "deleteOffer";
|
|
751
|
+
const apiReferenceLink = "";
|
|
752
|
+
const pathParams = {
|
|
753
|
+
"{offerId}": deleteOfferRequest.offerId
|
|
754
|
+
};
|
|
755
|
+
const queryParams = {};
|
|
756
|
+
let headerParams = {
|
|
757
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
758
|
+
"if-match": deleteOfferRequest.ifMatch,
|
|
759
|
+
"opc-request-id": deleteOfferRequest.opcRequestId
|
|
760
|
+
};
|
|
761
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
762
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteOfferRequest.retryConfiguration, specRetryConfiguration);
|
|
763
|
+
if (this.logger)
|
|
764
|
+
retrier.logger = this.logger;
|
|
765
|
+
const request = yield oci_common_1.composeRequest({
|
|
766
|
+
baseEndpoint: this._endpoint,
|
|
767
|
+
defaultHeaders: this._defaultHeaders,
|
|
768
|
+
path: "/offers/{offerId}",
|
|
769
|
+
method: "DELETE",
|
|
770
|
+
pathParams: pathParams,
|
|
771
|
+
headerParams: headerParams,
|
|
772
|
+
queryParams: queryParams
|
|
773
|
+
});
|
|
774
|
+
try {
|
|
775
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
776
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
777
|
+
responseObject: {},
|
|
778
|
+
responseHeaders: [
|
|
779
|
+
{
|
|
780
|
+
value: response.headers.get("opc-work-request-id"),
|
|
781
|
+
key: "opcWorkRequestId",
|
|
782
|
+
dataType: "string"
|
|
783
|
+
},
|
|
784
|
+
{
|
|
785
|
+
value: response.headers.get("opc-request-id"),
|
|
786
|
+
key: "opcRequestId",
|
|
787
|
+
dataType: "string"
|
|
788
|
+
}
|
|
789
|
+
]
|
|
790
|
+
});
|
|
791
|
+
return sdkResponse;
|
|
792
|
+
}
|
|
793
|
+
catch (err) {
|
|
794
|
+
throw err;
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* Gets an Offer by identifier
|
|
800
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
801
|
+
* @param GetOfferRequest
|
|
802
|
+
* @return GetOfferResponse
|
|
803
|
+
* @throws OciError when an error occurs
|
|
804
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/GetOffer.ts.html |here} to see how to use GetOffer API.
|
|
805
|
+
*/
|
|
806
|
+
getOffer(getOfferRequest) {
|
|
807
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
808
|
+
if (this.logger)
|
|
809
|
+
this.logger.debug("Calling operation OfferClient#getOffer.");
|
|
810
|
+
const operationName = "getOffer";
|
|
811
|
+
const apiReferenceLink = "";
|
|
812
|
+
const pathParams = {
|
|
813
|
+
"{offerId}": getOfferRequest.offerId
|
|
814
|
+
};
|
|
815
|
+
const queryParams = {};
|
|
816
|
+
let headerParams = {
|
|
817
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
818
|
+
"opc-request-id": getOfferRequest.opcRequestId
|
|
819
|
+
};
|
|
820
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
821
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOfferRequest.retryConfiguration, specRetryConfiguration);
|
|
822
|
+
if (this.logger)
|
|
823
|
+
retrier.logger = this.logger;
|
|
824
|
+
const request = yield oci_common_1.composeRequest({
|
|
825
|
+
baseEndpoint: this._endpoint,
|
|
826
|
+
defaultHeaders: this._defaultHeaders,
|
|
827
|
+
path: "/offers/{offerId}",
|
|
828
|
+
method: "GET",
|
|
829
|
+
pathParams: pathParams,
|
|
830
|
+
headerParams: headerParams,
|
|
831
|
+
queryParams: queryParams
|
|
832
|
+
});
|
|
833
|
+
try {
|
|
834
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
835
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
836
|
+
responseObject: {},
|
|
837
|
+
body: yield response.json(),
|
|
838
|
+
bodyKey: "offer",
|
|
839
|
+
bodyModel: model.Offer,
|
|
840
|
+
type: "model.Offer",
|
|
841
|
+
responseHeaders: [
|
|
842
|
+
{
|
|
843
|
+
value: response.headers.get("etag"),
|
|
844
|
+
key: "etag",
|
|
845
|
+
dataType: "string"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
value: response.headers.get("opc-request-id"),
|
|
849
|
+
key: "opcRequestId",
|
|
850
|
+
dataType: "string"
|
|
851
|
+
}
|
|
852
|
+
]
|
|
853
|
+
});
|
|
854
|
+
return sdkResponse;
|
|
855
|
+
}
|
|
856
|
+
catch (err) {
|
|
857
|
+
throw err;
|
|
858
|
+
}
|
|
859
|
+
});
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Gets an Offer internal details by identifier
|
|
863
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
864
|
+
* @param GetOfferInternalDetailRequest
|
|
865
|
+
* @return GetOfferInternalDetailResponse
|
|
866
|
+
* @throws OciError when an error occurs
|
|
867
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/GetOfferInternalDetail.ts.html |here} to see how to use GetOfferInternalDetail API.
|
|
868
|
+
*/
|
|
869
|
+
getOfferInternalDetail(getOfferInternalDetailRequest) {
|
|
870
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
871
|
+
if (this.logger)
|
|
872
|
+
this.logger.debug("Calling operation OfferClient#getOfferInternalDetail.");
|
|
873
|
+
const operationName = "getOfferInternalDetail";
|
|
874
|
+
const apiReferenceLink = "";
|
|
875
|
+
const pathParams = {
|
|
876
|
+
"{offerId}": getOfferInternalDetailRequest.offerId
|
|
877
|
+
};
|
|
878
|
+
const queryParams = {};
|
|
879
|
+
let headerParams = {
|
|
880
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
881
|
+
"opc-request-id": getOfferInternalDetailRequest.opcRequestId
|
|
882
|
+
};
|
|
883
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
884
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getOfferInternalDetailRequest.retryConfiguration, specRetryConfiguration);
|
|
885
|
+
if (this.logger)
|
|
886
|
+
retrier.logger = this.logger;
|
|
887
|
+
const request = yield oci_common_1.composeRequest({
|
|
888
|
+
baseEndpoint: this._endpoint,
|
|
889
|
+
defaultHeaders: this._defaultHeaders,
|
|
890
|
+
path: "/offers/{offerId}/internalDetails",
|
|
891
|
+
method: "GET",
|
|
892
|
+
pathParams: pathParams,
|
|
893
|
+
headerParams: headerParams,
|
|
894
|
+
queryParams: queryParams
|
|
895
|
+
});
|
|
896
|
+
try {
|
|
897
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
898
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
899
|
+
responseObject: {},
|
|
900
|
+
body: yield response.json(),
|
|
901
|
+
bodyKey: "offerInternalDetail",
|
|
902
|
+
bodyModel: model.OfferInternalDetail,
|
|
903
|
+
type: "model.OfferInternalDetail",
|
|
904
|
+
responseHeaders: [
|
|
905
|
+
{
|
|
906
|
+
value: response.headers.get("etag"),
|
|
907
|
+
key: "etag",
|
|
908
|
+
dataType: "string"
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
value: response.headers.get("opc-request-id"),
|
|
912
|
+
key: "opcRequestId",
|
|
913
|
+
dataType: "string"
|
|
914
|
+
}
|
|
915
|
+
]
|
|
916
|
+
});
|
|
917
|
+
return sdkResponse;
|
|
918
|
+
}
|
|
919
|
+
catch (err) {
|
|
920
|
+
throw err;
|
|
921
|
+
}
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
/**
|
|
925
|
+
* Returns a list of Offers. Requires either the BuyerCompartmentId or the SellerCompartmentId params. If neither or both are provided, then the API will return a 400.
|
|
926
|
+
*
|
|
927
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
928
|
+
* @param ListOffersRequest
|
|
929
|
+
* @return ListOffersResponse
|
|
930
|
+
* @throws OciError when an error occurs
|
|
931
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/ListOffers.ts.html |here} to see how to use ListOffers API.
|
|
932
|
+
*/
|
|
933
|
+
listOffers(listOffersRequest) {
|
|
934
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
935
|
+
if (this.logger)
|
|
936
|
+
this.logger.debug("Calling operation OfferClient#listOffers.");
|
|
937
|
+
const operationName = "listOffers";
|
|
938
|
+
const apiReferenceLink = "";
|
|
939
|
+
const pathParams = {};
|
|
940
|
+
const queryParams = {
|
|
941
|
+
"buyerCompartmentId": listOffersRequest.buyerCompartmentId,
|
|
942
|
+
"sellerCompartmentId": listOffersRequest.sellerCompartmentId,
|
|
943
|
+
"lifecycleState": listOffersRequest.lifecycleState,
|
|
944
|
+
"displayName": listOffersRequest.displayName,
|
|
945
|
+
"id": listOffersRequest.id,
|
|
946
|
+
"limit": listOffersRequest.limit,
|
|
947
|
+
"page": listOffersRequest.page,
|
|
948
|
+
"sortOrder": listOffersRequest.sortOrder,
|
|
949
|
+
"sortBy": listOffersRequest.sortBy
|
|
950
|
+
};
|
|
951
|
+
let headerParams = {
|
|
952
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
953
|
+
"opc-request-id": listOffersRequest.opcRequestId
|
|
954
|
+
};
|
|
955
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
956
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listOffersRequest.retryConfiguration, specRetryConfiguration);
|
|
957
|
+
if (this.logger)
|
|
958
|
+
retrier.logger = this.logger;
|
|
959
|
+
const request = yield oci_common_1.composeRequest({
|
|
960
|
+
baseEndpoint: this._endpoint,
|
|
961
|
+
defaultHeaders: this._defaultHeaders,
|
|
962
|
+
path: "/offers",
|
|
963
|
+
method: "GET",
|
|
964
|
+
pathParams: pathParams,
|
|
965
|
+
headerParams: headerParams,
|
|
966
|
+
queryParams: queryParams
|
|
967
|
+
});
|
|
968
|
+
try {
|
|
969
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
970
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
971
|
+
responseObject: {},
|
|
972
|
+
body: yield response.json(),
|
|
973
|
+
bodyKey: "offerCollection",
|
|
974
|
+
bodyModel: model.OfferCollection,
|
|
975
|
+
type: "model.OfferCollection",
|
|
976
|
+
responseHeaders: [
|
|
977
|
+
{
|
|
978
|
+
value: response.headers.get("opc-request-id"),
|
|
979
|
+
key: "opcRequestId",
|
|
980
|
+
dataType: "string"
|
|
981
|
+
},
|
|
982
|
+
{
|
|
983
|
+
value: response.headers.get("opc-next-page"),
|
|
984
|
+
key: "opcNextPage",
|
|
985
|
+
dataType: "string"
|
|
986
|
+
}
|
|
987
|
+
]
|
|
988
|
+
});
|
|
989
|
+
return sdkResponse;
|
|
990
|
+
}
|
|
991
|
+
catch (err) {
|
|
992
|
+
throw err;
|
|
993
|
+
}
|
|
994
|
+
});
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* Updates the Offer
|
|
998
|
+
* This operation uses {@link common.OciSdkDefaultRetryConfiguration} by default if no retry configuration is defined by the user.
|
|
999
|
+
* @param UpdateOfferRequest
|
|
1000
|
+
* @return UpdateOfferResponse
|
|
1001
|
+
* @throws OciError when an error occurs
|
|
1002
|
+
* @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.86.2/marketplaceprivateoffer/UpdateOffer.ts.html |here} to see how to use UpdateOffer API.
|
|
1003
|
+
*/
|
|
1004
|
+
updateOffer(updateOfferRequest) {
|
|
1005
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1006
|
+
if (this.logger)
|
|
1007
|
+
this.logger.debug("Calling operation OfferClient#updateOffer.");
|
|
1008
|
+
const operationName = "updateOffer";
|
|
1009
|
+
const apiReferenceLink = "";
|
|
1010
|
+
const pathParams = {
|
|
1011
|
+
"{offerId}": updateOfferRequest.offerId
|
|
1012
|
+
};
|
|
1013
|
+
const queryParams = {};
|
|
1014
|
+
let headerParams = {
|
|
1015
|
+
"Content-Type": common.Constants.APPLICATION_JSON,
|
|
1016
|
+
"if-match": updateOfferRequest.ifMatch,
|
|
1017
|
+
"opc-request-id": updateOfferRequest.opcRequestId
|
|
1018
|
+
};
|
|
1019
|
+
const specRetryConfiguration = common.OciSdkDefaultRetryConfiguration;
|
|
1020
|
+
const retrier = oci_common_1.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateOfferRequest.retryConfiguration, specRetryConfiguration);
|
|
1021
|
+
if (this.logger)
|
|
1022
|
+
retrier.logger = this.logger;
|
|
1023
|
+
const request = yield oci_common_1.composeRequest({
|
|
1024
|
+
baseEndpoint: this._endpoint,
|
|
1025
|
+
defaultHeaders: this._defaultHeaders,
|
|
1026
|
+
path: "/offers/{offerId}",
|
|
1027
|
+
method: "PUT",
|
|
1028
|
+
bodyContent: common.ObjectSerializer.serialize(updateOfferRequest.updateOfferDetails, "UpdateOfferDetails", model.UpdateOfferDetails.getJsonObj),
|
|
1029
|
+
pathParams: pathParams,
|
|
1030
|
+
headerParams: headerParams,
|
|
1031
|
+
queryParams: queryParams
|
|
1032
|
+
});
|
|
1033
|
+
try {
|
|
1034
|
+
const response = yield retrier.makeServiceCall(this._httpClient, request, this.targetService, operationName, apiReferenceLink);
|
|
1035
|
+
const sdkResponse = oci_common_1.composeResponse({
|
|
1036
|
+
responseObject: {},
|
|
1037
|
+
body: yield response.json(),
|
|
1038
|
+
bodyKey: "offer",
|
|
1039
|
+
bodyModel: model.Offer,
|
|
1040
|
+
type: "model.Offer",
|
|
1041
|
+
responseHeaders: [
|
|
1042
|
+
{
|
|
1043
|
+
value: response.headers.get("etag"),
|
|
1044
|
+
key: "etag",
|
|
1045
|
+
dataType: "string"
|
|
1046
|
+
},
|
|
1047
|
+
{
|
|
1048
|
+
value: response.headers.get("opc-request-id"),
|
|
1049
|
+
key: "opcRequestId",
|
|
1050
|
+
dataType: "string"
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
});
|
|
1054
|
+
return sdkResponse;
|
|
1055
|
+
}
|
|
1056
|
+
catch (err) {
|
|
1057
|
+
throw err;
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
exports.OfferClient = OfferClient;
|
|
1063
|
+
OfferClient.serviceEndpointTemplate = "https://private-offer.{region}.oci.{secondLevelDomain}";
|
|
1064
|
+
OfferClient.endpointServiceName = "";
|
|
1065
|
+
//# sourceMappingURL=client.js.map
|