oci-announcementsservice 2.11.1 → 2.14.0

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.
Files changed (128) hide show
  1. package/index.d.ts +3 -0
  2. package/index.js +4 -1
  3. package/index.js.map +1 -1
  4. package/lib/announcementsubscription-waiter.d.ts +29 -0
  5. package/lib/announcementsubscription-waiter.js +65 -0
  6. package/lib/announcementsubscription-waiter.js.map +1 -0
  7. package/lib/client.d.ts +242 -61
  8. package/lib/client.js +798 -72
  9. package/lib/client.js.map +1 -1
  10. package/lib/model/announcement-subscription-collection.d.ts +26 -0
  11. package/lib/model/announcement-subscription-collection.js +61 -0
  12. package/lib/model/announcement-subscription-collection.js.map +1 -0
  13. package/lib/model/announcement-subscription-summary.d.ts +84 -0
  14. package/lib/model/announcement-subscription-summary.js +29 -0
  15. package/lib/model/announcement-subscription-summary.js.map +1 -0
  16. package/lib/model/announcement-subscription.d.ts +109 -0
  17. package/lib/model/announcement-subscription.js +69 -0
  18. package/lib/model/announcement-subscription.js.map +1 -0
  19. package/lib/model/base-announcement.d.ts +14 -0
  20. package/lib/model/base-announcement.js +5 -0
  21. package/lib/model/base-announcement.js.map +1 -1
  22. package/lib/model/change-announcement-subscription-compartment-details.d.ts +27 -0
  23. package/lib/model/change-announcement-subscription-compartment-details.js +29 -0
  24. package/lib/model/change-announcement-subscription-compartment-details.js.map +1 -0
  25. package/lib/model/create-announcement-subscription-details.d.ts +65 -0
  26. package/lib/model/create-announcement-subscription-details.js +58 -0
  27. package/lib/model/create-announcement-subscription-details.js.map +1 -0
  28. package/lib/model/create-filter-group-details.d.ts +30 -0
  29. package/lib/model/create-filter-group-details.js +61 -0
  30. package/lib/model/create-filter-group-details.js.map +1 -0
  31. package/lib/model/filter-group-details.d.ts +26 -0
  32. package/lib/model/filter-group-details.js +61 -0
  33. package/lib/model/filter-group-details.js.map +1 -0
  34. package/lib/model/filter-group.d.ts +30 -0
  35. package/lib/model/filter-group.js +61 -0
  36. package/lib/model/filter-group.js.map +1 -0
  37. package/lib/model/filter.d.ts +42 -0
  38. package/lib/model/filter.js +43 -0
  39. package/lib/model/filter.js.map +1 -0
  40. package/lib/model/index.d.ts +24 -0
  41. package/lib/model/index.js +25 -1
  42. package/lib/model/index.js.map +1 -1
  43. package/lib/model/sort-order.d.ts +23 -0
  44. package/lib/model/sort-order.js +34 -0
  45. package/lib/model/sort-order.js.map +1 -0
  46. package/lib/model/update-announcement-subscription-details.d.ts +52 -0
  47. package/lib/model/update-announcement-subscription-details.js +29 -0
  48. package/lib/model/update-announcement-subscription-details.js.map +1 -0
  49. package/lib/model/update-filter-group-details.d.ts +26 -0
  50. package/lib/model/update-filter-group-details.js +61 -0
  51. package/lib/model/update-filter-group-details.js.map +1 -0
  52. package/lib/request/change-announcement-subscription-compartment-request.d.ts +37 -0
  53. package/lib/request/change-announcement-subscription-compartment-request.js +15 -0
  54. package/lib/request/change-announcement-subscription-compartment-request.js.map +1 -0
  55. package/lib/request/create-announcement-subscription-request.d.ts +38 -0
  56. package/lib/request/create-announcement-subscription-request.js +15 -0
  57. package/lib/request/create-announcement-subscription-request.js.map +1 -0
  58. package/lib/request/create-announcements-preference-request.d.ts +1 -1
  59. package/lib/request/create-filter-group-request.d.ts +46 -0
  60. package/lib/request/create-filter-group-request.js +15 -0
  61. package/lib/request/create-filter-group-request.js.map +1 -0
  62. package/lib/request/delete-announcement-subscription-request.d.ts +32 -0
  63. package/lib/request/delete-announcement-subscription-request.js +15 -0
  64. package/lib/request/delete-announcement-subscription-request.js.map +1 -0
  65. package/lib/request/delete-filter-group-request.d.ts +36 -0
  66. package/lib/request/delete-filter-group-request.js +15 -0
  67. package/lib/request/delete-filter-group-request.js.map +1 -0
  68. package/lib/request/get-announcement-request.d.ts +1 -1
  69. package/lib/request/get-announcement-subscription-request.d.ts +28 -0
  70. package/lib/request/get-announcement-subscription-request.js +15 -0
  71. package/lib/request/get-announcement-subscription-request.js.map +1 -0
  72. package/lib/request/get-announcement-user-status-request.d.ts +1 -1
  73. package/lib/request/get-announcements-preference-request.d.ts +1 -1
  74. package/lib/request/index.d.ts +18 -0
  75. package/lib/request/index.js +3 -1
  76. package/lib/request/index.js.map +1 -1
  77. package/lib/request/list-announcement-subscriptions-request.d.ts +65 -0
  78. package/lib/request/list-announcement-subscriptions-request.js +24 -0
  79. package/lib/request/list-announcement-subscriptions-request.js.map +1 -0
  80. package/lib/request/list-announcements-preferences-request.d.ts +2 -3
  81. package/lib/request/list-announcements-request.d.ts +22 -3
  82. package/lib/request/list-announcements-request.js +5 -0
  83. package/lib/request/list-announcements-request.js.map +1 -1
  84. package/lib/request/update-announcement-subscription-request.d.ts +37 -0
  85. package/lib/request/update-announcement-subscription-request.js +15 -0
  86. package/lib/request/update-announcement-subscription-request.js.map +1 -0
  87. package/lib/request/update-announcement-user-status-request.d.ts +1 -1
  88. package/lib/request/update-announcements-preference-request.d.ts +1 -1
  89. package/lib/request/update-filter-group-request.d.ts +41 -0
  90. package/lib/request/update-filter-group-request.js +15 -0
  91. package/lib/request/update-filter-group-request.js.map +1 -0
  92. package/lib/response/change-announcement-subscription-compartment-response.d.ts +25 -0
  93. package/lib/response/change-announcement-subscription-compartment-response.js +15 -0
  94. package/lib/response/change-announcement-subscription-compartment-response.js.map +1 -0
  95. package/lib/response/create-announcement-subscription-response.d.ts +30 -0
  96. package/lib/response/create-announcement-subscription-response.js +15 -0
  97. package/lib/response/create-announcement-subscription-response.js.map +1 -0
  98. package/lib/response/create-announcements-preference-response.d.ts +3 -0
  99. package/lib/response/create-filter-group-response.d.ts +30 -0
  100. package/lib/response/create-filter-group-response.js +15 -0
  101. package/lib/response/create-filter-group-response.js.map +1 -0
  102. package/lib/response/delete-announcement-subscription-response.d.ts +20 -0
  103. package/lib/response/delete-announcement-subscription-response.js +15 -0
  104. package/lib/response/delete-announcement-subscription-response.js.map +1 -0
  105. package/lib/response/delete-filter-group-response.d.ts +25 -0
  106. package/lib/response/delete-filter-group-response.js +15 -0
  107. package/lib/response/delete-filter-group-response.js.map +1 -0
  108. package/lib/response/get-announcement-response.d.ts +8 -1
  109. package/lib/response/get-announcement-subscription-response.d.ts +30 -0
  110. package/lib/response/get-announcement-subscription-response.js +15 -0
  111. package/lib/response/get-announcement-subscription-response.js.map +1 -0
  112. package/lib/response/get-announcement-user-status-response.d.ts +8 -1
  113. package/lib/response/get-announcements-preference-response.d.ts +7 -0
  114. package/lib/response/index.d.ts +18 -0
  115. package/lib/response/list-announcement-subscriptions-response.d.ts +32 -0
  116. package/lib/response/list-announcement-subscriptions-response.js +15 -0
  117. package/lib/response/list-announcement-subscriptions-response.js.map +1 -0
  118. package/lib/response/list-announcements-preferences-response.d.ts +5 -0
  119. package/lib/response/list-announcements-response.d.ts +13 -2
  120. package/lib/response/update-announcement-subscription-response.d.ts +30 -0
  121. package/lib/response/update-announcement-subscription-response.js +15 -0
  122. package/lib/response/update-announcement-subscription-response.js.map +1 -0
  123. package/lib/response/update-announcement-user-status-response.d.ts +9 -1
  124. package/lib/response/update-announcements-preference-response.d.ts +3 -0
  125. package/lib/response/update-filter-group-response.d.ts +30 -0
  126. package/lib/response/update-filter-group-response.js +15 -0
  127. package/lib/response/update-filter-group-response.js.map +1 -0
  128. package/package.json +3 -3
