/**
 * Notifications API
 * Use the Notifications API to broadcast messages to distributed components by topic, using a publish-subscribe pattern.
For information about managing topics, subscriptions, and messages, see [Notifications Overview](/iaas/Content/Notification/Concepts/notificationoverview.htm).

 * OpenAPI spec version: 20181201
 *
 *
 * NOTE: This class is auto generated by OracleSDKGenerator.
 * Do not edit the class manually.
 *
 * Copyright (c) 2020, 2022, Oracle and/or its affiliates.  All rights reserved.
 * 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.
 */ import common = require ( "oci-common" ) ; import * as requests from "./request" ; import * as model from "./model" ; import * as responses from "./response" ; import { paginateRecords , paginateResponses } from "oci-common" ; import { NotificationDataPlaneWaiter } from "./notificationdataplane-waiter" ; import { composeResponse , composeRequest , GenericRetrier } from "oci-common" ; export enum NotificationControlPlaneApiKeys { } /**
 * This service client uses  common . CircuitBreaker . DefaultConfiguration for all the operations by default if no circuit breaker configuration is defined by the user.
  export class NotificationControlPlaneClient { protected static serviceEndpointTemplate = "https://notification.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_clientConfiguration" : common . ClientConfiguration ; protected _circuitBreaker = null ; protected _httpClient : common . HttpClient ; constructor ( params , clientConfiguration ? ) { const requestSigner = params . authenticationDetailsProvider ? new common . DefaultRequestSigner ( params . authenticationDetailsProvider ) : null ; if ( clientConfiguration ) { this . _clientConfiguration = clientConfiguration ; this . _circuitBreaker = clientConfiguration . circuitBreaker ? clientConfiguration . circuitBreaker ! . circuit : null ; } const specCircuitBreakerEnabled = true ; if ( ! this . _circuitBreaker && common . utils . isCircuitBreakerSystemEnabled ( clientConfiguration ! ) && ( specCircuitBreakerEnabled || common . CircuitBreaker . DefaultCircuitBreakerOverriden ) ) { this . _circuitBreaker = new common . CircuitBreaker ( ) . circuit ; } this . _httpClient = params . httpClient || new common . FetchHttpClient ( requestSigner , this . _circuitBreaker ) ; if ( params . authenticationDetailsProvider && common . isRegionProvider ( params . authenticationDetailsProvider ) ) { const provider = params . authenticationDetailsProvider ; if ( provider . getRegion ( ) ) { this . region = provider . getRegion ( ) ; } } } /**
     * Get the endpoint that is being used to call (ex, https://www.example.com).
     */ public get endpoint ( ) { return this . _endpoint ; } param endpoint public set endpoint ( endpoint ) { this . _endpoint = endpoint ; this . _endpoint = this . _endpoint + "/20181201" ; if ( this . logger ) this . logger . info ( `NotificationControlPlaneClient endpoint set to ${ this . _endpoint }` ) ; } public get logger ( ) { return common . LOG . logger ; } /**
     * Sets the region to call (ex, Region.US_PHOENIX_1).
     * Note, this will call  {@link #endpoint(String) endpoint} after resolving the endpoint.
     *  param region public set region ( region ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegion ( NotificationControlPlaneClient . serviceEndpointTemplate , region ) ; } /**
     * Sets the regionId to call (ex, 'us-phoenix-1').
     *
     * Note, this will first try to map the region ID to a known Region and call  {@link #region(Region) region} .
     * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
     * and then call  {@link #endpoint(String) endpoint} .
     *  param regionId public set regionId ( regionId ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegionId ( NotificationControlPlaneClient . serviceEndpointTemplate , regionId ) ; } param ChangeTopicCompartmentRequest return throws example Click  https to see how to use ChangeTopicCompartment API.
        public async changeTopicCompartment ( changeTopicCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#changeTopicCompartment." ) ; const pathParams = { "{topicId}" : changeTopicCompartmentRequest . topicId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : changeTopicCompartmentRequest . opcRetryToken , "opc-request-id" : changeTopicCompartmentRequest . opcRequestId , "if-match" : changeTopicCompartmentRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeTopicCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics/{topicId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeTopicCompartmentRequest . changeTopicCompartmentDetails , "ChangeCompartmentDetails" , model . ChangeCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeTopicCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateTopicRequest return throws example Click  https to see how to use CreateTopic API.
        public async createTopic ( createTopicRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#createTopic." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createTopicRequest . opcRetryToken , "opc-request-id" : createTopicRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createTopicRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createTopicRequest . createTopicDetails , "CreateTopicDetails" , model . CreateTopicDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateTopicResponse > { } , body : await response . json ( ) , bodyKey : "notificationTopic" , bodyModel : model . NotificationTopic , type : "model.NotificationTopic" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteTopicRequest return throws example Click  https to see how to use DeleteTopic API.
        public async deleteTopic ( deleteTopicRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#deleteTopic." ) ; const pathParams = { "{topicId}" : deleteTopicRequest . topicId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : deleteTopicRequest . opcRequestId , "if-match" : deleteTopicRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteTopicRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics/{topicId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteTopicResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetTopicRequest return throws example Click  https to see how to use GetTopic API.
      public async getTopic ( getTopicRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#getTopic." ) ; const pathParams = { "{topicId}" : getTopicRequest . topicId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getTopicRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getTopicRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics/{topicId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetTopicResponse > { } , body : await response . json ( ) , bodyKey : "notificationTopic" , bodyModel : model . NotificationTopic , type : "model.NotificationTopic" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListTopicsRequest return throws example Click  https to see how to use ListTopics API.
        public async listTopics ( listTopicsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#listTopics." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listTopicsRequest . compartmentId , "id" : listTopicsRequest . id , "name" : listTopicsRequest . name , "page" : listTopicsRequest . page , "limit" : listTopicsRequest . limit , "sortBy" : listTopicsRequest . sortBy , "sortOrder" : listTopicsRequest . sortOrder , "lifecycleState" : listTopicsRequest . lifecycleState } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listTopicsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listTopicsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListTopicsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . NotificationTopicSummary , type : "Array<model.NotificationTopicSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-previous-page" ) , key : "opcPreviousPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllTopics ( request ) { return paginateRecords ( request , req => this . listTopics ( req ) ) ; } param request public listAllTopicsResponses ( request ) { return paginateResponses ( request , req => this . listTopics ( req ) ) ; } param request public listTopicsRecordIterator ( request ) { return paginateRecords ( request , req => this . listTopics ( req ) ) ; } param request public listTopicsResponseIterator ( request ) { return paginateResponses ( request , req => this . listTopics ( req ) ) ; } param UpdateTopicRequest return throws example Click  https to see how to use UpdateTopic API.
        public async updateTopic ( updateTopicRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationControlPlaneClient#updateTopic." ) ; const pathParams = { "{topicId}" : updateTopicRequest . topicId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : updateTopicRequest . opcRequestId , "if-match" : updateTopicRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateTopicRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics/{topicId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateTopicRequest . topicAttributesDetails , "TopicAttributesDetails" , model . TopicAttributesDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateTopicResponse > { } , body : await response . json ( ) , bodyKey : "notificationTopic" , bodyModel : model . NotificationTopic , type : "model.NotificationTopic" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } } export enum NotificationDataPlaneApiKeys { } /**
 * This service client uses  common . CircuitBreaker . DefaultConfiguration for all the operations by default if no circuit breaker configuration is defined by the user.
  export class NotificationDataPlaneClient { protected static serviceEndpointTemplate = "https://notification.{region}.{secondLevelDomain}" ; protected "_endpoint" : string = "" ; protected "_defaultHeaders" : any = { } ; protected "_waiters" : NotificationDataPlaneWaiter ; protected "_clientConfiguration" : common . ClientConfiguration ; protected _circuitBreaker = null ; protected _httpClient : common . HttpClient ; constructor ( params , clientConfiguration ? ) { const requestSigner = params . authenticationDetailsProvider ? new common . DefaultRequestSigner ( params . authenticationDetailsProvider ) : null ; if ( clientConfiguration ) { this . _clientConfiguration = clientConfiguration ; this . _circuitBreaker = clientConfiguration . circuitBreaker ? clientConfiguration . circuitBreaker ! . circuit : null ; } const specCircuitBreakerEnabled = true ; if ( ! this . _circuitBreaker && common . utils . isCircuitBreakerSystemEnabled ( clientConfiguration ! ) && ( specCircuitBreakerEnabled || common . CircuitBreaker . DefaultCircuitBreakerOverriden ) ) { this . _circuitBreaker = new common . CircuitBreaker ( ) . circuit ; } this . _httpClient = params . httpClient || new common . FetchHttpClient ( requestSigner , this . _circuitBreaker ) ; if ( params . authenticationDetailsProvider && common . isRegionProvider ( params . authenticationDetailsProvider ) ) { const provider = params . authenticationDetailsProvider ; if ( provider . getRegion ( ) ) { this . region = provider . getRegion ( ) ; } } } /**
     * Get the endpoint that is being used to call (ex, https://www.example.com).
     */ public get endpoint ( ) { return this . _endpoint ; } param endpoint public set endpoint ( endpoint ) { this . _endpoint = endpoint ; this . _endpoint = this . _endpoint + "/20181201" ; if ( this . logger ) this . logger . info ( `NotificationDataPlaneClient endpoint set to ${ this . _endpoint }` ) ; } public get logger ( ) { return common . LOG . logger ; } /**
     * Sets the region to call (ex, Region.US_PHOENIX_1).
     * Note, this will call  {@link #endpoint(String) endpoint} after resolving the endpoint.
     *  param region public set region ( region ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegion ( NotificationDataPlaneClient . serviceEndpointTemplate , region ) ; } /**
     * Sets the regionId to call (ex, 'us-phoenix-1').
     *
     * Note, this will first try to map the region ID to a known Region and call  {@link #region(Region) region} .
     * If no known Region could be determined, it will create an endpoint assuming its in default Realm OC1
     * and then call  {@link #endpoint(String) endpoint} .
     *  param regionId public set regionId ( regionId ) { this . endpoint = common . EndpointBuilder . createEndpointFromRegionId ( NotificationDataPlaneClient . serviceEndpointTemplate , regionId ) ; } param config return public createWaiters ( config ? ) { this . _waiters = new NotificationDataPlaneWaiter ( this , config ) ; return this . _waiters ; } return public getWaiters ( ) { if ( this . _waiters ) { return this . _waiters ; } throw Error ( "Waiters do not exist. Please create waiters." ) ; } param ChangeSubscriptionCompartmentRequest return throws example Click  https to see how to use ChangeSubscriptionCompartment API.
        public async changeSubscriptionCompartment ( changeSubscriptionCompartmentRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#changeSubscriptionCompartment." ) ; const pathParams = { "{subscriptionId}" : changeSubscriptionCompartmentRequest . subscriptionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : changeSubscriptionCompartmentRequest . opcRetryToken , "opc-request-id" : changeSubscriptionCompartmentRequest . opcRequestId , "if-match" : changeSubscriptionCompartmentRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , changeSubscriptionCompartmentRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{subscriptionId}/actions/changeCompartment" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( changeSubscriptionCompartmentRequest . changeSubscriptionCompartmentDetails , "ChangeCompartmentDetails" , model . ChangeCompartmentDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ChangeSubscriptionCompartmentResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param CreateSubscriptionRequest return throws example Click  https to see how to use CreateSubscription API.
        public async createSubscription ( createSubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#createSubscription." ) ; const pathParams = { } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-retry-token" : createSubscriptionRequest . opcRetryToken , "opc-request-id" : createSubscriptionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , createSubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( createSubscriptionRequest . createSubscriptionDetails , "CreateSubscriptionDetails" , model . CreateSubscriptionDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . CreateSubscriptionResponse > { } , body : await response . json ( ) , bodyKey : "subscription" , bodyModel : model . Subscription , type : "model.Subscription" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param DeleteSubscriptionRequest return throws example Click  https to see how to use DeleteSubscription API.
        public async deleteSubscription ( deleteSubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#deleteSubscription." ) ; const pathParams = { "{subscriptionId}" : deleteSubscriptionRequest . subscriptionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : deleteSubscriptionRequest . opcRequestId , "if-match" : deleteSubscriptionRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , deleteSubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{subscriptionId}" , method : "DELETE" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . DeleteSubscriptionResponse > { } , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetConfirmSubscriptionRequest return throws example Click  https to see how to use GetConfirmSubscription API.
        public async getConfirmSubscription ( getConfirmSubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#getConfirmSubscription." ) ; const pathParams = { "{id}" : getConfirmSubscriptionRequest . id } ; const queryParams = { "token" : getConfirmSubscriptionRequest . token , "protocol" : getConfirmSubscriptionRequest . protocol } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getConfirmSubscriptionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getConfirmSubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{id}/confirmation" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetConfirmSubscriptionResponse > { } , body : await response . json ( ) , bodyKey : "confirmationResult" , bodyModel : model . ConfirmationResult , type : "model.ConfirmationResult" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetSubscriptionRequest return throws example Click  https to see how to use GetSubscription API.
        public async getSubscription ( getSubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#getSubscription." ) ; const pathParams = { "{subscriptionId}" : getSubscriptionRequest . subscriptionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getSubscriptionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getSubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{subscriptionId}" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetSubscriptionResponse > { } , body : await response . json ( ) , bodyKey : "subscription" , bodyModel : model . Subscription , type : "model.Subscription" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param GetUnsubscriptionRequest return throws example Click  https to see how to use GetUnsubscription API.
        public async getUnsubscription ( getUnsubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#getUnsubscription." ) ; const pathParams = { "{id}" : getUnsubscriptionRequest . id } ; const queryParams = { "token" : getUnsubscriptionRequest . token , "protocol" : getUnsubscriptionRequest . protocol } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : getUnsubscriptionRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , getUnsubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{id}/unsubscription" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . GetUnsubscriptionResponse > { } , body : await response . json ( ) , bodyKey : "value" , bodyModel : "string" , type : "string" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ListSubscriptionsRequest return throws example Click  https to see how to use ListSubscriptions API.
        public async listSubscriptions ( listSubscriptionsRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#listSubscriptions." ) ; const pathParams = { } ; const queryParams = { "compartmentId" : listSubscriptionsRequest . compartmentId , "topicId" : listSubscriptionsRequest . topicId , "page" : listSubscriptionsRequest . page , "limit" : listSubscriptionsRequest . limit } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : listSubscriptionsRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , listSubscriptionsRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions" , method : "GET" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ListSubscriptionsResponse > { } , body : await response . json ( ) , bodyKey : "items" , bodyModel : model . SubscriptionSummary , type : "Array<model.SubscriptionSummary>" , responseHeaders : [ { value : response . headers . get ( "opc-next-page" ) , key : "opcNextPage" , dataType : "string" } , { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param request public listAllSubscriptions ( request ) { return paginateRecords ( request , req => this . listSubscriptions ( req ) ) ; } param request public listAllSubscriptionsResponses ( request ) { return paginateResponses ( request , req => this . listSubscriptions ( req ) ) ; } param request public listSubscriptionsRecordIterator ( request ) { return paginateRecords ( request , req => this . listSubscriptions ( req ) ) ; } param request public listSubscriptionsResponseIterator ( request ) { return paginateResponses ( request , req => this . listSubscriptions ( req ) ) ; } /**
       * Publishes a message to the specified topic.
  * <p>
  The topic endpoint is required for this operation.
  * To get the topic endpoint, use  {@link #getTopic(GetTopicRequest) getTopic} * and review the `apiEndpoint` value in the response ( NotificationTopic ).
  * <p>
  Limits information follows.
  * <p>
  Message size limit per request: 64KB.
  * <p>
  Message delivery rate limit per endpoint: 60 messages per minute for HTTP-based protocols, 10 messages per minute for the `EMAIL` protocol.
  * HTTP-based protocols use URL endpoints that begin with \"http:\" or \"https:\".
  * <p>
  Transactions Per Minute (TPM) per-tenancy limit for this operation: 60 per topic. (This TPM limit represents messages per minute.)
  * <p>
  For more information about publishing messages, see [Publishing Messages](https://docs.cloud.oracle.com/iaas/Content/Notification/Tasks/publishingmessages.htm).
  * For steps to request a limit increase, see [Requesting a Service Limit Increase](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/servicelimits.htm#three).
  *
       * This operation does not retry by default if the user has not defined a retry configuration.
       *  param PublishMessageRequest return throws example Click  https to see how to use PublishMessage API.
        public async publishMessage ( publishMessageRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#publishMessage." ) ; const pathParams = { "{topicId}" : publishMessageRequest . topicId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : publishMessageRequest . opcRequestId , "messageType" : publishMessageRequest . messageType } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , publishMessageRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/topics/{topicId}/messages" , method : "POST" , bodyContent : common . ObjectSerializer . serialize ( publishMessageRequest . messageDetails , "MessageDetails" , model . MessageDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . PublishMessageResponse > { } , body : await response . json ( ) , bodyKey : "publishResult" , bodyModel : model . PublishResult , type : "model.PublishResult" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param ResendSubscriptionConfirmationRequest return throws example Click  https to see how to use ResendSubscriptionConfirmation API.
        public async resendSubscriptionConfirmation ( resendSubscriptionConfirmationRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#resendSubscriptionConfirmation." ) ; const pathParams = { "{id}" : resendSubscriptionConfirmationRequest . id } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : resendSubscriptionConfirmationRequest . opcRequestId } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , resendSubscriptionConfirmationRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{id}/resendConfirmation" , method : "POST" , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . ResendSubscriptionConfirmationResponse > { } , body : await response . json ( ) , bodyKey : "subscription" , bodyModel : model . Subscription , type : "model.Subscription" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } param UpdateSubscriptionRequest return throws example Click  https to see how to use UpdateSubscription API.
        public async updateSubscription ( updateSubscriptionRequest ) { if ( this . logger ) this . logger . debug ( "Calling operation NotificationDataPlaneClient#updateSubscription." ) ; const pathParams = { "{subscriptionId}" : updateSubscriptionRequest . subscriptionId } ; const queryParams = { } ; let headerParams = { "Content-Type" : common . Constants . APPLICATION_JSON , "opc-request-id" : updateSubscriptionRequest . opcRequestId , "if-match" : updateSubscriptionRequest . ifMatch } ; const specRetryConfiguration = common . NoRetryConfigurationDetails ; const retrier = GenericRetrier . createPreferredRetrier ( this . _clientConfiguration ? this . _clientConfiguration . retryConfiguration : undefined , updateSubscriptionRequest . retryConfiguration , specRetryConfiguration ) ; if ( this . logger ) retrier . logger = this . logger ; const request = await composeRequest ( { baseEndpoint : this . _endpoint , defaultHeaders : this . _defaultHeaders , path : "/subscriptions/{subscriptionId}" , method : "PUT" , bodyContent : common . ObjectSerializer . serialize ( updateSubscriptionRequest . updateSubscriptionDetails , "UpdateSubscriptionDetails" , model . UpdateSubscriptionDetails . getJsonObj ) , pathParams : pathParams , headerParams : headerParams , queryParams : queryParams } ) ; try { const response = await retrier . makeServiceCall ( this . _httpClient , request ) ; const sdkResponse = composeResponse ( { responseObject : < responses . UpdateSubscriptionResponse > { } , body : await response . json ( ) , bodyKey : "updateSubscriptionDetails" , bodyModel : model . UpdateSubscriptionDetails , type : "model.UpdateSubscriptionDetails" , responseHeaders : [ { value : response . headers . get ( "opc-request-id" ) , key : "opcRequestId" , dataType : "string" } , { value : response . headers . get ( "etag" ) , key : "etag" , dataType : "string" } ] } ) ; return sdkResponse ; } catch ( err ) { throw err ; } } }