UNPKG

@google-cloud/chronicle

Version:
776 lines 75.8 kB
import type * as gax from 'google-gax'; import type { Callback, CallOptions, Descriptors, ClientOptions, LROperation, PaginationCallback } from 'google-gax'; import { Transform } from 'stream'; import * as protos from '../../protos/protos'; /** * RuleService provides interface for user-created rules. * @class * @memberof v1 */ export declare class RuleServiceClient { 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; }; operationsClient: gax.OperationsClient; ruleServiceStub?: Promise<{ [name: string]: Function; }>; /** * Construct an instance of RuleServiceClient. * * @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 RuleServiceClient({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; /** * Creates a new Rule. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent resource where this rule will be created. * Format: `projects/{project}/locations/{location}/instances/{instance}` * @param {google.cloud.chronicle.v1.Rule} request.rule * Required. The rule 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.cloud.chronicle.v1.Rule|Rule}. * 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/v1/rule_service.create_rule.js</caption> * region_tag:chronicle_v1_generated_RuleService_CreateRule_async */ createRule(request?: protos.google.cloud.chronicle.v1.ICreateRuleRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | undefined, {} | undefined ]>; createRule(request: protos.google.cloud.chronicle.v1.ICreateRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>): void; createRule(request: protos.google.cloud.chronicle.v1.ICreateRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.ICreateRuleRequest | null | undefined, {} | null | undefined>): void; /** * Gets a Rule. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the rule to retrieve. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {google.cloud.chronicle.v1.RuleView} request.view * The view field indicates the scope of fields to populate for the Rule being * returned. If unspecified, defaults to FULL. * @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.cloud.chronicle.v1.Rule|Rule}. * 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/v1/rule_service.get_rule.js</caption> * region_tag:chronicle_v1_generated_RuleService_GetRule_async */ getRule(request?: protos.google.cloud.chronicle.v1.IGetRuleRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | undefined, {} | undefined ]>; getRule(request: protos.google.cloud.chronicle.v1.IGetRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>): void; getRule(request: protos.google.cloud.chronicle.v1.IGetRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IGetRuleRequest | null | undefined, {} | null | undefined>): void; /** * Updates a Rule. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.chronicle.v1.Rule} request.rule * Required. The rule to update. * * The rule's `name` field is used to identify the rule to update. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {google.protobuf.FieldMask} request.updateMask * The list of fields to update. If not included, all fields with a non-empty * value will be overwritten. * @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.cloud.chronicle.v1.Rule|Rule}. * 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/v1/rule_service.update_rule.js</caption> * region_tag:chronicle_v1_generated_RuleService_UpdateRule_async */ updateRule(request?: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | undefined, {} | undefined ]>; updateRule(request: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>): void; updateRule(request: protos.google.cloud.chronicle.v1.IUpdateRuleRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRule, protos.google.cloud.chronicle.v1.IUpdateRuleRequest | null | undefined, {} | null | undefined>): void; /** * Deletes a Rule. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the rule to delete. A rule revision timestamp cannot * be specified as part of the name, as deleting specific revisions is not * supported. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {boolean} [request.force] * Optional. If set to true, any retrohunts and any detections associated with * the rule will also be deleted. If set to false, the call will only succeed * if the rule has no associated retrohunts, including completed retrohunts, * and no associated detections. Regardless of this field's value, the rule * deployment associated with this rule will also be deleted. * @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/v1/rule_service.delete_rule.js</caption> * region_tag:chronicle_v1_generated_RuleService_DeleteRule_async */ deleteRule(request?: protos.google.cloud.chronicle.v1.IDeleteRuleRequest, options?: CallOptions): Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.chronicle.v1.IDeleteRuleRequest | undefined, {} | undefined ]>; deleteRule(request: protos.google.cloud.chronicle.v1.IDeleteRuleRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.chronicle.v1.IDeleteRuleRequest | null | undefined, {} | null | undefined>): void; deleteRule(request: protos.google.cloud.chronicle.v1.IDeleteRuleRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.chronicle.v1.IDeleteRuleRequest | null | undefined, {} | null | undefined>): void; /** * Get a Retrohunt. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the retrohunt to retrieve. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/retrohunts/{retrohunt}` * @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.cloud.chronicle.v1.Retrohunt|Retrohunt}. * 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/v1/rule_service.get_retrohunt.js</caption> * region_tag:chronicle_v1_generated_RuleService_GetRetrohunt_async */ getRetrohunt(request?: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | undefined, {} | undefined ]>; getRetrohunt(request: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>): void; getRetrohunt(request: protos.google.cloud.chronicle.v1.IGetRetrohuntRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IGetRetrohuntRequest | null | undefined, {} | null | undefined>): void; /** * Gets a RuleDeployment. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the rule deployment to retrieve. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` * @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.cloud.chronicle.v1.RuleDeployment|RuleDeployment}. * 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/v1/rule_service.get_rule_deployment.js</caption> * region_tag:chronicle_v1_generated_RuleService_GetRuleDeployment_async */ getRuleDeployment(request?: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | undefined, {} | undefined ]>; getRuleDeployment(request: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | null | undefined, {} | null | undefined>): void; getRuleDeployment(request: protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IGetRuleDeploymentRequest | null | undefined, {} | null | undefined>): void; /** * Updates a RuleDeployment. * Failures are not necessarily atomic. If there is a request to update * multiple fields, and any update to a single field fails, an error will be * returned, but other fields may remain successfully updated. * * @param {Object} request * The request object that will be sent. * @param {google.cloud.chronicle.v1.RuleDeployment} request.ruleDeployment * Required. The rule deployment to update. * * The rule deployment's `name` field is used to identify the rule deployment * to update. Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}/deployment` * @param {google.protobuf.FieldMask} request.updateMask * Required. The list of fields to update. * @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.cloud.chronicle.v1.RuleDeployment|RuleDeployment}. * 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/v1/rule_service.update_rule_deployment.js</caption> * region_tag:chronicle_v1_generated_RuleService_UpdateRuleDeployment_async */ updateRuleDeployment(request?: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | undefined, {} | undefined ]>; updateRuleDeployment(request: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, options: CallOptions, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>): void; updateRuleDeployment(request: protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest, callback: Callback<protos.google.cloud.chronicle.v1.IRuleDeployment, protos.google.cloud.chronicle.v1.IUpdateRuleDeploymentRequest | null | undefined, {} | null | undefined>): void; /** * Create a Retrohunt. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent of retrohunt, which is a rule. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {google.cloud.chronicle.v1.Retrohunt} request.retrohunt * Required. The retrohunt 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 * a long running operation. Its `promise()` method returns a promise * you can `await` for. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/rule_service.create_retrohunt.js</caption> * region_tag:chronicle_v1_generated_RuleService_CreateRetrohunt_async */ createRetrohunt(request?: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, options?: CallOptions): Promise<[ LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>; createRetrohunt(request: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; createRetrohunt(request: protos.google.cloud.chronicle.v1.ICreateRetrohuntRequest, callback: Callback<LROperation<protos.google.cloud.chronicle.v1.IRetrohunt, protos.google.cloud.chronicle.v1.IRetrohuntMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void; /** * Check the status of the long running operation returned by `createRetrohunt()`. * @param {String} name * The operation name that will be passed. * @returns {Promise} - The promise which resolves to an object. * The decoded operation object has result and metadata field to get information from. * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } * for more details and examples. * @example <caption>include:samples/generated/v1/rule_service.create_retrohunt.js</caption> * region_tag:chronicle_v1_generated_RuleService_CreateRetrohunt_async */ checkCreateRetrohuntProgress(name: string): Promise<LROperation<protos.google.cloud.chronicle.v1.Retrohunt, protos.google.cloud.chronicle.v1.RetrohuntMetadata>>; /** * Lists Rules. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of rules. * Format: * `projects/{project}/locations/{location}/instances/{instance}` * @param {number} request.pageSize * The maximum number of rules to return. The service may return fewer than * this value. If unspecified, at most 100 rules will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRules` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRules` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * view indicates the scope of fields to populate for the Rule being returned. * If unspecified, defaults to BASIC. * @param {string} request.filter * Only the following filters are allowed: * "reference_lists:{reference_list_name}" * "data_tables:{data_table_name}" * "display_name:{display_name}" * @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.cloud.chronicle.v1.Rule|Rule}. * 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 `listRulesAsync()` * 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. */ listRules(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRule[], protos.google.cloud.chronicle.v1.IListRulesRequest | null, protos.google.cloud.chronicle.v1.IListRulesResponse ]>; listRules(request: protos.google.cloud.chronicle.v1.IListRulesRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void; listRules(request: protos.google.cloud.chronicle.v1.IListRulesRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRulesRequest, protos.google.cloud.chronicle.v1.IListRulesResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void; /** * Equivalent to `listRules`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The parent, which owns this collection of rules. * Format: * `projects/{project}/locations/{location}/instances/{instance}` * @param {number} request.pageSize * The maximum number of rules to return. The service may return fewer than * this value. If unspecified, at most 100 rules will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRules` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRules` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * view indicates the scope of fields to populate for the Rule being returned. * If unspecified, defaults to BASIC. * @param {string} request.filter * Only the following filters are allowed: * "reference_lists:{reference_list_name}" * "data_tables:{data_table_name}" * "display_name:{display_name}" * @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.cloud.chronicle.v1.Rule|Rule} 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 `listRulesAsync()` * 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. */ listRulesStream(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): Transform; /** * Equivalent to `listRules`, 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.parent * Required. The parent, which owns this collection of rules. * Format: * `projects/{project}/locations/{location}/instances/{instance}` * @param {number} request.pageSize * The maximum number of rules to return. The service may return fewer than * this value. If unspecified, at most 100 rules will be returned. The * maximum value is 1000; values above 1000 will be coerced to 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRules` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRules` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * view indicates the scope of fields to populate for the Rule being returned. * If unspecified, defaults to BASIC. * @param {string} request.filter * Only the following filters are allowed: * "reference_lists:{reference_list_name}" * "data_tables:{data_table_name}" * "display_name:{display_name}" * @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.cloud.chronicle.v1.Rule|Rule}. 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/v1/rule_service.list_rules.js</caption> * region_tag:chronicle_v1_generated_RuleService_ListRules_async */ listRulesAsync(request?: protos.google.cloud.chronicle.v1.IListRulesRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRule>; /** * Lists all revisions of the rule. * * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the rule to list revisions for. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of revisions to return per page. The service may return * fewer than this value. If unspecified, at most 100 revisions will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * The page token, received from a previous `ListRuleRevisions` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRuleRevisions` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * The view field indicates the scope of fields to populate for the revision * being returned. If unspecified, defaults to BASIC. * @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.cloud.chronicle.v1.Rule|Rule}. * 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 `listRuleRevisionsAsync()` * 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. */ listRuleRevisions(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRule[], protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest | null, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse ]>; listRuleRevisions(request: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void; listRuleRevisions(request: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, protos.google.cloud.chronicle.v1.IListRuleRevisionsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRule>): void; /** * Equivalent to `listRuleRevisions`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.name * Required. The name of the rule to list revisions for. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of revisions to return per page. The service may return * fewer than this value. If unspecified, at most 100 revisions will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * The page token, received from a previous `ListRuleRevisions` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRuleRevisions` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * The view field indicates the scope of fields to populate for the revision * being returned. If unspecified, defaults to BASIC. * @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.cloud.chronicle.v1.Rule|Rule} 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 `listRuleRevisionsAsync()` * 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. */ listRuleRevisionsStream(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): Transform; /** * Equivalent to `listRuleRevisions`, 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 name of the rule to list revisions for. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of revisions to return per page. The service may return * fewer than this value. If unspecified, at most 100 revisions will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * The page token, received from a previous `ListRuleRevisions` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRuleRevisions` * must match the call that provided the page token. * @param {google.cloud.chronicle.v1.RuleView} request.view * The view field indicates the scope of fields to populate for the revision * being returned. If unspecified, defaults to BASIC. * @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.cloud.chronicle.v1.Rule|Rule}. 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/v1/rule_service.list_rule_revisions.js</caption> * region_tag:chronicle_v1_generated_RuleService_ListRuleRevisions_async */ listRuleRevisionsAsync(request?: protos.google.cloud.chronicle.v1.IListRuleRevisionsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRule>; /** * List Retrohunts. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The rule that the retrohunts belong to. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of retrohunt to return. The service may return fewer * than this value. If unspecified, at most 100 retrohunts will be returned. * The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRetrohunts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRetrohunts` must * match the call that provided the page token. * @param {string} request.filter * A filter that can be used to retrieve specific rule deployments. * The following fields are filterable: * state * @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.cloud.chronicle.v1.Retrohunt|Retrohunt}. * 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 `listRetrohuntsAsync()` * 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. */ listRetrohunts(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRetrohunt[], protos.google.cloud.chronicle.v1.IListRetrohuntsRequest | null, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse ]>; listRetrohunts(request: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>): void; listRetrohunts(request: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, protos.google.cloud.chronicle.v1.IListRetrohuntsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRetrohunt>): void; /** * Equivalent to `listRetrohunts`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The rule that the retrohunts belong to. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of retrohunt to return. The service may return fewer * than this value. If unspecified, at most 100 retrohunts will be returned. * The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRetrohunts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRetrohunts` must * match the call that provided the page token. * @param {string} request.filter * A filter that can be used to retrieve specific rule deployments. * The following fields are filterable: * state * @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.cloud.chronicle.v1.Retrohunt|Retrohunt} 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 `listRetrohuntsAsync()` * 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. */ listRetrohuntsStream(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): Transform; /** * Equivalent to `listRetrohunts`, 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.parent * Required. The rule that the retrohunts belong to. * Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/{rule}` * @param {number} request.pageSize * The maximum number of retrohunt to return. The service may return fewer * than this value. If unspecified, at most 100 retrohunts will be returned. * The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRetrohunts` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRetrohunts` must * match the call that provided the page token. * @param {string} request.filter * A filter that can be used to retrieve specific rule deployments. * The following fields are filterable: * state * @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.cloud.chronicle.v1.Retrohunt|Retrohunt}. 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/v1/rule_service.list_retrohunts.js</caption> * region_tag:chronicle_v1_generated_RuleService_ListRetrohunts_async */ listRetrohuntsAsync(request?: protos.google.cloud.chronicle.v1.IListRetrohuntsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.chronicle.v1.IRetrohunt>; /** * Lists RuleDeployments across all Rules. * * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The collection of all parents which own all rule deployments. The * "-" wildcard token must be used as the rule identifier in the resource * path. Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/-` * @param {number} request.pageSize * The maximum number of rule deployments to return. The service may return * fewer than this value. If unspecified, at most 100 rule deployments will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRuleDeployments` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRuleDeployments` * must match the call that provided the page token. * @param {string} request.filter * A filter that can be used to retrieve specific rule deployments. * The following fields are filterable: * archived, name * @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.cloud.chronicle.v1.RuleDeployment|RuleDeployment}. * 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 `listRuleDeploymentsAsync()` * 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. */ listRuleDeployments(request?: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options?: CallOptions): Promise<[ protos.google.cloud.chronicle.v1.IRuleDeployment[], protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest | null, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse ]>; listRuleDeployments(request: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>): void; listRuleDeployments(request: protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, callback: PaginationCallback<protos.google.cloud.chronicle.v1.IListRuleDeploymentsRequest, protos.google.cloud.chronicle.v1.IListRuleDeploymentsResponse | null | undefined, protos.google.cloud.chronicle.v1.IRuleDeployment>): void; /** * Equivalent to `listRuleDeployments`, but returns a NodeJS Stream object. * @param {Object} request * The request object that will be sent. * @param {string} request.parent * Required. The collection of all parents which own all rule deployments. The * "-" wildcard token must be used as the rule identifier in the resource * path. Format: * `projects/{project}/locations/{location}/instances/{instance}/rules/-` * @param {number} request.pageSize * The maximum number of rule deployments to return. The service may return * fewer than this value. If unspecified, at most 100 rule deployments will be * returned. The maximum value is 1000; values above 1000 will be coerced to * 1000. * @param {string} request.pageToken * A page token, received from a previous `ListRuleDeployments` call. * Provide this to retrieve the subsequent page. * * When paginating, all other parameters provided to `ListRuleDeployments` * must match