package/lib/client.js CHANGED
@@ -40,10 +40,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  Object.defineProperty(exports, "__esModule", { value: true });
43
- exports.AnnouncementsPreferencesClient = exports.AnnouncementsPreferencesApiKeys = exports.AnnouncementClient = exports.AnnouncementApiKeys = void 0;
43
+ exports.AnnouncementsPreferencesClient = exports.AnnouncementsPreferencesApiKeys = exports.AnnouncementSubscriptionClient = exports.AnnouncementSubscriptionApiKeys = exports.AnnouncementClient = exports.AnnouncementApiKeys = void 0;
44
44
  const common = require("oci-common");
45
45
  const model = __importStar(require("./model"));
46
46
  const oci_common_1 = require("oci-common");
47
+ const announcementsubscription_waiter_1 = require("./announcementsubscription-waiter");
47
48
  const oci_common_2 = require("oci-common");
48
49
  // ===============================================
49
50
  // This file is autogenerated - Please do not edit
@@ -110,7 +111,7 @@ class AnnouncementClient {
110
111
  * @param region The region of the service.
111
112
  */
112
113
  set region(region) {
113
- this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AnnouncementClient.serviceEndpointTemplate, region);
114
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AnnouncementClient.serviceEndpointTemplate, region, AnnouncementClient.endpointServiceName);
114
115
  }
115
116
  /**
116
117
  * Sets the regionId to call (ex, 'us-phoenix-1').
@@ -121,17 +122,19 @@ class AnnouncementClient {
121
122
  * @param regionId The public region ID.
122
123
  */
123
124
  set regionId(regionId) {
124
- this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AnnouncementClient.serviceEndpointTemplate, regionId);
125
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AnnouncementClient.serviceEndpointTemplate, regionId, AnnouncementClient.endpointServiceName);
125
126
  }
126
127
  /**
127
- * Gets the details of a specific announcement.
128
- *
129
- * This operation does not retry by default if the user has not defined a retry configuration.
130
- * @param GetAnnouncementRequest
131
- * @return GetAnnouncementResponse
132
- * @throws OciError when an error occurs
133
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/GetAnnouncement.ts.html |here} to see how to use GetAnnouncement API.
134
- */
128
+ * Gets the details of a specific announcement.
129
+ * <p>
130
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
131
+ *
132
+ * This operation does not retry by default if the user has not defined a retry configuration.
133
+ * @param GetAnnouncementRequest
134
+ * @return GetAnnouncementResponse
135
+ * @throws OciError when an error occurs
136
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/GetAnnouncement.ts.html |here} to see how to use GetAnnouncement API.
137
+ */
135
138
  getAnnouncement(getAnnouncementRequest) {
136
139
  return __awaiter(this, void 0, void 0, function* () {
137
140
  if (this.logger)
@@ -170,6 +173,11 @@ class AnnouncementClient {
170
173
  value: response.headers.get("opc-request-id"),
171
174
  key: "opcRequestId",
172
175
  dataType: "string"
176
+ },
177
+ {
178
+ value: response.headers.get("etag"),
179
+ key: "etag",
180
+ dataType: "string"
173
181
  }
174
182
  ]
175
183
  });
@@ -181,14 +189,16 @@ class AnnouncementClient {
181
189
  });
182
190
  }
183
191
  /**
184
- * Gets information about whether a specific announcement was acknowledged by a user.
185
- *
186
- * This operation does not retry by default if the user has not defined a retry configuration.
187
- * @param GetAnnouncementUserStatusRequest
188
- * @return GetAnnouncementUserStatusResponse
189
- * @throws OciError when an error occurs
190
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/GetAnnouncementUserStatus.ts.html |here} to see how to use GetAnnouncementUserStatus API.
191
- */
192
+ * Gets information about whether a specific announcement was acknowledged by a user.
193
+ * <p>
194
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
195
+ *
196
+ * This operation does not retry by default if the user has not defined a retry configuration.
197
+ * @param GetAnnouncementUserStatusRequest
198
+ * @return GetAnnouncementUserStatusResponse
199
+ * @throws OciError when an error occurs
200
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/GetAnnouncementUserStatus.ts.html |here} to see how to use GetAnnouncementUserStatus API.
201
+ */
192
202
  getAnnouncementUserStatus(getAnnouncementUserStatusRequest) {
193
203
  return __awaiter(this, void 0, void 0, function* () {
194
204
  if (this.logger)
@@ -227,6 +237,11 @@ class AnnouncementClient {
227
237
  value: response.headers.get("opc-request-id"),
228
238
  key: "opcRequestId",
229
239
  dataType: "string"
240
+ },
241
+ {
242
+ value: response.headers.get("etag"),
243
+ key: "etag",
244
+ dataType: "string"
230
245
  }
231
246
  ]
232
247
  });
@@ -238,14 +253,16 @@ class AnnouncementClient {
238
253
  });
239
254
  }
