@google-cloud/monitoring
Version:
Stackdriver Monitoring API client for Node.js
770 lines (769 loc) • 77 kB
TypeScript
import type * as gax from 'google-gax';
import type { Callback, CallOptions, Descriptors, ClientOptions, PaginationCallback } from 'google-gax';
import { Transform } from 'stream';
import * as protos from '../../protos/protos';
/**
* The Notification Channel API provides access to configuration that
* controls how messages related to incidents are sent.
* @class
* @memberof v3
*/
export declare class NotificationChannelServiceClient {
private _terminated;
private _opts;
private _providedCustomServicePath;
private _gaxModule;
private _gaxGrpc;
private _protos;
private _defaults;
private _universeDomain;
private _servicePath;
private _log;
auth: gax.GoogleAuth;
descriptors: Descriptors;
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {
[name: string]: Function;
};
pathTemplates: {
[name: string]: gax.PathTemplate;
};
notificationChannelServiceStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of NotificationChannelServiceClient.
*
* @param {object} [options] - The configuration object.
* The options accepted by the constructor are described in detail
* in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance).
* The common options are:
* @param {object} [options.credentials] - Credentials object.
* @param {string} [options.credentials.client_email]
* @param {string} [options.credentials.private_key]
* @param {string} [options.email] - Account email address. Required when
* using a .pem or .p12 keyFilename.
* @param {string} [options.keyFilename] - Full path to the a .json, .pem, or
* .p12 key downloaded from the Google Developers Console. If you provide
* a path to a JSON file, the projectId option below is not necessary.
* NOTE: .pem and .p12 require you to specify options.email as well.
* @param {number} [options.port] - The port on which to connect to
* the remote host.
* @param {string} [options.projectId] - The project ID from the Google
* Developer's Console, e.g. 'grape-spaceship-123'. We will also check
* the environment variable GCLOUD_PROJECT for your project ID. If your
* app is running in an environment which supports
* {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials},
* your project ID will be detected automatically.
* @param {string} [options.apiEndpoint] - The domain name of the
* API remote host.
* @param {gax.ClientConfig} [options.clientConfig] - Client configuration override.
* Follows the structure of {@link gapicConfig}.
* @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode.
* For more information, please check the
* {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}.
* @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you
* need to avoid loading the default gRPC version and want to use the fallback
* HTTP implementation. Load only fallback version and pass it to the constructor:
* ```
* const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC
* const client = new NotificationChannelServiceClient({fallback: true}, gax);
* ```
*/
constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);
/**
* Initialize the client.
* Performs asynchronous operations (such as authentication) and prepares the client.
* This function will be called automatically when any class method is called for the
* first time, but if you need to initialize it before calling an actual method,
* feel free to call initialize() directly.
*
* You can await on this method if you want to make sure the client is initialized.
*
* @returns {Promise} A promise that resolves to an authenticated service stub.
*/
initialize(): Promise<{
[name: string]: Function;
}>;
/**
* The DNS address for this API service.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get servicePath(): string;
/**
* The DNS address for this API service - same as servicePath.
* @deprecated Use the apiEndpoint method of the client instance.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint(): string;
/**
* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/
get apiEndpoint(): string;
get universeDomain(): string;
/**
* The port for this API service.
* @returns {number} The default port for this service.
*/
static get port(): number;
/**
* The scopes needed to make gRPC calls for every method defined
* in this service.
* @returns {string[]} List of default scopes.
*/
static get scopes(): string[];
getProjectId(): Promise<string>;
getProjectId(callback: Callback<string, undefined, undefined>): void;
/**
* Gets a single channel descriptor. The descriptor indicates which fields
* are expected / permitted for a notification channel of the given type.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The channel type for which to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]/notificationChannelDescriptors/[CHANNEL_TYPE]
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.NotificationChannelDescriptor|NotificationChannelDescriptor}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.get_notification_channel_descriptor.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_GetNotificationChannelDescriptor_async
*/
getNotificationChannelDescriptor(request?: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannelDescriptor,
protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest | undefined,
{} | undefined
]>;
getNotificationChannelDescriptor(request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.INotificationChannelDescriptor, protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest | null | undefined, {} | null | undefined>): void;
getNotificationChannelDescriptor(request: protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest, callback: Callback<protos.google.monitoring.v3.INotificationChannelDescriptor, protos.google.monitoring.v3.IGetNotificationChannelDescriptorRequest | null | undefined, {} | null | undefined>): void;
/**
* Gets a single notification channel. The channel includes the relevant
* configuration details with which the channel was created. However, the
* response may truncate or omit passwords, API keys, or other private key
* matter and thus the response may not be 100% identical to the information
* that was supplied in the call to the create method.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The channel for which to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.get_notification_channel.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_GetNotificationChannel_async
*/
getNotificationChannel(request?: protos.google.monitoring.v3.IGetNotificationChannelRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannel,
protos.google.monitoring.v3.IGetNotificationChannelRequest | undefined,
{} | undefined
]>;
getNotificationChannel(request: protos.google.monitoring.v3.IGetNotificationChannelRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IGetNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
getNotificationChannel(request: protos.google.monitoring.v3.IGetNotificationChannelRequest, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IGetNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
/**
* Creates a new notification channel, representing a single notification
* endpoint such as an email address, SMS number, or PagerDuty service.
*
* Design your application to single-thread API calls that modify the state of
* notification channels in a single project. This includes calls to
* CreateNotificationChannel, DeleteNotificationChannel and
* UpdateNotificationChannel.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The
* [project](https://cloud.google.com/monitoring/api/v3#project_name) on which
* to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* This names the container into which the channel will be
* written, this does not name the newly created channel. The resulting
* channel's name will have a normalized version of this field as a prefix,
* but will add `/notificationChannels/[CHANNEL_ID]` to identify the channel.
* @param {google.monitoring.v3.NotificationChannel} request.notificationChannel
* Required. The definition of the `NotificationChannel` to create.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.create_notification_channel.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_CreateNotificationChannel_async
*/
createNotificationChannel(request?: protos.google.monitoring.v3.ICreateNotificationChannelRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannel,
protos.google.monitoring.v3.ICreateNotificationChannelRequest | undefined,
{} | undefined
]>;
createNotificationChannel(request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.ICreateNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
createNotificationChannel(request: protos.google.monitoring.v3.ICreateNotificationChannelRequest, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.ICreateNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
/**
* Updates a notification channel. Fields not specified in the field mask
* remain unchanged.
*
* Design your application to single-thread API calls that modify the state of
* notification channels in a single project. This includes calls to
* CreateNotificationChannel, DeleteNotificationChannel and
* UpdateNotificationChannel.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.protobuf.FieldMask} [request.updateMask]
* Optional. The fields to update.
* @param {google.monitoring.v3.NotificationChannel} request.notificationChannel
* Required. A description of the changes to be applied to the specified
* notification channel. The description must provide a definition for
* fields to be updated; the names of these fields should also be
* included in the `update_mask`.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.update_notification_channel.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_UpdateNotificationChannel_async
*/
updateNotificationChannel(request?: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannel,
protos.google.monitoring.v3.IUpdateNotificationChannelRequest | undefined,
{} | undefined
]>;
updateNotificationChannel(request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IUpdateNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
updateNotificationChannel(request: protos.google.monitoring.v3.IUpdateNotificationChannelRequest, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IUpdateNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
/**
* Deletes a notification channel.
*
* Design your application to single-thread API calls that modify the state of
* notification channels in a single project. This includes calls to
* CreateNotificationChannel, DeleteNotificationChannel and
* UpdateNotificationChannel.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The channel for which to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]
* @param {boolean} request.force
* If true, the notification channel will be deleted regardless of its
* use in alert policies (the policies will be updated to remove the
* channel). If false, this operation will fail if the notification channel
* is referenced by existing alerting policies.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.delete_notification_channel.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_DeleteNotificationChannel_async
*/
deleteNotificationChannel(request?: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.monitoring.v3.IDeleteNotificationChannelRequest | undefined,
{} | undefined
]>;
deleteNotificationChannel(request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
deleteNotificationChannel(request: protos.google.monitoring.v3.IDeleteNotificationChannelRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.IDeleteNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
/**
* Causes a verification code to be delivered to the channel. The code
* can then be supplied in `VerifyNotificationChannel` to verify the channel.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The notification channel to which to send a verification code.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.send_notification_channel_verification_code.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_SendNotificationChannelVerificationCode_async
*/
sendNotificationChannelVerificationCode(request?: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, options?: CallOptions): Promise<[
protos.google.protobuf.IEmpty,
protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest | undefined,
{} | undefined
]>;
sendNotificationChannelVerificationCode(request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest | null | undefined, {} | null | undefined>): void;
sendNotificationChannelVerificationCode(request: protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.monitoring.v3.ISendNotificationChannelVerificationCodeRequest | null | undefined, {} | null | undefined>): void;
/**
* Requests a verification code for an already verified channel that can then
* be used in a call to VerifyNotificationChannel() on a different channel
* with an equivalent identity in the same or in a different project. This
* makes it possible to copy a channel between projects without requiring
* manual reverification of the channel. If the channel is not in the
* verified state, this method will fail (in other words, this may only be
* used if the SendNotificationChannelVerificationCode and
* VerifyNotificationChannel paths have already been used to put the given
* channel into the verified state).
*
* There is no guarantee that the verification codes returned by this method
* will be of a similar structure or form as the ones that are delivered
* to the channel via SendNotificationChannelVerificationCode; while
* VerifyNotificationChannel() will recognize both the codes delivered via
* SendNotificationChannelVerificationCode() and returned from
* GetNotificationChannelVerificationCode(), it is typically the case that
* the verification codes delivered via
* SendNotificationChannelVerificationCode() will be shorter and also
* have a shorter expiration (e.g. codes such as "G-123456") whereas
* GetVerificationCode() will typically return a much longer, websafe base
* 64 encoded string that has a longer expiration time.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The notification channel for which a verification code is to be
* generated and retrieved. This must name a channel that is already verified;
* if the specified channel is not verified, the request will fail.
* @param {google.protobuf.Timestamp} request.expireTime
* The desired expiration time. If specified, the API will guarantee that
* the returned code will not be valid after the specified timestamp;
* however, the API cannot guarantee that the returned code will be
* valid for at least as long as the requested time (the API puts an upper
* bound on the amount of time for which a code may be valid). If omitted,
* a default expiration will be used, which may be less than the max
* permissible expiration (so specifying an expiration may extend the
* code's lifetime over omitting an expiration, even though the API does
* impose an upper limit on the maximum expiration that is permitted).
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.GetNotificationChannelVerificationCodeResponse|GetNotificationChannelVerificationCodeResponse}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.get_notification_channel_verification_code.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_GetNotificationChannelVerificationCode_async
*/
getNotificationChannelVerificationCode(request?: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse,
protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest | undefined,
{} | undefined
]>;
getNotificationChannelVerificationCode(request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest | null | undefined, {} | null | undefined>): void;
getNotificationChannelVerificationCode(request: protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest, callback: Callback<protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeResponse, protos.google.monitoring.v3.IGetNotificationChannelVerificationCodeRequest | null | undefined, {} | null | undefined>): void;
/**
* Verifies a `NotificationChannel` by proving receipt of the code
* delivered to the channel as a result of calling
* `SendNotificationChannelVerificationCode`.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The notification channel to verify.
* @param {string} request.code
* Required. The verification code that was delivered to the channel as
* a result of invoking the `SendNotificationChannelVerificationCode` API
* method or that was retrieved from a verified channel via
* `GetNotificationChannelVerificationCode`. For example, one might have
* "G-123456" or "TKNZGhhd2EyN3I1MnRnMjRv" (in general, one is only
* guaranteed that the code is valid UTF-8; one should not
* make any assumptions regarding the structure or format of the code).
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is an object representing {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.verify_notification_channel.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_VerifyNotificationChannel_async
*/
verifyNotificationChannel(request?: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannel,
protos.google.monitoring.v3.IVerifyNotificationChannelRequest | undefined,
{} | undefined
]>;
verifyNotificationChannel(request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, options: CallOptions, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IVerifyNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
verifyNotificationChannel(request: protos.google.monitoring.v3.IVerifyNotificationChannelRequest, callback: Callback<protos.google.monitoring.v3.INotificationChannel, protos.google.monitoring.v3.IVerifyNotificationChannelRequest | null | undefined, {} | null | undefined>): void;
/**
* Lists the descriptors for supported channel types. The use of descriptors
* makes it possible for new channel types to be dynamically added.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The REST resource name of the parent from which to retrieve
* the notification channel descriptors. The expected syntax is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* Note that this
* [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent
* container in which to look for the descriptors; to retrieve a single
* descriptor by name, use the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor}
* operation, instead.
* @param {number} request.pageSize
* The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} request.pageToken
* If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.monitoring.v3.NotificationChannelDescriptor|NotificationChannelDescriptor}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listNotificationChannelDescriptorsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listNotificationChannelDescriptors(request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannelDescriptor[],
protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest | null,
protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse
]>;
listNotificationChannelDescriptors(request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse | null | undefined, protos.google.monitoring.v3.INotificationChannelDescriptor>): void;
listNotificationChannelDescriptors(request: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, callback: PaginationCallback<protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, protos.google.monitoring.v3.IListNotificationChannelDescriptorsResponse | null | undefined, protos.google.monitoring.v3.INotificationChannelDescriptor>): void;
/**
* Equivalent to `listNotificationChannelDescriptors`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The REST resource name of the parent from which to retrieve
* the notification channel descriptors. The expected syntax is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* Note that this
* [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent
* container in which to look for the descriptors; to retrieve a single
* descriptor by name, use the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor}
* operation, instead.
* @param {number} request.pageSize
* The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} request.pageToken
* If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.monitoring.v3.NotificationChannelDescriptor|NotificationChannelDescriptor} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listNotificationChannelDescriptorsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listNotificationChannelDescriptorsStream(request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listNotificationChannelDescriptors`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The REST resource name of the parent from which to retrieve
* the notification channel descriptors. The expected syntax is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* Note that this
* [names](https://cloud.google.com/monitoring/api/v3#project_name) the parent
* container in which to look for the descriptors; to retrieve a single
* descriptor by name, use the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannelDescriptor|GetNotificationChannelDescriptor}
* operation, instead.
* @param {number} request.pageSize
* The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} request.pageToken
* If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.monitoring.v3.NotificationChannelDescriptor|NotificationChannelDescriptor}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.list_notification_channel_descriptors.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_ListNotificationChannelDescriptors_async
*/
listNotificationChannelDescriptorsAsync(request?: protos.google.monitoring.v3.IListNotificationChannelDescriptorsRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.v3.INotificationChannelDescriptor>;
/**
* Lists the notification channels that have been created for the project.
* To list the types of notification channels that are supported, use
* the `ListNotificationChannelDescriptors` method.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The
* [project](https://cloud.google.com/monitoring/api/v3#project_name) on which
* to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* This names the container
* in which to look for the notification channels; it does not name a
* specific channel. To query a specific channel by REST resource name, use
* the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`}
* operation.
* @param {string} [request.filter]
* Optional. If provided, this field specifies the criteria that must be met
* by notification channels to be included in the response.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {string} [request.orderBy]
* Optional. A comma-separated list of fields by which to sort the result.
* Supports the same set of fields as in `filter`. Entries can be prefixed
* with a minus sign to sort in descending rather than ascending order.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {number} [request.pageSize]
* Optional. The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} [request.pageToken]
* Optional. If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Promise} - The promise which resolves to an array.
* The first element of the array is Array of {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
* Note that it can affect your quota.
* We recommend using `listNotificationChannelsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listNotificationChannels(request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, options?: CallOptions): Promise<[
protos.google.monitoring.v3.INotificationChannel[],
protos.google.monitoring.v3.IListNotificationChannelsRequest | null,
protos.google.monitoring.v3.IListNotificationChannelsResponse
]>;
listNotificationChannels(request: protos.google.monitoring.v3.IListNotificationChannelsRequest, options: CallOptions, callback: PaginationCallback<protos.google.monitoring.v3.IListNotificationChannelsRequest, protos.google.monitoring.v3.IListNotificationChannelsResponse | null | undefined, protos.google.monitoring.v3.INotificationChannel>): void;
listNotificationChannels(request: protos.google.monitoring.v3.IListNotificationChannelsRequest, callback: PaginationCallback<protos.google.monitoring.v3.IListNotificationChannelsRequest, protos.google.monitoring.v3.IListNotificationChannelsResponse | null | undefined, protos.google.monitoring.v3.INotificationChannel>): void;
/**
* Equivalent to `listNotificationChannels`, but returns a NodeJS Stream object.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The
* [project](https://cloud.google.com/monitoring/api/v3#project_name) on which
* to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* This names the container
* in which to look for the notification channels; it does not name a
* specific channel. To query a specific channel by REST resource name, use
* the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`}
* operation.
* @param {string} [request.filter]
* Optional. If provided, this field specifies the criteria that must be met
* by notification channels to be included in the response.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {string} [request.orderBy]
* Optional. A comma-separated list of fields by which to sort the result.
* Supports the same set of fields as in `filter`. Entries can be prefixed
* with a minus sign to sort in descending rather than ascending order.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {number} [request.pageSize]
* Optional. The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} [request.pageToken]
* Optional. If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Stream}
* An object stream which emits an object representing {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listNotificationChannelsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
*/
listNotificationChannelsStream(request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listNotificationChannels`, but returns an iterable object.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The
* [project](https://cloud.google.com/monitoring/api/v3#project_name) on which
* to execute the request. The format is:
*
* projects/[PROJECT_ID_OR_NUMBER]
*
* This names the container
* in which to look for the notification channels; it does not name a
* specific channel. To query a specific channel by REST resource name, use
* the
* {@link protos.google.monitoring.v3.NotificationChannelService.GetNotificationChannel|`GetNotificationChannel`}
* operation.
* @param {string} [request.filter]
* Optional. If provided, this field specifies the criteria that must be met
* by notification channels to be included in the response.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {string} [request.orderBy]
* Optional. A comma-separated list of fields by which to sort the result.
* Supports the same set of fields as in `filter`. Entries can be prefixed
* with a minus sign to sort in descending rather than ascending order.
*
* For more details, see [sorting and
* filtering](https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).
* @param {number} [request.pageSize]
* Optional. The maximum number of results to return in a single response. If
* not set to a positive number, a reasonable value will be chosen by the
* service.
* @param {string} [request.pageToken]
* Optional. If non-empty, `page_token` must contain a value returned as the
* `next_page_token` in a previous response to request the next set
* of results.
* @param {object} [options]
* Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details.
* @returns {Object}
* An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }.
* When you iterate the returned iterable, each element will be an object representing
* {@link protos.google.monitoring.v3.NotificationChannel|NotificationChannel}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation }
* for more details and examples.
* @example <caption>include:samples/generated/v3/notification_channel_service.list_notification_channels.js</caption>
* region_tag:monitoring_v3_generated_NotificationChannelService_ListNotificationChannels_async
*/
listNotificationChannelsAsync(request?: protos.google.monitoring.v3.IListNotificationChannelsRequest, options?: CallOptions): AsyncIterable<protos.google.monitoring.v3.INotificationChannel>;
/**
* Return a fully-qualified folderAlertPolicy resource name string.
*
* @param {string} folder
* @param {string} alert_policy
* @returns {string} Resource name string.
*/
folderAlertPolicyPath(folder: string, alertPolicy: string): string;
/**
* Parse the folder from FolderAlertPolicy resource.
*
* @param {string} folderAlertPolicyName
* A fully-qualified path representing folder_alert_policy resource.
* @returns {string} A string representing the folder.
*/
matchFolderFromFolderAlertPolicyName(folderAlertPolicyName: string): string | number;
/**
* Parse the alert_policy from FolderAlertPolicy resource.
*
* @param {string} folderAlertPolicyName
* A fully-qualified path representing folder_alert_policy resource.
* @returns {string} A string representing the alert_policy.
*/
matchAlertPolicyFromFolderAlertPolicyName(folderAlertPolicyName: string): string | number;
/**
* Return a fully-qualified folderAlertPolicyCondition resource name string.
*
* @param {string} folder
* @param {string} alert_policy
* @param {string} condition
* @returns {string} Resource name string.
*/
folderAlertPolicyConditionPath(folder: string, alertPolicy: string, condition: string): string;
/**
* Parse the folder from FolderAlertPolicyCondition resource.
*
* @param {string} folderAlertPolicyConditionName
* A fully-qualified path representing folder_alert_policy_condition resource.
* @returns {string} A string representing the folder.
*/
matchFolderFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;
/**
* Parse the alert_policy from FolderAlertPolicyCondition resource.
*
* @param {string} folderAlertPolicyConditionName
* A fully-qualified path representing folder_alert_policy_condition resource.
* @returns {string} A string representing the alert_policy.
*/
matchAlertPolicyFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;
/**
* Parse the condition from FolderAlertPolicyCondition resource.
*
* @param {string} folderAlertPolicyConditionName
* A fully-qualified path representing folder_alert_policy_condition resource.
* @returns {string} A string representing the condition.
*/
matchConditionFromFolderAlertPolicyConditionName(folderAlertPolicyConditionName: string): string | number;
/**
* Return a fully-qualified folderChannelDescriptor resource name string.
*
* @param {string} folder
* @param {string} channel_descriptor
* @returns {string} Resource name string.
*/
folderChannelDescriptorPath(folder: string, channelDescriptor: string): string;
/**
* Parse the folder from FolderChannelDescriptor resource.
*
* @param {string} folderChannelDescriptorName
* A fully-qualified path representing folder_channel_descriptor resource.
* @returns {string} A string representing the folder.
*/
matchFolderFromFolderChannelDescriptorName(folderChannelDescriptorName: string): string | number;
/**
* Parse the channel_descriptor from FolderChannelDescriptor resource.
*
* @param {string} folderChannelDescriptorName
* A fully-qualified path representing folder_channel_descriptor resource.
* @returns {string} A string representing the channel_descriptor.
*/
matchChannelDescriptorFromFolderChannelDescriptorName(folderChannelDescriptorName: string): string | number;
/**
* Return a fully-qualified folderGroup resource name string.
*
* @param {string} folder
* @param {string} group
* @returns {string} Resource name string.
*/
folderGroupPath(folder: string, group: string): string;
/**
* Parse the folder from FolderGroup resource.
*