@google-ads/admanager
Version:
Google Ad Manager API client for Node.js
889 lines • 82.2 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';
/**
* Provides methods for handling AdUnit objects.
* @class
* @memberof v1
*/
export declare class AdUnitServiceClient {
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;
};
adUnitServiceStub?: Promise<{
[name: string]: Function;
}>;
/**
* Construct an instance of AdUnitServiceClient.
*
* @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 AdUnitServiceClient({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;
/**
* API to retrieve an AdUnit object.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.name
* Required. The resource name of the AdUnit.
* Format: `networks/{network_code}/adUnits/{ad_unit_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.ads.admanager.v1.AdUnit|AdUnit}.
* 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/ad_unit_service.get_ad_unit.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_GetAdUnit_async
*/
getAdUnit(request?: protos.google.ads.admanager.v1.IGetAdUnitRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IAdUnit,
protos.google.ads.admanager.v1.IGetAdUnitRequest | undefined,
{} | undefined
]>;
getAdUnit(request: protos.google.ads.admanager.v1.IGetAdUnitRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.IGetAdUnitRequest | null | undefined, {} | null | undefined>): void;
getAdUnit(request: protos.google.ads.admanager.v1.IGetAdUnitRequest, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.IGetAdUnitRequest | null | undefined, {} | null | undefined>): void;
/**
* API to create an `AdUnit` object.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource where this `AdUnit` will be created.
* Format: `networks/{network_code}`
* @param {google.ads.admanager.v1.AdUnit} request.adUnit
* Required. The `AdUnit` 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.ads.admanager.v1.AdUnit|AdUnit}.
* 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/ad_unit_service.create_ad_unit.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_CreateAdUnit_async
*/
createAdUnit(request?: protos.google.ads.admanager.v1.ICreateAdUnitRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IAdUnit,
protos.google.ads.admanager.v1.ICreateAdUnitRequest | undefined,
{} | undefined
]>;
createAdUnit(request: protos.google.ads.admanager.v1.ICreateAdUnitRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.ICreateAdUnitRequest | null | undefined, {} | null | undefined>): void;
createAdUnit(request: protos.google.ads.admanager.v1.ICreateAdUnitRequest, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.ICreateAdUnitRequest | null | undefined, {} | null | undefined>): void;
/**
* API to update an `AdUnit` object.
*
* @param {Object} request
* The request object that will be sent.
* @param {google.ads.admanager.v1.AdUnit} request.adUnit
* Required. The `AdUnit` to update.
*
* The `AdUnit`'s name is used to identify the `AdUnit` to update. Format:
* `networks/{network_code}/adUnits/{ad_unit_id}`
* @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.ads.admanager.v1.AdUnit|AdUnit}.
* 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/ad_unit_service.update_ad_unit.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_UpdateAdUnit_async
*/
updateAdUnit(request?: protos.google.ads.admanager.v1.IUpdateAdUnitRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IAdUnit,
protos.google.ads.admanager.v1.IUpdateAdUnitRequest | undefined,
{} | undefined
]>;
updateAdUnit(request: protos.google.ads.admanager.v1.IUpdateAdUnitRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.IUpdateAdUnitRequest | null | undefined, {} | null | undefined>): void;
updateAdUnit(request: protos.google.ads.admanager.v1.IUpdateAdUnitRequest, callback: Callback<protos.google.ads.admanager.v1.IAdUnit, protos.google.ads.admanager.v1.IUpdateAdUnitRequest | null | undefined, {} | null | undefined>): void;
/**
* API to batch create `AdUnit` objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource where `AdUnits` will be created.
* Format: `networks/{network_code}`
* The parent field in the CreateAdUnitRequest must match this
* field.
* @param {number[]} request.requests
* Required. The `AdUnit` objects to create.
* A maximum of 100 objects can be created in a batch.
* @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.ads.admanager.v1.BatchCreateAdUnitsResponse|BatchCreateAdUnitsResponse}.
* 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/ad_unit_service.batch_create_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_BatchCreateAdUnits_async
*/
batchCreateAdUnits(request?: protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IBatchCreateAdUnitsResponse,
protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest | undefined,
{} | undefined
]>;
batchCreateAdUnits(request: protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IBatchCreateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
batchCreateAdUnits(request: protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest, callback: Callback<protos.google.ads.admanager.v1.IBatchCreateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchCreateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
/**
* API to batch update `AdUnit` objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent resource where `AdUnits` will be updated.
* Format: `networks/{network_code}`
* The parent field in the UpdateAdUnitRequest must match this
* field.
* @param {number[]} request.requests
* Required. The `AdUnit` objects to update.
* A maximum of 100 objects can be updated in a batch.
* @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.ads.admanager.v1.BatchUpdateAdUnitsResponse|BatchUpdateAdUnitsResponse}.
* 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/ad_unit_service.batch_update_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_BatchUpdateAdUnits_async
*/
batchUpdateAdUnits(request?: protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IBatchUpdateAdUnitsResponse,
protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest | undefined,
{} | undefined
]>;
batchUpdateAdUnits(request: protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IBatchUpdateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
batchUpdateAdUnits(request: protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest, callback: Callback<protos.google.ads.admanager.v1.IBatchUpdateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchUpdateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
/**
* API to batch activate `AdUnit` objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format: `networks/{network_code}`
* @param {string[]} request.names
* Required. The resource names of the `AdUnit`s to activate.
* Format: `networks/{network_code}/adUnits/{ad_unit_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.ads.admanager.v1.BatchActivateAdUnitsResponse|BatchActivateAdUnitsResponse}.
* 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/ad_unit_service.batch_activate_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_BatchActivateAdUnits_async
*/
batchActivateAdUnits(request?: protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IBatchActivateAdUnitsResponse,
protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest | undefined,
{} | undefined
]>;
batchActivateAdUnits(request: protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IBatchActivateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
batchActivateAdUnits(request: protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest, callback: Callback<protos.google.ads.admanager.v1.IBatchActivateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchActivateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
/**
* Deactivates a list of `AdUnit` objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format: `networks/{network_code}`
* @param {string[]} request.names
* Required. The resource names of the `AdUnit`s to deactivate.
* Format: `networks/{network_code}/adUnits/{ad_unit_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.ads.admanager.v1.BatchDeactivateAdUnitsResponse|BatchDeactivateAdUnitsResponse}.
* 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/ad_unit_service.batch_deactivate_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_BatchDeactivateAdUnits_async
*/
batchDeactivateAdUnits(request?: protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsResponse,
protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest | undefined,
{} | undefined
]>;
batchDeactivateAdUnits(request: protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
batchDeactivateAdUnits(request: protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest, callback: Callback<protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsResponse, protos.google.ads.admanager.v1.IBatchDeactivateAdUnitsRequest | null | undefined, {} | null | undefined>): void;
/**
* Archives a list of `AdUnit` objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. Format: `networks/{network_code}`
* @param {string[]} request.names
* Required. The resource names of the `AdUnit`s to archive.
* Format: `networks/{network_code}/adUnits/{ad_unit_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.ads.admanager.v1.BatchArchiveAdUnitsResponse|BatchArchiveAdUnitsResponse}.
* 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/ad_unit_service.batch_archive_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_BatchArchiveAdUnits_async
*/
batchArchiveAdUnits(request?: protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IBatchArchiveAdUnitsResponse,
protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest | undefined,
{} | undefined
]>;
batchArchiveAdUnits(request: protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest, options: CallOptions, callback: Callback<protos.google.ads.admanager.v1.IBatchArchiveAdUnitsResponse, protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest | null | undefined, {} | null | undefined>): void;
batchArchiveAdUnits(request: protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest, callback: Callback<protos.google.ads.admanager.v1.IBatchArchiveAdUnitsResponse, protos.google.ads.admanager.v1.IBatchArchiveAdUnitsRequest | null | undefined, {} | null | undefined>): void;
/**
* API to retrieve a list of AdUnit objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of AdUnits.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnits to return. The service may return
* fewer than this value. If unspecified, at most 50 ad units will be
* returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnits` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnits` must match
* the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnit|AdUnit}.
* 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 `listAdUnitsAsync()`
* 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.
*/
listAdUnits(request?: protos.google.ads.admanager.v1.IListAdUnitsRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IAdUnit[],
protos.google.ads.admanager.v1.IListAdUnitsRequest | null,
protos.google.ads.admanager.v1.IListAdUnitsResponse
]>;
listAdUnits(request: protos.google.ads.admanager.v1.IListAdUnitsRequest, options: CallOptions, callback: PaginationCallback<protos.google.ads.admanager.v1.IListAdUnitsRequest, protos.google.ads.admanager.v1.IListAdUnitsResponse | null | undefined, protos.google.ads.admanager.v1.IAdUnit>): void;
listAdUnits(request: protos.google.ads.admanager.v1.IListAdUnitsRequest, callback: PaginationCallback<protos.google.ads.admanager.v1.IListAdUnitsRequest, protos.google.ads.admanager.v1.IListAdUnitsResponse | null | undefined, protos.google.ads.admanager.v1.IAdUnit>): void;
/**
* Equivalent to `listAdUnits`, 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 AdUnits.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnits to return. The service may return
* fewer than this value. If unspecified, at most 50 ad units will be
* returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnits` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnits` must match
* the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnit|AdUnit} 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 `listAdUnitsAsync()`
* 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.
*/
listAdUnitsStream(request?: protos.google.ads.admanager.v1.IListAdUnitsRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listAdUnits`, 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 AdUnits.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnits to return. The service may return
* fewer than this value. If unspecified, at most 50 ad units will be
* returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnits` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnits` must match
* the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnit|AdUnit}. 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/ad_unit_service.list_ad_units.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_ListAdUnits_async
*/
listAdUnitsAsync(request?: protos.google.ads.admanager.v1.IListAdUnitsRequest, options?: CallOptions): AsyncIterable<protos.google.ads.admanager.v1.IAdUnit>;
/**
* API to retrieve a list of AdUnitSize objects.
*
* @param {Object} request
* The request object that will be sent.
* @param {string} request.parent
* Required. The parent, which owns this collection of AdUnitSizes.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnitSizes to return. The service may
* return fewer than this value. If unspecified, at most 50 ad unit sizes will
* be returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnitSizes` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnitSizes` must
* match the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnitSize|AdUnitSize}.
* 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 `listAdUnitSizesAsync()`
* 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.
*/
listAdUnitSizes(request?: protos.google.ads.admanager.v1.IListAdUnitSizesRequest, options?: CallOptions): Promise<[
protos.google.ads.admanager.v1.IAdUnitSize[],
protos.google.ads.admanager.v1.IListAdUnitSizesRequest | null,
protos.google.ads.admanager.v1.IListAdUnitSizesResponse
]>;
listAdUnitSizes(request: protos.google.ads.admanager.v1.IListAdUnitSizesRequest, options: CallOptions, callback: PaginationCallback<protos.google.ads.admanager.v1.IListAdUnitSizesRequest, protos.google.ads.admanager.v1.IListAdUnitSizesResponse | null | undefined, protos.google.ads.admanager.v1.IAdUnitSize>): void;
listAdUnitSizes(request: protos.google.ads.admanager.v1.IListAdUnitSizesRequest, callback: PaginationCallback<protos.google.ads.admanager.v1.IListAdUnitSizesRequest, protos.google.ads.admanager.v1.IListAdUnitSizesResponse | null | undefined, protos.google.ads.admanager.v1.IAdUnitSize>): void;
/**
* Equivalent to `listAdUnitSizes`, 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 AdUnitSizes.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnitSizes to return. The service may
* return fewer than this value. If unspecified, at most 50 ad unit sizes will
* be returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnitSizes` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnitSizes` must
* match the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnitSize|AdUnitSize} 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 `listAdUnitSizesAsync()`
* 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.
*/
listAdUnitSizesStream(request?: protos.google.ads.admanager.v1.IListAdUnitSizesRequest, options?: CallOptions): Transform;
/**
* Equivalent to `listAdUnitSizes`, 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 AdUnitSizes.
* Format: `networks/{network_code}`
* @param {number} [request.pageSize]
* Optional. The maximum number of AdUnitSizes to return. The service may
* return fewer than this value. If unspecified, at most 50 ad unit sizes will
* be returned. The maximum value is 1000; values greater than 1000 will be
* coerced to 1000.
* @param {string} [request.pageToken]
* Optional. A page token, received from a previous `ListAdUnitSizes` call.
* Provide this to retrieve the subsequent page.
*
* When paginating, all other parameters provided to `ListAdUnitSizes` must
* match the call that provided the page token.
* @param {string} [request.filter]
* Optional. Expression to filter the response.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters
* @param {string} [request.orderBy]
* Optional. Expression to specify sorting order.
* See syntax details at
* https://developers.google.com/ad-manager/api/beta/filters#order
* @param {number} [request.skip]
* Optional. Number of individual resources to skip while paginating.
* @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.ads.admanager.v1.AdUnitSize|AdUnitSize}. 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/ad_unit_service.list_ad_unit_sizes.js</caption>
* region_tag:admanager_v1_generated_AdUnitService_ListAdUnitSizes_async
*/
listAdUnitSizesAsync(request?: protos.google.ads.admanager.v1.IListAdUnitSizesRequest, options?: CallOptions): AsyncIterable<protos.google.ads.admanager.v1.IAdUnitSize>;
/**
* Return a fully-qualified adBreak resource name string.
*
* @param {string} network_code
* @param {string} asset_key
* @param {string} ad_break
* @returns {string} Resource name string.
*/
adBreakPath(networkCode: string, assetKey: string, adBreak: string): string;
/**
* Parse the network_code from AdBreak resource.
*
* @param {string} adBreakName
* A fully-qualified path representing AdBreak resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromAdBreakName(adBreakName: string): string | number;
/**
* Parse the asset_key from AdBreak resource.
*
* @param {string} adBreakName
* A fully-qualified path representing AdBreak resource.
* @returns {string} A string representing the asset_key.
*/
matchAssetKeyFromAdBreakName(adBreakName: string): string | number;
/**
* Parse the ad_break from AdBreak resource.
*
* @param {string} adBreakName
* A fully-qualified path representing AdBreak resource.
* @returns {string} A string representing the ad_break.
*/
matchAdBreakFromAdBreakName(adBreakName: string): string | number;
/**
* Return a fully-qualified adReviewCenterAd resource name string.
*
* @param {string} network_code
* @param {string} web_property_code
* @param {string} ad_review_center_ad
* @returns {string} Resource name string.
*/
adReviewCenterAdPath(networkCode: string, webPropertyCode: string, adReviewCenterAd: string): string;
/**
* Parse the network_code from AdReviewCenterAd resource.
*
* @param {string} adReviewCenterAdName
* A fully-qualified path representing AdReviewCenterAd resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromAdReviewCenterAdName(adReviewCenterAdName: string): string | number;
/**
* Parse the web_property_code from AdReviewCenterAd resource.
*
* @param {string} adReviewCenterAdName
* A fully-qualified path representing AdReviewCenterAd resource.
* @returns {string} A string representing the web_property_code.
*/
matchWebPropertyCodeFromAdReviewCenterAdName(adReviewCenterAdName: string): string | number;
/**
* Parse the ad_review_center_ad from AdReviewCenterAd resource.
*
* @param {string} adReviewCenterAdName
* A fully-qualified path representing AdReviewCenterAd resource.
* @returns {string} A string representing the ad_review_center_ad.
*/
matchAdReviewCenterAdFromAdReviewCenterAdName(adReviewCenterAdName: string): string | number;
/**
* Return a fully-qualified adUnit resource name string.
*
* @param {string} network_code
* @param {string} ad_unit
* @returns {string} Resource name string.
*/
adUnitPath(networkCode: string, adUnit: string): string;
/**
* Parse the network_code from AdUnit resource.
*
* @param {string} adUnitName
* A fully-qualified path representing AdUnit resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromAdUnitName(adUnitName: string): string | number;
/**
* Parse the ad_unit from AdUnit resource.
*
* @param {string} adUnitName
* A fully-qualified path representing AdUnit resource.
* @returns {string} A string representing the ad_unit.
*/
matchAdUnitFromAdUnitName(adUnitName: string): string | number;
/**
* Return a fully-qualified application resource name string.
*
* @param {string} network_code
* @param {string} application
* @returns {string} Resource name string.
*/
applicationPath(networkCode: string, application: string): string;
/**
* Parse the network_code from Application resource.
*
* @param {string} applicationName
* A fully-qualified path representing Application resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromApplicationName(applicationName: string): string | number;
/**
* Parse the application from Application resource.
*
* @param {string} applicationName
* A fully-qualified path representing Application resource.
* @returns {string} A string representing the application.
*/
matchApplicationFromApplicationName(applicationName: string): string | number;
/**
* Return a fully-qualified audienceSegment resource name string.
*
* @param {string} network_code
* @param {string} audience_segment
* @returns {string} Resource name string.
*/
audienceSegmentPath(networkCode: string, audienceSegment: string): string;
/**
* Parse the network_code from AudienceSegment resource.
*
* @param {string} audienceSegmentName
* A fully-qualified path representing AudienceSegment resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromAudienceSegmentName(audienceSegmentName: string): string | number;
/**
* Parse the audience_segment from AudienceSegment resource.
*
* @param {string} audienceSegmentName
* A fully-qualified path representing AudienceSegment resource.
* @returns {string} A string representing the audience_segment.
*/
matchAudienceSegmentFromAudienceSegmentName(audienceSegmentName: string): string | number;
/**
* Return a fully-qualified bandwidthGroup resource name string.
*
* @param {string} network_code
* @param {string} bandwidth_group
* @returns {string} Resource name string.
*/
bandwidthGroupPath(networkCode: string, bandwidthGroup: string): string;
/**
* Parse the network_code from BandwidthGroup resource.
*
* @param {string} bandwidthGroupName
* A fully-qualified path representing BandwidthGroup resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromBandwidthGroupName(bandwidthGroupName: string): string | number;
/**
* Parse the bandwidth_group from BandwidthGroup resource.
*
* @param {string} bandwidthGroupName
* A fully-qualified path representing BandwidthGroup resource.
* @returns {string} A string representing the bandwidth_group.
*/
matchBandwidthGroupFromBandwidthGroupName(bandwidthGroupName: string): string | number;
/**
* Return a fully-qualified browser resource name string.
*
* @param {string} network_code
* @param {string} browser
* @returns {string} Resource name string.
*/
browserPath(networkCode: string, browser: string): string;
/**
* Parse the network_code from Browser resource.
*
* @param {string} browserName
* A fully-qualified path representing Browser resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromBrowserName(browserName: string): string | number;
/**
* Parse the browser from Browser resource.
*
* @param {string} browserName
* A fully-qualified path representing Browser resource.
* @returns {string} A string representing the browser.
*/
matchBrowserFromBrowserName(browserName: string): string | number;
/**
* Return a fully-qualified browserLanguage resource name string.
*
* @param {string} network_code
* @param {string} browser_language
* @returns {string} Resource name string.
*/
browserLanguagePath(networkCode: string, browserLanguage: string): string;
/**
* Parse the network_code from BrowserLanguage resource.
*
* @param {string} browserLanguageName
* A fully-qualified path representing BrowserLanguage resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromBrowserLanguageName(browserLanguageName: string): string | number;
/**
* Parse the browser_language from BrowserLanguage resource.
*
* @param {string} browserLanguageName
* A fully-qualified path representing BrowserLanguage resource.
* @returns {string} A string representing the browser_language.
*/
matchBrowserLanguageFromBrowserLanguageName(browserLanguageName: string): string | number;
/**
* Return a fully-qualified cmsMetadataKey resource name string.
*
* @param {string} network_code
* @param {string} cms_metadata_key
* @returns {string} Resource name string.
*/
cmsMetadataKeyPath(networkCode: string, cmsMetadataKey: string): string;
/**
* Parse the network_code from CmsMetadataKey resource.
*
* @param {string} cmsMetadataKeyName
* A fully-qualified path representing CmsMetadataKey resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromCmsMetadataKeyName(cmsMetadataKeyName: string): string | number;
/**
* Parse the cms_metadata_key from CmsMetadataKey resource.
*
* @param {string} cmsMetadataKeyName
* A fully-qualified path representing CmsMetadataKey resource.
* @returns {string} A string representing the cms_metadata_key.
*/
matchCmsMetadataKeyFromCmsMetadataKeyName(cmsMetadataKeyName: string): string | number;
/**
* Return a fully-qualified cmsMetadataValue resource name string.
*
* @param {string} network_code
* @param {string} cms_metadata_value
* @returns {string} Resource name string.
*/
cmsMetadataValuePath(networkCode: string, cmsMetadataValue: string): string;
/**
* Parse the network_code from CmsMetadataValue resource.
*
* @param {string} cmsMetadataValueName
* A fully-qualified path representing CmsMetadataValue resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromCmsMetadataValueName(cmsMetadataValueName: string): string | number;
/**
* Parse the cms_metadata_value from CmsMetadataValue resource.
*
* @param {string} cmsMetadataValueName
* A fully-qualified path representing CmsMetadataValue resource.
* @returns {string} A string representing the cms_metadata_value.
*/
matchCmsMetadataValueFromCmsMetadataValueName(cmsMetadataValueName: string): string | number;
/**
* Return a fully-qualified company resource name string.
*
* @param {string} network_code
* @param {string} company
* @returns {string} Resource name string.
*/
companyPath(networkCode: string, company: string): string;
/**
* Parse the network_code from Company resource.
*
* @param {string} companyName
* A fully-qualified path representing Company resource.
* @returns {string} A string representing the network_code.
*/
matchNetworkCodeFromCompanyName(companyName: string): string | number;
/**
* Parse the company from Company resource.
*
* @param {string} companyName
* A fully-qualified path representing Company resource.
* @returns {string} A string representing the company.
*/
matchCompanyFromCompanyName(companyName: string): string | number;
/**
* Return a fully-qualified contact resource name string.
*
* @param {string} network_code
* @param {string} contact
* @returns {string} Resource name string.
*/
contactPath(networkCode: string, contact: string): string;
/**
* Parse the network_code from Contact resource.
*
* @param {string} contactName
* A fully-qualified path representing Contact resource.
* @returns {string} A string representing the network