240
255
  /**
241
- * Gets a list of announcements for the current tenancy.
242
- *
243
- * This operation does not retry by default if the user has not defined a retry configuration.
244
- * @param ListAnnouncementsRequest
245
- * @return ListAnnouncementsResponse
246
- * @throws OciError when an error occurs
247
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/ListAnnouncements.ts.html |here} to see how to use ListAnnouncements API.
248
- */
256
+ * Gets a list of announcements for the current tenancy.
257
+ * <p>
258
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
259
+ *
260
+ * This operation does not retry by default if the user has not defined a retry configuration.
261
+ * @param ListAnnouncementsRequest
262
+ * @return ListAnnouncementsResponse
263
+ * @throws OciError when an error occurs
264
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/ListAnnouncements.ts.html |here} to see how to use ListAnnouncements API.
265
+ */
249
266
  listAnnouncements(listAnnouncementsRequest) {
250
267
  return __awaiter(this, void 0, void 0, function* () {
251
268
  if (this.logger)
@@ -261,7 +278,11 @@ class AnnouncementClient {
261
278
  "sortBy": listAnnouncementsRequest.sortBy,
262
279
  "sortOrder": listAnnouncementsRequest.sortOrder,
263
280
  "timeOneEarliestTime": listAnnouncementsRequest.timeOneEarliestTime,
264
- "timeOneLatestTime": listAnnouncementsRequest.timeOneLatestTime
281
+ "timeOneLatestTime": listAnnouncementsRequest.timeOneLatestTime,
282
+ "environmentName": listAnnouncementsRequest.environmentName,
283
+ "service": listAnnouncementsRequest.service,
284
+ "platformType": listAnnouncementsRequest.platformType,
285
+ "excludeAnnouncementTypes": listAnnouncementsRequest.excludeAnnouncementTypes
265
286
  };
266
287
  let headerParams = {
267
288
  "Content-Type": common.Constants.APPLICATION_JSON,
@@ -294,6 +315,11 @@ class AnnouncementClient {
294
315
  key: "opcNextPage",
295
316
  dataType: "string"
296
317
  },
318
+ {
319
+ value: response.headers.get("opc-previous-page"),
320
+ key: "opcPreviousPage",
321
+ dataType: "string"
322
+ },
297
323
  {
298
324
  value: response.headers.get("opc-request-id"),
299
325
  key: "opcRequestId",
@@ -309,14 +335,16 @@ class AnnouncementClient {
309
335
  });
310
336
  }
311
337
  /**
312
- * Updates the status of the specified announcement with regard to whether it has been marked as read.
313
- *
314
- * This operation does not retry by default if the user has not defined a retry configuration.
315
- * @param UpdateAnnouncementUserStatusRequest
316
- * @return UpdateAnnouncementUserStatusResponse
317
- * @throws OciError when an error occurs
318
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/UpdateAnnouncementUserStatus.ts.html |here} to see how to use UpdateAnnouncementUserStatus API.
319
- */
338
+ * Updates the status of the specified announcement with regard to whether it has been marked as read.
339
+ * <p>
340
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
341
+ *
342
+ * This operation does not retry by default if the user has not defined a retry configuration.
343
+ * @param UpdateAnnouncementUserStatusRequest
344
+ * @return UpdateAnnouncementUserStatusResponse
345
+ * @throws OciError when an error occurs
346
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/UpdateAnnouncementUserStatus.ts.html |here} to see how to use UpdateAnnouncementUserStatus API.
347
+ */
320
348
  updateAnnouncementUserStatus(updateAnnouncementUserStatusRequest) {
321
349
  return __awaiter(this, void 0, void 0, function* () {
322
350
  if (this.logger)
@@ -348,6 +376,10 @@ class AnnouncementClient {
348
376
  const response = yield retrier.makeServiceCall(this._httpClient, request);
349
377
  const sdkResponse = oci_common_2.composeResponse({
350
378
  responseObject: {},
379
+ body: yield response.json(),
380
+ bodyKey: "announcementUserStatusDetails",
381
+ bodyModel: model.AnnouncementUserStatusDetails,
382
+ type: "model.AnnouncementUserStatusDetails",
351
383
  responseHeaders: [
352
384
  {
353
385
  value: response.headers.get("opc-request-id"),
@@ -370,7 +402,687 @@ class AnnouncementClient {
370
402
  }
371
403
  }
372
404
  exports.AnnouncementClient = AnnouncementClient;
373
- AnnouncementClient.serviceEndpointTemplate = "https://announcements.{region}.{secondLevelDomain}";
405
+ AnnouncementClient.serviceEndpointTemplate = "https://announcements.{region}.oci.{secondLevelDomain}";
406
+ AnnouncementClient.endpointServiceName = "";
407
+ var AnnouncementSubscriptionApiKeys;
408
+ (function (AnnouncementSubscriptionApiKeys) {
409
+ })(AnnouncementSubscriptionApiKeys = exports.AnnouncementSubscriptionApiKeys || (exports.AnnouncementSubscriptionApiKeys = {}));
410
+ /**
411
+ * This service client uses {@link common.CircuitBreaker.DefaultConfiguration} for all the operations by default if no circuit breaker configuration is defined by the user.
412
+ */
413
+ class AnnouncementSubscriptionClient {
414
+ constructor(params, clientConfiguration) {
415
+ this["_endpoint"] = "";
416
+ this["_defaultHeaders"] = {};
417
+ this._circuitBreaker = null;
418
+ const requestSigner = params.authenticationDetailsProvider
419
+ ? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
420
+ : null;
421
+ if (clientConfiguration) {
422
+ this._clientConfiguration = clientConfiguration;
423
+ this._circuitBreaker = clientConfiguration.circuitBreaker
424
+ ? clientConfiguration.circuitBreaker.circuit
425
+ : null;
426
+ }
427
+ // if circuit breaker is not created, check if circuit breaker system is enabled to use default circuit breaker
428
+ const specCircuitBreakerEnabled = true;
429
+ if (!this._circuitBreaker &&
430
+ common.utils.isCircuitBreakerSystemEnabled(clientConfiguration) &&
431
+ (specCircuitBreakerEnabled || common.CircuitBreaker.DefaultCircuitBreakerOverriden)) {
432
+ this._circuitBreaker = new common.CircuitBreaker().circuit;
433
+ }
434
+ this._httpClient =
435
+ params.httpClient || new common.FetchHttpClient(requestSigner, this._circuitBreaker);
436
+ if (params.authenticationDetailsProvider &&
437
+ common.isRegionProvider(params.authenticationDetailsProvider)) {
438
+ const provider = params.authenticationDetailsProvider;
439
+ if (provider.getRegion()) {
440
+ this.region = provider.getRegion();
441
+ }
442
+ }
443
+ }
444
+ /**
445
+ * Get the endpoint that is being used to call (ex, https://www.example.com).
446
+ */
447
+ get endpoint() {
448
+ return this._endpoint;
449
+ }
450
+ /**
451
+ * Sets the endpoint to call (ex, https://www.example.com).
452
+ * @param endpoint The endpoint of the service.
453
+ */
454
+ set endpoint(endpoint) {
455
+ this._endpoint = endpoint;
456
+ this._endpoint = this._endpoint + "/20180904";
457
+ if (this.logger)
458
+ this.logger.info(`AnnouncementSubscriptionClient endpoint set to ${this._endpoint}`);
459
+ }
460
+ get logger() {
461
+ return common.LOG.logger;
462
+ }
463
+ /**
464
+ * Sets the region to call (ex, Region.US_PHOENIX_1).
465
+ * Note, this will call {@link #endpoint(String) endpoint} after resolving the endpoint.
466
+ * @param region The region of the service.
467
+ */
468
+ set region(region) {
469
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AnnouncementSubscriptionClient.serviceEndpointTemplate, region, AnnouncementSubscriptionClient.endpointServiceName);
470
+ }
471
+ /**
472
+ * Sets the regionId to call (ex, 'us-phoenix-1').
473
+ *
474
+ * Note, this will first try to map the region ID to a known Region and call {@link #region(Region) region}.
475
+ * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
476
+ * and then call {@link #endpoint(String) endpoint}.
477
+ * @param regionId The public region ID.
478
+ */
479
+ set regionId(regionId) {
480
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AnnouncementSubscriptionClient.serviceEndpointTemplate, regionId, AnnouncementSubscriptionClient.endpointServiceName);
481
+ }
482
+ /**
483
+ * Creates a new AnnouncementSubscriptionWaiter for resources for this service.
484
+ *
485
+ * @param config The waiter configuration for termination and delay strategy
486
+ * @return The service waiters.
487
+ */
488
+ createWaiters(config) {
489
+ this._waiters = new announcementsubscription_waiter_1.AnnouncementSubscriptionWaiter(this, config);
490
+ return this._waiters;
491
+ }
492
+ /**
493
+ * Gets the waiters available for resources for this service.
494
+ *
495
+ * @return The service waiters.
496
+ */
497
+ getWaiters() {
498
+ if (this._waiters) {
499
+ return this._waiters;
500
+ }
501
+ throw Error("Waiters do not exist. Please create waiters.");
502
+ }
503
+ /**
504
+ * Moves the specified announcement subscription from one compartment to another compartment. When provided, If-Match is checked against ETag values of the resource.
505
+ * <p>
506
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
507
+ *
508
+ * This operation does not retry by default if the user has not defined a retry configuration.
509
+ * @param ChangeAnnouncementSubscriptionCompartmentRequest
510
+ * @return ChangeAnnouncementSubscriptionCompartmentResponse
511
+ * @throws OciError when an error occurs
512
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/ChangeAnnouncementSubscriptionCompartment.ts.html |here} to see how to use ChangeAnnouncementSubscriptionCompartment API.
513
+ */
514
+ changeAnnouncementSubscriptionCompartment(changeAnnouncementSubscriptionCompartmentRequest) {
515
+ return __awaiter(this, void 0, void 0, function* () {
516
+ if (this.logger)
517
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#changeAnnouncementSubscriptionCompartment.");
518
+ const pathParams = {
519
+ "{announcementSubscriptionId}": changeAnnouncementSubscriptionCompartmentRequest.announcementSubscriptionId
520
+ };
521
+ const queryParams = {};
522
+ let headerParams = {
523
+ "Content-Type": common.Constants.APPLICATION_JSON,
524
+ "if-match": changeAnnouncementSubscriptionCompartmentRequest.ifMatch,
525
+ "opc-request-id": changeAnnouncementSubscriptionCompartmentRequest.opcRequestId
526
+ };
527
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
528
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, changeAnnouncementSubscriptionCompartmentRequest.retryConfiguration, specRetryConfiguration);
529
+ if (this.logger)
530
+ retrier.logger = this.logger;
531
+ const request = yield oci_common_2.composeRequest({
532
+ baseEndpoint: this._endpoint,
533
+ defaultHeaders: this._defaultHeaders,
534
+ path: "/announcementSubscriptions/{announcementSubscriptionId}/actions/changeCompartment",
535
+ method: "POST",
536
+ bodyContent: common.ObjectSerializer.serialize(changeAnnouncementSubscriptionCompartmentRequest.changeAnnouncementSubscriptionCompartmentDetails, "ChangeAnnouncementSubscriptionCompartmentDetails", model.ChangeAnnouncementSubscriptionCompartmentDetails.getJsonObj),
537
+ pathParams: pathParams,
538
+ headerParams: headerParams,
539
+ queryParams: queryParams
540
+ });
541
+ try {
542
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
543
+ const sdkResponse = oci_common_2.composeResponse({
544
+ responseObject: {},
545
+ responseHeaders: [
546
+ {
547
+ value: response.headers.get("opc-request-id"),
548
+ key: "opcRequestId",
549
+ dataType: "string"
550
+ },
551
+ {
552
+ value: response.headers.get("etag"),
553
+ key: "etag",
554
+ dataType: "string"
555
+ }
556
+ ]
557
+ });
558
+ return sdkResponse;
559
+ }
560
+ catch (err) {
561
+ throw err;
562
+ }
563
+ });
564
+ }
565
+ /**
566
+ * Creates a new announcement subscription.
567
+ * <p>
568
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
569
+ *
570
+ * This operation does not retry by default if the user has not defined a retry configuration.
571
+ * @param CreateAnnouncementSubscriptionRequest
572
+ * @return CreateAnnouncementSubscriptionResponse
573
+ * @throws OciError when an error occurs
574
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/CreateAnnouncementSubscription.ts.html |here} to see how to use CreateAnnouncementSubscription API.
575
+ */
576
+ createAnnouncementSubscription(createAnnouncementSubscriptionRequest) {
577
+ return __awaiter(this, void 0, void 0, function* () {
578
+ if (this.logger)
579
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#createAnnouncementSubscription.");
580
+ const pathParams = {};
581
+ const queryParams = {};
582
+ let headerParams = {
583
+ "Content-Type": common.Constants.APPLICATION_JSON,
584
+ "opc-retry-token": createAnnouncementSubscriptionRequest.opcRetryToken,
585
+ "opc-request-id": createAnnouncementSubscriptionRequest.opcRequestId
586
+ };
587
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
588
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createAnnouncementSubscriptionRequest.retryConfiguration, specRetryConfiguration);
589
+ if (this.logger)
590
+ retrier.logger = this.logger;
591
+ const request = yield oci_common_2.composeRequest({
592
+ baseEndpoint: this._endpoint,
593
+ defaultHeaders: this._defaultHeaders,
594
+ path: "/announcementSubscriptions",
595
+ method: "POST",
596
+ bodyContent: common.ObjectSerializer.serialize(createAnnouncementSubscriptionRequest.createAnnouncementSubscriptionDetails, "CreateAnnouncementSubscriptionDetails", model.CreateAnnouncementSubscriptionDetails.getJsonObj),
597
+ pathParams: pathParams,
598
+ headerParams: headerParams,
599
+ queryParams: queryParams
600
+ });
601
+ try {
602
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
603
+ const sdkResponse = oci_common_2.composeResponse({
604
+ responseObject: {},
605
+ body: yield response.json(),
606
+ bodyKey: "announcementSubscription",
607
+ bodyModel: model.AnnouncementSubscription,
608
+ type: "model.AnnouncementSubscription",
609
+ responseHeaders: [
610
+ {
611
+ value: response.headers.get("opc-request-id"),
612
+ key: "opcRequestId",
613
+ dataType: "string"
614
+ },
615
+ {
616
+ value: response.headers.get("etag"),
617
+ key: "etag",
618
+ dataType: "string"
619
+ }
620
+ ]
621
+ });
622
+ return sdkResponse;
623
+ }
624
+ catch (err) {
625
+ throw err;
626
+ }
627
+ });
628
+ }
629
+ /**
630
+ * Creates a new filter group in the specified announcement subscription.
631
+ * <p>
632
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
633
+ *
634
+ * This operation does not retry by default if the user has not defined a retry configuration.
635
+ * @param CreateFilterGroupRequest
636
+ * @return CreateFilterGroupResponse
637
+ * @throws OciError when an error occurs
638
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/CreateFilterGroup.ts.html |here} to see how to use CreateFilterGroup API.
639
+ */
640
+ createFilterGroup(createFilterGroupRequest) {
641
+ return __awaiter(this, void 0, void 0, function* () {
642
+ if (this.logger)
643
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#createFilterGroup.");
644
+ const pathParams = {
645
+ "{announcementSubscriptionId}": createFilterGroupRequest.announcementSubscriptionId
646
+ };
647
+ const queryParams = {};
648
+ let headerParams = {
649
+ "Content-Type": common.Constants.APPLICATION_JSON,
650
+ "opc-retry-token": createFilterGroupRequest.opcRetryToken,
651
+ "opc-request-id": createFilterGroupRequest.opcRequestId,
652
+ "if-match": createFilterGroupRequest.ifMatch
653
+ };
654
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
655
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, createFilterGroupRequest.retryConfiguration, specRetryConfiguration);
656
+ if (this.logger)
657
+ retrier.logger = this.logger;
658
+ const request = yield oci_common_2.composeRequest({
659
+ baseEndpoint: this._endpoint,
660
+ defaultHeaders: this._defaultHeaders,
661
+ path: "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups",
662
+ method: "POST",
663
+ bodyContent: common.ObjectSerializer.serialize(createFilterGroupRequest.createFilterGroupDetails, "CreateFilterGroupDetails", model.CreateFilterGroupDetails.getJsonObj),
664
+ pathParams: pathParams,
665
+ headerParams: headerParams,
666
+ queryParams: queryParams
667
+ });
668
+ try {
669
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
670
+ const sdkResponse = oci_common_2.composeResponse({
671
+ responseObject: {},
672
+ body: yield response.json(),
673
+ bodyKey: "filterGroup",
674
+ bodyModel: model.FilterGroup,
675
+ type: "model.FilterGroup",
676
+ responseHeaders: [
677
+ {
678
+ value: response.headers.get("opc-request-id"),
679
+ key: "opcRequestId",
680
+ dataType: "string"
681
+ },
682
+ {
683
+ value: response.headers.get("etag"),
684
+ key: "etag",
685
+ dataType: "string"
686
+ }
687
+ ]
688
+ });
689
+ return sdkResponse;
690
+ }
691
+ catch (err) {
692
+ throw err;
693
+ }
694
+ });
695
+ }
696
+ /**
697
+ * Deletes the specified announcement subscription.
698
+ * <p>
699
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
700
+ *
701
+ * This operation does not retry by default if the user has not defined a retry configuration.
702
+ * @param DeleteAnnouncementSubscriptionRequest
703
+ * @return DeleteAnnouncementSubscriptionResponse
704
+ * @throws OciError when an error occurs
705
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/DeleteAnnouncementSubscription.ts.html |here} to see how to use DeleteAnnouncementSubscription API.
706
+ */
707
+ deleteAnnouncementSubscription(deleteAnnouncementSubscriptionRequest) {
708
+ return __awaiter(this, void 0, void 0, function* () {
709
+ if (this.logger)
710
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#deleteAnnouncementSubscription.");
711
+ const pathParams = {
712
+ "{announcementSubscriptionId}": deleteAnnouncementSubscriptionRequest.announcementSubscriptionId
713
+ };
714
+ const queryParams = {};
715
+ let headerParams = {
716
+ "Content-Type": common.Constants.APPLICATION_JSON,
717
+ "if-match": deleteAnnouncementSubscriptionRequest.ifMatch,
718
+ "opc-request-id": deleteAnnouncementSubscriptionRequest.opcRequestId
719
+ };
720
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
721
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteAnnouncementSubscriptionRequest.retryConfiguration, specRetryConfiguration);
722
+ if (this.logger)
723
+ retrier.logger = this.logger;
724
+ const request = yield oci_common_2.composeRequest({
725
+ baseEndpoint: this._endpoint,
726
+ defaultHeaders: this._defaultHeaders,
727
+ path: "/announcementSubscriptions/{announcementSubscriptionId}",
728
+ method: "DELETE",
729
+ pathParams: pathParams,
730
+ headerParams: headerParams,
731
+ queryParams: queryParams
732
+ });
733
+ try {
734
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
735
+ const sdkResponse = oci_common_2.composeResponse({
736
+ responseObject: {},
737
+ responseHeaders: [
738
+ {
739
+ value: response.headers.get("opc-request-id"),
740
+ key: "opcRequestId",
741
+ dataType: "string"
742
+ }
743
+ ]
744
+ });
745
+ return sdkResponse;
746
+ }
747
+ catch (err) {
748
+ throw err;
749
+ }
750
+ });
751
+ }
752
+ /**
753
+ * Deletes a filter group in the specified announcement subscription.
754
+ * <p>
755
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
756
+ *
757
+ * This operation does not retry by default if the user has not defined a retry configuration.
758
+ * @param DeleteFilterGroupRequest
759
+ * @return DeleteFilterGroupResponse
760
+ * @throws OciError when an error occurs
761
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/DeleteFilterGroup.ts.html |here} to see how to use DeleteFilterGroup API.
762
+ */
763
+ deleteFilterGroup(deleteFilterGroupRequest) {
764
+ return __awaiter(this, void 0, void 0, function* () {
765
+ if (this.logger)
766
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#deleteFilterGroup.");
767
+ const pathParams = {
768
+ "{announcementSubscriptionId}": deleteFilterGroupRequest.announcementSubscriptionId,
769
+ "{filterGroupName}": deleteFilterGroupRequest.filterGroupName
770
+ };
771
+ const queryParams = {};
772
+ let headerParams = {
773
+ "Content-Type": common.Constants.APPLICATION_JSON,
774
+ "opc-request-id": deleteFilterGroupRequest.opcRequestId,
775
+ "if-match": deleteFilterGroupRequest.ifMatch
776
+ };
777
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
778
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, deleteFilterGroupRequest.retryConfiguration, specRetryConfiguration);
779
+ if (this.logger)
780
+ retrier.logger = this.logger;
781
+ const request = yield oci_common_2.composeRequest({
782
+ baseEndpoint: this._endpoint,
783
+ defaultHeaders: this._defaultHeaders,
784
+ path: "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups/{filterGroupName}",
785
+ method: "DELETE",
786
+ pathParams: pathParams,
787
+ headerParams: headerParams,
788
+ queryParams: queryParams
789
+ });
790
+ try {
791
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
792
+ const sdkResponse = oci_common_2.composeResponse({
793
+ responseObject: {},
794
+ responseHeaders: [
795
+ {
796
+ value: response.headers.get("opc-request-id"),
797
+ key: "opcRequestId",
798
+ dataType: "string"
799
+ },
800
+ {
801
+ value: response.headers.get("etag"),
802
+ key: "etag",
803
+ dataType: "string"
804
+ }
805
+ ]
806
+ });
807
+ return sdkResponse;
808
+ }
809
+ catch (err) {
810
+ throw err;
811
+ }
812
+ });
813
+ }
814
+ /**
815
+ * Gets the specified announcement subscription.
816
+ * <p>
817
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
818
+ *
819
+ * This operation does not retry by default if the user has not defined a retry configuration.
820
+ * @param GetAnnouncementSubscriptionRequest
821
+ * @return GetAnnouncementSubscriptionResponse
822
+ * @throws OciError when an error occurs
823
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/GetAnnouncementSubscription.ts.html |here} to see how to use GetAnnouncementSubscription API.
824
+ */
825
+ getAnnouncementSubscription(getAnnouncementSubscriptionRequest) {
826
+ return __awaiter(this, void 0, void 0, function* () {
827
+ if (this.logger)
828
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#getAnnouncementSubscription.");
829
+ const pathParams = {
830
+ "{announcementSubscriptionId}": getAnnouncementSubscriptionRequest.announcementSubscriptionId
831
+ };
832
+ const queryParams = {};
833
+ let headerParams = {
834
+ "Content-Type": common.Constants.APPLICATION_JSON,
835
+ "opc-request-id": getAnnouncementSubscriptionRequest.opcRequestId
836
+ };
837
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
838
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, getAnnouncementSubscriptionRequest.retryConfiguration, specRetryConfiguration);
839
+ if (this.logger)
840
+ retrier.logger = this.logger;
841
+ const request = yield oci_common_2.composeRequest({
842
+ baseEndpoint: this._endpoint,
843
+ defaultHeaders: this._defaultHeaders,
844
+ path: "/announcementSubscriptions/{announcementSubscriptionId}",
845
+ method: "GET",
846
+ pathParams: pathParams,
847
+ headerParams: headerParams,
848
+ queryParams: queryParams
849
+ });
850
+ try {
851
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
852
+ const sdkResponse = oci_common_2.composeResponse({
853
+ responseObject: {},
854
+ body: yield response.json(),
855
+ bodyKey: "announcementSubscription",
856
+ bodyModel: model.AnnouncementSubscription,
857
+ type: "model.AnnouncementSubscription",
858
+ responseHeaders: [
859
+ {
860
+ value: response.headers.get("etag"),
861
+ key: "etag",
862
+ dataType: "string"
863
+ },
864
+ {
865
+ value: response.headers.get("opc-request-id"),
866
+ key: "opcRequestId",
867
+ dataType: "string"
868
+ }
869
+ ]
870
+ });
871
+ return sdkResponse;
872
+ }
873
+ catch (err) {
874
+ throw err;
875
+ }
876
+ });
877
+ }
878
+ /**
879
+ * Gets a list of all announcement subscriptions in the specified compartment.
880
+ * <p>
881
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
882
+ *
883
+ * This operation does not retry by default if the user has not defined a retry configuration.
884
+ * @param ListAnnouncementSubscriptionsRequest
885
+ * @return ListAnnouncementSubscriptionsResponse
886
+ * @throws OciError when an error occurs
887
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/ListAnnouncementSubscriptions.ts.html |here} to see how to use ListAnnouncementSubscriptions API.
888
+ */
889
+ listAnnouncementSubscriptions(listAnnouncementSubscriptionsRequest) {
890
+ return __awaiter(this, void 0, void 0, function* () {
891
+ if (this.logger)
892
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#listAnnouncementSubscriptions.");
893
+ const pathParams = {};
894
+ const queryParams = {
895
+ "compartmentId": listAnnouncementSubscriptionsRequest.compartmentId,
896
+ "lifecycleState": listAnnouncementSubscriptionsRequest.lifecycleState,
897
+ "displayName": listAnnouncementSubscriptionsRequest.displayName,
898
+ "id": listAnnouncementSubscriptionsRequest.id,
899
+ "limit": listAnnouncementSubscriptionsRequest.limit,
900
+ "page": listAnnouncementSubscriptionsRequest.page,
901
+ "sortOrder": listAnnouncementSubscriptionsRequest.sortOrder,
902
+ "sortBy": listAnnouncementSubscriptionsRequest.sortBy
903
+ };
904
+ let headerParams = {
905
+ "Content-Type": common.Constants.APPLICATION_JSON,
906
+ "opc-request-id": listAnnouncementSubscriptionsRequest.opcRequestId
907
+ };
908
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
909
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, listAnnouncementSubscriptionsRequest.retryConfiguration, specRetryConfiguration);
910
+ if (this.logger)
911
+ retrier.logger = this.logger;
912
+ const request = yield oci_common_2.composeRequest({
913
+ baseEndpoint: this._endpoint,
914
+ defaultHeaders: this._defaultHeaders,
915
+ path: "/announcementSubscriptions",
916
+ method: "GET",
917
+ pathParams: pathParams,
918
+ headerParams: headerParams,
919
+ queryParams: queryParams
920
+ });
921
+ try {
922
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
923
+ const sdkResponse = oci_common_2.composeResponse({
924
+ responseObject: {},
925
+ body: yield response.json(),
926
+ bodyKey: "announcementSubscriptionCollection",
927
+ bodyModel: model.AnnouncementSubscriptionCollection,
928
+ type: "model.AnnouncementSubscriptionCollection",
929
+ responseHeaders: [
930
+ {
931
+ value: response.headers.get("opc-request-id"),
932
+ key: "opcRequestId",
933
+ dataType: "string"
934
+ },
935
+ {
936
+ value: response.headers.get("opc-next-page"),
937
+ key: "opcNextPage",
938
+ dataType: "string"
939
+ }
940
+ ]
941
+ });
942
+ return sdkResponse;
943
+ }
944
+ catch (err) {
945
+ throw err;
946
+ }
947
+ });
948
+ }
949
+ /**
950
+ * Updates the specified announcement subscription.
951
+ * <p>
952
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
953
+ *
954
+ * This operation does not retry by default if the user has not defined a retry configuration.
955
+ * @param UpdateAnnouncementSubscriptionRequest
956
+ * @return UpdateAnnouncementSubscriptionResponse
957
+ * @throws OciError when an error occurs
958
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/UpdateAnnouncementSubscription.ts.html |here} to see how to use UpdateAnnouncementSubscription API.
959
+ */
960
+ updateAnnouncementSubscription(updateAnnouncementSubscriptionRequest) {
961
+ return __awaiter(this, void 0, void 0, function* () {
962
+ if (this.logger)
963
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#updateAnnouncementSubscription.");
964
+ const pathParams = {
965
+ "{announcementSubscriptionId}": updateAnnouncementSubscriptionRequest.announcementSubscriptionId
966
+ };
967
+ const queryParams = {};
968
+ let headerParams = {
969
+ "Content-Type": common.Constants.APPLICATION_JSON,
970
+ "if-match": updateAnnouncementSubscriptionRequest.ifMatch,
971
+ "opc-request-id": updateAnnouncementSubscriptionRequest.opcRequestId
972
+ };
973
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
974
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateAnnouncementSubscriptionRequest.retryConfiguration, specRetryConfiguration);
975
+ if (this.logger)
976
+ retrier.logger = this.logger;
977
+ const request = yield oci_common_2.composeRequest({
978
+ baseEndpoint: this._endpoint,
979
+ defaultHeaders: this._defaultHeaders,
980
+ path: "/announcementSubscriptions/{announcementSubscriptionId}",
981
+ method: "PUT",
982
+ bodyContent: common.ObjectSerializer.serialize(updateAnnouncementSubscriptionRequest.updateAnnouncementSubscriptionDetails, "UpdateAnnouncementSubscriptionDetails", model.UpdateAnnouncementSubscriptionDetails.getJsonObj),
983
+ pathParams: pathParams,
984
+ headerParams: headerParams,
985
+ queryParams: queryParams
986
+ });
987
+ try {
988
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
989
+ const sdkResponse = oci_common_2.composeResponse({
990
+ responseObject: {},
991
+ body: yield response.json(),
992
+ bodyKey: "announcementSubscription",
993
+ bodyModel: model.AnnouncementSubscription,
994
+ type: "model.AnnouncementSubscription",
995
+ responseHeaders: [
996
+ {
997
+ value: response.headers.get("opc-request-id"),
998
+ key: "opcRequestId",
999
+ dataType: "string"
1000
+ },
1001
+ {
1002
+ value: response.headers.get("etag"),
1003
+ key: "etag",
1004
+ dataType: "string"
1005
+ }
1006
+ ]
1007
+ });
1008
+ return sdkResponse;
1009
+ }
1010
+ catch (err) {
1011
+ throw err;
1012
+ }
1013
+ });
1014
+ }
1015
+ /**
1016
+ * Updates a filter group in the specified announcement subscription.
1017
+ * <p>
1018
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
1019
+ *
1020
+ * This operation does not retry by default if the user has not defined a retry configuration.
1021
+ * @param UpdateFilterGroupRequest
1022
+ * @return UpdateFilterGroupResponse
1023
+ * @throws OciError when an error occurs
1024
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/UpdateFilterGroup.ts.html |here} to see how to use UpdateFilterGroup API.
1025
+ */
1026
+ updateFilterGroup(updateFilterGroupRequest) {
1027
+ return __awaiter(this, void 0, void 0, function* () {
1028
+ if (this.logger)
1029
+ this.logger.debug("Calling operation AnnouncementSubscriptionClient#updateFilterGroup.");
1030
+ const pathParams = {
1031
+ "{announcementSubscriptionId}": updateFilterGroupRequest.announcementSubscriptionId,
1032
+ "{filterGroupName}": updateFilterGroupRequest.filterGroupName
1033
+ };
1034
+ const queryParams = {};
1035
+ let headerParams = {
1036
+ "Content-Type": common.Constants.APPLICATION_JSON,
1037
+ "opc-request-id": updateFilterGroupRequest.opcRequestId,
1038
+ "if-match": updateFilterGroupRequest.ifMatch
1039
+ };
1040
+ const specRetryConfiguration = common.NoRetryConfigurationDetails;
1041
+ const retrier = oci_common_2.GenericRetrier.createPreferredRetrier(this._clientConfiguration ? this._clientConfiguration.retryConfiguration : undefined, updateFilterGroupRequest.retryConfiguration, specRetryConfiguration);
1042
+ if (this.logger)
1043
+ retrier.logger = this.logger;
1044
+ const request = yield oci_common_2.composeRequest({
1045
+ baseEndpoint: this._endpoint,
1046
+ defaultHeaders: this._defaultHeaders,
1047
+ path: "/announcementSubscriptions/{announcementSubscriptionId}/filterGroups/{filterGroupName}",
1048
+ method: "PUT",
1049
+ bodyContent: common.ObjectSerializer.serialize(updateFilterGroupRequest.updateFilterGroupDetails, "UpdateFilterGroupDetails", model.UpdateFilterGroupDetails.getJsonObj),
1050
+ pathParams: pathParams,
1051
+ headerParams: headerParams,
1052
+ queryParams: queryParams
1053
+ });
1054
+ try {
1055
+ const response = yield retrier.makeServiceCall(this._httpClient, request);
1056
+ const sdkResponse = oci_common_2.composeResponse({
1057
+ responseObject: {},
1058
+ body: yield response.json(),
1059
+ bodyKey: "filterGroup",
1060
+ bodyModel: model.FilterGroup,
1061
+ type: "model.FilterGroup",
1062
+ responseHeaders: [
1063
+ {
1064
+ value: response.headers.get("opc-request-id"),
1065
+ key: "opcRequestId",
1066
+ dataType: "string"
1067
+ },
1068
+ {
1069
+ value: response.headers.get("etag"),
1070
+ key: "etag",
1071
+ dataType: "string"
1072
+ }
1073
+ ]
1074
+ });
1075
+ return sdkResponse;
1076
+ }
1077
+ catch (err) {
1078
+ throw err;
1079
+ }
1080
+ });
1081
+ }
1082
+ }
1083
+ exports.AnnouncementSubscriptionClient = AnnouncementSubscriptionClient;
1084
+ AnnouncementSubscriptionClient.serviceEndpointTemplate = "https://announcements.{region}.oci.{secondLevelDomain}";
1085
+ AnnouncementSubscriptionClient.endpointServiceName = "";
374
1086
  var AnnouncementsPreferencesApiKeys;
375
1087
  (function (AnnouncementsPreferencesApiKeys) {
376
1088
  })(AnnouncementsPreferencesApiKeys = exports.AnnouncementsPreferencesApiKeys || (exports.AnnouncementsPreferencesApiKeys = {}));
@@ -433,7 +1145,7 @@ class AnnouncementsPreferencesClient {
433
1145
  * @param region The region of the service.
434
1146
  */
435
1147
  set region(region) {
436
- this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AnnouncementsPreferencesClient.serviceEndpointTemplate, region);
1148
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegion(AnnouncementsPreferencesClient.serviceEndpointTemplate, region, AnnouncementsPreferencesClient.endpointServiceName);
437
1149
  }
438
1150
  /**
439
1151
  * Sets the regionId to call (ex, 'us-phoenix-1').
@@ -444,17 +1156,19 @@ class AnnouncementsPreferencesClient {
444
1156
  * @param regionId The public region ID.
445
1157
  */
446
1158
  set regionId(regionId) {
447
- this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AnnouncementsPreferencesClient.serviceEndpointTemplate, regionId);
1159
+ this.endpoint = common.EndpointBuilder.createEndpointFromRegionId(AnnouncementsPreferencesClient.serviceEndpointTemplate, regionId, AnnouncementsPreferencesClient.endpointServiceName);
448
1160
  }
449
1161
  /**
450
- * Creates a request that specifies preferences for the tenancy regarding receiving announcements by email.
451
- *
452
- * This operation does not retry by default if the user has not defined a retry configuration.
453
- * @param CreateAnnouncementsPreferenceRequest
454
- * @return CreateAnnouncementsPreferenceResponse
455
- * @throws OciError when an error occurs
456
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/CreateAnnouncementsPreference.ts.html |here} to see how to use CreateAnnouncementsPreference API.
457
- */
1162
+ * Creates a request that specifies preferences for the tenancy regarding receiving announcements by email.
1163
+ * <p>
1164
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
1165
+ *
1166
+ * This operation does not retry by default if the user has not defined a retry configuration.
1167
+ * @param CreateAnnouncementsPreferenceRequest
1168
+ * @return CreateAnnouncementsPreferenceResponse
1169
+ * @throws OciError when an error occurs
1170
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/CreateAnnouncementsPreference.ts.html |here} to see how to use CreateAnnouncementsPreference API.
1171
+ */
458
1172
  createAnnouncementsPreference(createAnnouncementsPreferenceRequest) {
459
1173
  return __awaiter(this, void 0, void 0, function* () {
460
1174
  if (this.logger)
@@ -509,14 +1223,16 @@ class AnnouncementsPreferencesClient {
509
1223
  });
510
1224
  }
511
1225
  /**
512
- * Gets the current preferences of the tenancy regarding receiving announcements by email.
513
- *
514
- * This operation does not retry by default if the user has not defined a retry configuration.
515
- * @param GetAnnouncementsPreferenceRequest
516
- * @return GetAnnouncementsPreferenceResponse
517
- * @throws OciError when an error occurs
518
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/GetAnnouncementsPreference.ts.html |here} to see how to use GetAnnouncementsPreference API.
519
- */
1226
+ * Gets the current preferences of the tenancy regarding receiving announcements by email.
1227
+ * <p>
1228
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
1229
+ *
1230
+ * This operation does not retry by default if the user has not defined a retry configuration.
1231
+ * @param GetAnnouncementsPreferenceRequest
1232
+ * @return GetAnnouncementsPreferenceResponse
1233
+ * @throws OciError when an error occurs
1234
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/GetAnnouncementsPreference.ts.html |here} to see how to use GetAnnouncementsPreference API.
1235
+ */
520
1236
  getAnnouncementsPreference(getAnnouncementsPreferenceRequest) {
521
1237
  return __awaiter(this, void 0, void 0, function* () {
522
1238
  if (this.logger)
@@ -555,6 +1271,11 @@ class AnnouncementsPreferencesClient {
555
1271
  value: response.headers.get("opc-request-id"),
556
1272
  key: "opcRequestId",
557
1273
  dataType: "string"
1274
+ },
1275
+ {
1276
+ value: response.headers.get("etag"),
1277
+ key: "etag",
1278
+ dataType: "string"
558
1279
  }
559
1280
  ]
560
1281
  });
@@ -566,14 +1287,16 @@ class AnnouncementsPreferencesClient {
566
1287
  });
567
1288
  }
568
1289
  /**
569
- * Gets the current preferences of the tenancy regarding receiving announcements by email.
570
- *
571
- * This operation does not retry by default if the user has not defined a retry configuration.
572
- * @param ListAnnouncementsPreferencesRequest
573
- * @return ListAnnouncementsPreferencesResponse
574
- * @throws OciError when an error occurs
575
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/ListAnnouncementsPreferences.ts.html |here} to see how to use ListAnnouncementsPreferences API.
576
- */
1290
+ * Gets the current preferences of the tenancy regarding receiving announcements by email.
1291
+ * <p>
1292
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
1293
+ *
1294
+ * This operation does not retry by default if the user has not defined a retry configuration.
1295
+ * @param ListAnnouncementsPreferencesRequest
1296
+ * @return ListAnnouncementsPreferencesResponse
1297
+ * @throws OciError when an error occurs
1298
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/ListAnnouncementsPreferences.ts.html |here} to see how to use ListAnnouncementsPreferences API.
1299
+ */
577
1300
  listAnnouncementsPreferences(listAnnouncementsPreferencesRequest) {
578
1301
  return __awaiter(this, void 0, void 0, function* () {
579
1302
  if (this.logger)
@@ -670,14 +1393,16 @@ class AnnouncementsPreferencesClient {
670
1393
  return oci_common_1.paginateResponses(request, req => this.listAnnouncementsPreferences(req));
671
1394
  }
672
1395
  /**
673
- * Updates the preferences of the tenancy regarding receiving announcements by email.
674
- *
675
- * This operation does not retry by default if the user has not defined a retry configuration.
676
- * @param UpdateAnnouncementsPreferenceRequest
677
- * @return UpdateAnnouncementsPreferenceResponse
678
- * @throws OciError when an error occurs
679
- * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.11.1/announcementsservice/UpdateAnnouncementsPreference.ts.html |here} to see how to use UpdateAnnouncementsPreference API.
680
- */
1396
+ * Updates the preferences of the tenancy regarding receiving announcements by email.
1397
+ * <p>
1398
+ This call is subject to an Announcements limit that applies to the total number of requests across all read or write operations. Announcements might throttle this call to reject an otherwise valid request when the total rate of operations exceeds 20 requests per second for a given user. The service might also throttle this call to reject an otherwise valid request when the total rate of operations exceeds 100 requests per second for a given tenancy.
1399
+ *
1400
+ * This operation does not retry by default if the user has not defined a retry configuration.
1401
+ * @param UpdateAnnouncementsPreferenceRequest
1402
+ * @return UpdateAnnouncementsPreferenceResponse
1403
+ * @throws OciError when an error occurs
1404
+ * @example Click {@link https://docs.cloud.oracle.com/en-us/iaas/tools/typescript-sdk-examples/2.14.0/announcementsservice/UpdateAnnouncementsPreference.ts.html |here} to see how to use UpdateAnnouncementsPreference API.
1405
+ */
681
1406
  updateAnnouncementsPreference(updateAnnouncementsPreferenceRequest) {
682
1407
  return __awaiter(this, void 0, void 0, function* () {
683
1408
  if (this.logger)
@@ -735,5 +1460,6 @@ class AnnouncementsPreferencesClient {
735
1460
  }
736
1461
  }
737
1462
  exports.AnnouncementsPreferencesClient = AnnouncementsPreferencesClient;
738
- AnnouncementsPreferencesClient.serviceEndpointTemplate = "https://announcements.{region}.{secondLevelDomain}";
1463
+ AnnouncementsPreferencesClient.serviceEndpointTemplate = "https://announcements.{region}.oci.{secondLevelDomain}";
1464
+ AnnouncementsPreferencesClient.endpointServiceName = "";
739
1465
  //# sourceMappingURL=client.js.map