Class v1.CloudChannelServiceClient (2.4.1)

CloudChannelService lets Google cloud resellers and distributors manage their customers, channel partners, entitlements, and reports.

Using this service: 1. Resellers and distributors can manage a customer entity. 2. Distributors can register an authorized reseller in their channel and provide them with delegated admin access. 3. Resellers and distributors can manage customer entitlements.

CloudChannelService exposes the following resources: - s: An entity-usually an enterprise-managed by a reseller or distributor.

  • s: An entity that provides a customer with the means to use a service. Entitlements are created or updated as a result of a successful fulfillment.

  • s: An entity that identifies links between distributors and their indirect resellers in a channel. v1

Package

@google-cloud/channel

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of CloudChannelServiceClient.

Parameters
NameDescription
opts ClientOptions
gaxInstance typeof gax | typeof gax.fallback

: 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 CloudChannelServiceClient({fallback: 'rest'}, gax); ```

Properties

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath(), exists for compatibility reasons.

auth

auth: gax.GoogleAuth;

cloudChannelServiceStub

cloudChannelServiceStub?: Promise<{
        [name: string]: Function;
    }>;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

pathTemplates

pathTemplates: {
        [name: string]: gax.PathTemplate;
    };

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

activateEntitlement(request, options)

activateEntitlement(request?: protos.google.cloud.channel.v1.IActivateEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Activates a previously suspended entitlement. Entitlements suspended for pending ToS acceptance can't be activated using this method.

An entitlement activation is a long-running operation and it updates the state of the customer entitlement.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * SUSPENSION_NOT_RESELLER_INITIATED: Can only activate reseller-initiated suspensions and entitlements that have accepted the TOS. * NOT_SUSPENDED: Can only activate suspended entitlements not in an ACTIVE state. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IActivateEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to activate.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callActivateEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.activateEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateEntitlement();

activateEntitlement(request, options, callback)

activateEntitlement(request: protos.google.cloud.channel.v1.IActivateEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IActivateEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

activateEntitlement(request, callback)

activateEntitlement(request: protos.google.cloud.channel.v1.IActivateEntitlementRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IActivateEntitlementRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelEntitlement(request, options)

cancelEntitlement(request?: protos.google.cloud.channel.v1.ICancelEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Cancels a previously fulfilled entitlement.

An entitlement cancellation is a long-running operation.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * FAILED_PRECONDITION: There are Google Cloud projects linked to the Google Cloud entitlement's Cloud Billing subaccount. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons, or entitlements for Google Cloud's development platform. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICancelEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to cancel.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCancelEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.cancelEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCancelEntitlement();

cancelEntitlement(request, options, callback)

cancelEntitlement(request: protos.google.cloud.channel.v1.ICancelEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICancelEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelEntitlement(request, callback)

cancelEntitlement(request: protos.google.cloud.channel.v1.ICancelEntitlementRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICancelEntitlementRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

cancelOperation(request, options, callback)

cancelOperation(request: protos.google.longrunning.CancelOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>, callback?: Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>): Promise<protos.google.protobuf.Empty>;

Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED. Clients can use or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an value with a of 1, corresponding to Code.CANCELLED.

Parameters
NameDescription
request protos.google.longrunning.CancelOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.CancelOperationRequest, {} | undefined | null>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.CancelOperationRequest, protos.google.protobuf.Empty, {} | undefined | null>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});

changeOffer(request, options)

changeOffer(request?: protos.google.cloud.channel.v1.IChangeOfferRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the Offer for an existing customer entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Offer or Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeOfferRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New Offer.
   *  Format: accounts/{account_id}/offers/{offer_id}.
   */
  // const offer = 'abc123'
  /**
   *  Optional. Parameters needed to purchase the Offer. To view the available
   *  Parameters refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = 1234
  /**
   *  Optional. Purchase order id provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeOffer() {
    // Construct request
    const request = {
      name,
      offer,
    };

    // Run request
    const [operation] = await channelClient.changeOffer(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeOffer();

changeOffer(request, options, callback)

changeOffer(request: protos.google.cloud.channel.v1.IChangeOfferRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeOfferRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeOffer(request, callback)

changeOffer(request: protos.google.cloud.channel.v1.IChangeOfferRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeOfferRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeParameters(request, options)

changeParameters(request?: protos.google.cloud.channel.v1.IChangeParametersRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Change parameters of the entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. For example, the number of seats being changed is greater than the allowed number of max seats, or decreasing seats for a commitment based plan. * NOT_FOUND: Entitlement resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeParametersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. Entitlement parameters to update. You can only change editable
   *  parameters.
   *  To view the available Parameters for a request, refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = 1234
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. Purchase order ID provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeParameters() {
    // Construct request
    const request = {
      name,
      parameters,
    };

    // Run request
    const [operation] = await channelClient.changeParameters(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeParameters();

changeParameters(request, options, callback)

changeParameters(request: protos.google.cloud.channel.v1.IChangeParametersRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeParametersRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeParameters(request, callback)

changeParameters(request: protos.google.cloud.channel.v1.IChangeParametersRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeParametersRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeRenewalSettings(request, options)

changeRenewalSettings(request?: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Updates the renewal settings for an existing customer entitlement.

An entitlement update is a long-running operation and it updates the entitlement as a result of fulfillment.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't enable or disable renewals for non-commitment plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New renewal settings.
   */
  // const renewalSettings = {}
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeRenewalSettings() {
    // Construct request
    const request = {
      name,
      renewalSettings,
    };

    // Run request
    const [operation] = await channelClient.changeRenewalSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeRenewalSettings();

changeRenewalSettings(request, options, callback)

changeRenewalSettings(request: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

changeRenewalSettings(request, callback)

changeRenewalSettings(request: protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IChangeRenewalSettingsRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

channelPartnerLinkPath(account, channelPartnerLink)

channelPartnerLinkPath(account: string, channelPartnerLink: string): string;

Return a fully-qualified channelPartnerLink resource name string.

Parameters
NameDescription
account string
channelPartnerLink string
Returns
TypeDescription
string

{string} Resource name string.

channelPartnerRepricingConfigPath(account, channelPartner, channelPartnerRepricingConfig)

channelPartnerRepricingConfigPath(account: string, channelPartner: string, channelPartnerRepricingConfig: string): string;

Return a fully-qualified channelPartnerRepricingConfig resource name string.

Parameters
NameDescription
account string
channelPartner string
channelPartnerRepricingConfig string
Returns
TypeDescription
string

{string} Resource name string.

checkActivateEntitlementProgress(name)

checkActivateEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by activateEntitlement().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to activate.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callActivateEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.activateEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callActivateEntitlement();

checkCancelEntitlementProgress(name)

checkCancelEntitlementProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by cancelEntitlement().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to cancel.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCancelEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.cancelEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCancelEntitlement();

checkChangeOfferProgress(name)

checkChangeOfferProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by changeOffer().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New Offer.
   *  Format: accounts/{account_id}/offers/{offer_id}.
   */
  // const offer = 'abc123'
  /**
   *  Optional. Parameters needed to purchase the Offer. To view the available
   *  Parameters refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = 1234
  /**
   *  Optional. Purchase order id provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeOffer() {
    // Construct request
    const request = {
      name,
      offer,
    };

    // Run request
    const [operation] = await channelClient.changeOffer(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeOffer();

checkChangeParametersProgress(name)

checkChangeParametersProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by changeParameters().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. Entitlement parameters to update. You can only change editable
   *  parameters.
   *  To view the available Parameters for a request, refer to the
   *  Offer.parameter_definitions google.cloud.channel.v1.Offer.parameter_definitions 
   *  from the desired offer.
   */
  // const parameters = 1234
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'
  /**
   *  Optional. Purchase order ID provided by the reseller.
   */
  // const purchaseOrderId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeParameters() {
    // Construct request
    const request = {
      name,
      parameters,
    };

    // Run request
    const [operation] = await channelClient.changeParameters(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeParameters();

checkChangeRenewalSettingsProgress(name)

checkChangeRenewalSettingsProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by changeRenewalSettings().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to update.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Required. New renewal settings.
   */
  // const renewalSettings = {}
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callChangeRenewalSettings() {
    // Construct request
    const request = {
      name,
      renewalSettings,
    };

    // Run request
    const [operation] = await channelClient.changeRenewalSettings(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callChangeRenewalSettings();

checkCloudIdentityAccountsExist(request, options)

checkCloudIdentityAccountsExist(request?: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse,
        (protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | undefined),
        {} | undefined
    ]>;

Confirms the existence of Cloud Identity accounts based on the domain and if the Cloud Identity accounts are owned by the reseller.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INVALID_VALUE: Invalid domain value in the request.

Return value: A list of resources for the domain (may be empty)

Note: in the v1alpha1 version of the API, a NOT_FOUND error returns if no resources match the domain.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, (protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The reseller account's resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. Domain to fetch for Cloud Identity account customer.
   */
  // const domain = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCheckCloudIdentityAccountsExist() {
    // Construct request
    const request = {
      parent,
      domain,
    };

    // Run request
    const response = await channelClient.checkCloudIdentityAccountsExist(request);
    console.log(response);
  }

  callCheckCloudIdentityAccountsExist();

checkCloudIdentityAccountsExist(request, options, callback)

checkCloudIdentityAccountsExist(request: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkCloudIdentityAccountsExist(request, callback)

checkCloudIdentityAccountsExist(request: protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest, callback: Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest
callback Callback<protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistResponse, protos.google.cloud.channel.v1.ICheckCloudIdentityAccountsExistRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

checkCreateEntitlementProgress(name)

checkCreateEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by createEntitlement().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account in which to
   *  create the entitlement. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlement to create.
   */
  // const entitlement = {}
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateEntitlement() {
    // Construct request
    const request = {
      parent,
      entitlement,
    };

    // Run request
    const [operation] = await channelClient.createEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateEntitlement();

checkProvisionCloudIdentityProgress(name)

checkProvisionCloudIdentityProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Customer, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by provisionCloudIdentity().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Customer, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the customer.
   *  Format: accounts/{account_id}/customers/{customer_id}
   */
  // const customer = 'abc123'
  /**
   *  CloudIdentity-specific customer information.
   */
  // const cloudIdentityInfo = {}
  /**
   *  Admin user information.
   */
  // const user = {}
  /**
   *  Validate the request and preview the review, but do not post it.
   */
  // const validateOnly = true

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callProvisionCloudIdentity() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const [operation] = await channelClient.provisionCloudIdentity(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callProvisionCloudIdentity();

checkStartPaidServiceProgress(name)

checkStartPaidServiceProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by startPaidService().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to start a paid service for.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callStartPaidService() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.startPaidService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStartPaidService();

checkSuspendEntitlementProgress(name)

checkSuspendEntitlementProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by suspendEntitlement().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.Entitlement, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to suspend.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callSuspendEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.suspendEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callSuspendEntitlement();

checkTransferEntitlementsProgress(name)

checkTransferEntitlementsProgress(name: string): Promise<LROperation<protos.google.cloud.channel.v1.TransferEntitlementsResponse, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by transferEntitlements().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.cloud.channel.v1.TransferEntitlementsResponse, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account that will
   *  receive transferred entitlements. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The new entitlements to create or transfer.
   */
  // const entitlements = 1234
  /**
   *  The super admin of the resold customer generates this token to
   *  authorize a reseller to access their Cloud Identity and purchase
   *  entitlements on their behalf. You can omit this token after authorization.
   *  See https://support.google.com/a/answer/7643790 for more details.
   */
  // const authToken = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlements() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlements(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlements();

checkTransferEntitlementsToGoogleProgress(name)

checkTransferEntitlementsToGoogleProgress(name: string): Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>;

Check the status of the long running operation returned by transferEntitlementsToGoogle().

Parameter
NameDescription
name string

The operation name that will be passed.

Returns
TypeDescription
Promise<LROperation<protos.google.protobuf.Empty, protos.google.cloud.channel.v1.OperationMetadata>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account where the
   *  entitlements transfer from. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlements to transfer to Google.
   */
  // const entitlements = 1234
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlementsToGoogle() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlementsToGoogle(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlementsToGoogle();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
TypeDescription
Promise<void>

{Promise} A promise that resolves when the client is closed.

createChannelPartnerLink(request?: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink,
        (protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | undefined),
        {} | undefined
    ]>;

Initiates a channel partner link between a distributor and a reseller, or between resellers in an n-tier reseller channel. Invited partners need to follow the invite_link_uri provided in the response to accept. After accepting the invitation, a link is set up between the two parties. You must be a distributor to call this method.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * ALREADY_EXISTS: The ChannelPartnerLink sent in the request already exists. * NOT_FOUND: No Cloud Identity customer exists for provided domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The new resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink, (protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Create a channel partner link for the provided reseller account's
   *  resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The channel partner link to create.
   *  Either channel_partner_link.reseller_cloud_identity_id or domain can be
   *  used to create a link.
   */
  // const channelPartnerLink = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateChannelPartnerLink() {
    // Construct request
    const request = {
      parent,
      channelPartnerLink,
    };

    // Run request
    const response = await channelClient.createChannelPartnerLink(request);
    console.log(response);
  }

  callCreateChannelPartnerLink();

createChannelPartnerLink(request: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
createChannelPartnerLink(request: protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.ICreateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createChannelPartnerRepricingConfig(request, options)

createChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig,
        (protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. You can only create configs if the is a future month. If needed, you can create a config for the current month, with some restrictions.

When creating a config for a future month, make sure there are no existing configs for that .

The following restrictions are for creating configs in the current month.

* This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any ChannelPartner or . * The contained vaule must be different from the value used in the current config for a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the updated resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, (protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the ChannelPartner that will receive the
   *  repricing config. Parent uses the format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The ChannelPartnerRepricingConfig object to update.
   */
  // const channelPartnerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      parent,
      channelPartnerRepricingConfig,
    };

    // Run request
    const response = await channelClient.createChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callCreateChannelPartnerRepricingConfig();

createChannelPartnerRepricingConfig(request, options, callback)

createChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createChannelPartnerRepricingConfig(request, callback)

createChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.ICreateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomer(request, options)

createCustomer(request?: protos.google.cloud.channel.v1.ICreateCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.ICreateCustomerRequest | undefined,
        {} | undefined
    ]>;

Creates a new resource under the reseller or distributor account.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Domain field value doesn't match the primary email domain.

Return value: The newly created resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of reseller account in which to create the
   *  customer. Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The customer to create.
   */
  // const customer = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateCustomer() {
    // Construct request
    const request = {
      parent,
      customer,
    };

    // Run request
    const response = await channelClient.createCustomer(request);
    console.log(response);
  }

  callCreateCustomer();

createCustomer(request, options, callback)

createCustomer(request: protos.google.cloud.channel.v1.ICreateCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomer(request, callback)

createCustomer(request: protos.google.cloud.channel.v1.ICreateCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.ICreateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomerRepricingConfig(request, options)

createCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig,
        (protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Creates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. You can only create configs if the is a future month. If needed, you can create a config for the current month, with some restrictions.

When creating a config for a future month, make sure there are no existing configs for that .

The following restrictions are for creating configs in the current month.

* This functionality is reserved for recovering from an erroneous config, and should not be used for regular business cases. * The new config will not modify exports used with other configs. Changes to the config may be immediate, but may take up to 24 hours. * There is a limit of ten configs for any or . * The contained vaule must be different from the value used in the current config for a .

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the updated resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig, (protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer that will receive this
   *  repricing config. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The CustomerRepricingConfig object to update.
   */
  // const customerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateCustomerRepricingConfig() {
    // Construct request
    const request = {
      parent,
      customerRepricingConfig,
    };

    // Run request
    const response = await channelClient.createCustomerRepricingConfig(request);
    console.log(response);
  }

  callCreateCustomerRepricingConfig();

createCustomerRepricingConfig(request, options, callback)

createCustomerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createCustomerRepricingConfig(request, callback)

createCustomerRepricingConfig(request: protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.ICreateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEntitlement(request, options)

createEntitlement(request?: protos.google.cloud.channel.v1.ICreateEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates an entitlement for a customer.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * There is already a customer entitlement for a SKU from the same product family. * INVALID_VALUE: Make sure the OfferId is valid. If it is, contact Google Channel support for further troubleshooting. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: * The SKU was already purchased for the customer. * The customer's primary email already exists. Retry after changing the customer's primary contact email. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The domain required for purchasing a SKU has not been verified. * A pre-requisite SKU required to purchase an Add-On SKU is missing. For example, Google Workspace Business Starter is required to purchase Vault or Drive. * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account in which to
   *  create the entitlement. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlement to create.
   */
  // const entitlement = {}
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callCreateEntitlement() {
    // Construct request
    const request = {
      parent,
      entitlement,
    };

    // Run request
    const [operation] = await channelClient.createEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreateEntitlement();

createEntitlement(request, options, callback)

createEntitlement(request: protos.google.cloud.channel.v1.ICreateEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

createEntitlement(request, callback)

createEntitlement(request: protos.google.cloud.channel.v1.ICreateEntitlementRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ICreateEntitlementRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

customerPath(account, customer)

customerPath(account: string, customer: string): string;

Return a fully-qualified customer resource name string.

Parameters
NameDescription
account string
customer string
Returns
TypeDescription
string

{string} Resource name string.

customerRepricingConfigPath(account, customer, customerRepricingConfig)

customerRepricingConfigPath(account: string, customer: string, customerRepricingConfig: string): string;

Return a fully-qualified customerRepricingConfig resource name string.

Parameters
NameDescription
account string
customer string
customerRepricingConfig string
Returns
TypeDescription
string

{string} Resource name string.

deleteChannelPartnerRepricingConfig(request, options)

deleteChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Deletes the given permanently. You can only delete configs if their is set to a date after the current month.

Possible error codes:

* PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The is active or in the past. * NOT_FOUND: No found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the channel partner repricing config rule to
   *  delete.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callDeleteChannelPartnerRepricingConfig();

deleteChannelPartnerRepricingConfig(request, options, callback)

deleteChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteChannelPartnerRepricingConfig(request, callback)

deleteChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomer(request, options)

deleteCustomer(request?: protos.google.cloud.channel.v1.IDeleteCustomerRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.cloud.channel.v1.IDeleteCustomerRequest | undefined,
        {} | undefined
    ]>;

Deletes the given permanently.

Possible error codes:

* PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The customer has existing entitlements. * NOT_FOUND: No resource found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer to delete.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteCustomer() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteCustomer(request);
    console.log(response);
  }

  callDeleteCustomer();

deleteCustomer(request, options, callback)

deleteCustomer(request: protos.google.cloud.channel.v1.IDeleteCustomerRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomer(request, callback)

deleteCustomer(request: protos.google.cloud.channel.v1.IDeleteCustomerRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomerRepricingConfig(request, options)

deleteCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Deletes the given permanently. You can only delete configs if their is set to a date after the current month.

Possible error codes:

* PERMISSION_DENIED: The account making the request does not own this customer. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * FAILED_PRECONDITION: The is active or in the past. * NOT_FOUND: No found for the name in the request.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.protobuf.IEmpty, (protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer repricing config rule to
   *  delete. Format:
   *  accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callDeleteCustomerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.deleteCustomerRepricingConfig(request);
    console.log(response);
  }

  callDeleteCustomerRepricingConfig();

deleteCustomerRepricingConfig(request, options, callback)

deleteCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteCustomerRepricingConfig(request, callback)

deleteCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IDeleteCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

deleteOperation(request, options, callback)

deleteOperation(request: protos.google.longrunning.DeleteOperationRequest, options?: gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>): Promise<protos.google.protobuf.Empty>;

Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns google.rpc.Code.UNIMPLEMENTED.

Parameters
NameDescription
request protos.google.longrunning.DeleteOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.protobuf.Empty, protos.google.longrunning.DeleteOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call. {Promise} - The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<protos.google.protobuf.Empty>
Example

const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});

entitlementPath(account, customer, entitlement)

entitlementPath(account: string, customer: string, entitlement: string): string;

Return a fully-qualified entitlement resource name string.

Parameters
NameDescription
account string
customer string
entitlement string
Returns
TypeDescription
string

{string} Resource name string.

getChannelPartnerLink(request?: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink,
        protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | undefined,
        {} | undefined
    ]>;

Returns the requested resource. You must be a distributor to call this method.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: ChannelPartnerLink resource not found because of an invalid channel partner link name.

Return value: The resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the channel partner link to retrieve.
   *  Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
   *  where {id} is the Cloud Identity ID of the partner.
   */
  // const name = 'abc123'
  /**
   *  Optional. The level of granularity the ChannelPartnerLink will display.
   */
  // const view = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetChannelPartnerLink() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getChannelPartnerLink(request);
    console.log(response);
  }

  callGetChannelPartnerLink();

getChannelPartnerLink(request: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
getChannelPartnerLink(request: protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IGetChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getChannelPartnerRepricingConfig(request, options)

getChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig,
        (protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Gets information about how a Distributor modifies their bill before sending it to a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, (protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the ChannelPartnerRepricingConfig
   *  Format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}/channelPartnerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callGetChannelPartnerRepricingConfig();

getChannelPartnerRepricingConfig(request, options, callback)

getChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getChannelPartnerRepricingConfig(request, callback)

getChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IGetChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomer(request, options)

getCustomer(request?: protos.google.cloud.channel.v1.IGetCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.IGetCustomerRequest | undefined,
        {} | undefined
    ]>;

Returns the requested resource.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer resource doesn't exist. Usually the result of an invalid name parameter.

Return value: The resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer to retrieve.
   *  Name uses the format: accounts/{account_id}/customers/{customer_id}
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetCustomer() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getCustomer(request);
    console.log(response);
  }

  callGetCustomer();

getCustomer(request, options, callback)

getCustomer(request: protos.google.cloud.channel.v1.IGetCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomer(request, callback)

getCustomer(request: protos.google.cloud.channel.v1.IGetCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IGetCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomerRepricingConfig(request, options)

getCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig,
        (protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Gets information about how a Reseller modifies their bill before sending it to a Customer.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The was not found. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig, (protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the CustomerRepricingConfig.
   *  Format:
   *  accounts/{account_id}/customers/{customer_id}/customerRepricingConfigs/{id}.
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetCustomerRepricingConfig() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getCustomerRepricingConfig(request);
    console.log(response);
  }

  callGetCustomerRepricingConfig();

getCustomerRepricingConfig(request, options, callback)

getCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getCustomerRepricingConfig(request, callback)

getCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IGetCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEntitlement(request, options)

getEntitlement(request?: protos.google.cloud.channel.v1.IGetEntitlementRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IEntitlement,
        protos.google.cloud.channel.v1.IGetEntitlementRequest | undefined,
        {} | undefined
    ]>;

Returns the requested resource.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer entitlement was not found.

Return value: The requested resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to retrieve.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callGetEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const response = await channelClient.getEntitlement(request);
    console.log(response);
  }

  callGetEntitlement();

getEntitlement(request, options, callback)

getEntitlement(request: protos.google.cloud.channel.v1.IGetEntitlementRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetEntitlementRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getEntitlement(request, callback)

getEntitlement(request: protos.google.cloud.channel.v1.IGetEntitlementRequest, callback: Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IGetEntitlementRequest
callback Callback<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IGetEntitlementRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

getOperation(request, options, callback)

getOperation(request: protos.google.longrunning.GetOperationRequest, options?: gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>, callback?: Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>): Promise<[protos.google.longrunning.Operation]>;

Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.

Parameters
NameDescription
request protos.google.longrunning.GetOperationRequest

The request object that will be sent.

options gax.CallOptions | Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

callback Callback<protos.google.longrunning.Operation, protos.google.longrunning.GetOperationRequest, {} | null | undefined>

The function which will be called with the result of the API call.

The second parameter to the callback is an object representing . {Promise} - The promise which resolves to an array. The first element of the array is an object representing . The promise has a method named "cancel" which cancels the ongoing API call.

Returns
TypeDescription
Promise<[protos.google.longrunning.Operation]>
Example

const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)

getProjectId()

getProjectId(): Promise<string>;
Returns
TypeDescription
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
NameDescription
callback Callback<string, undefined, undefined>
Returns
TypeDescription
void

importCustomer(request, options)

importCustomer(request?: protos.google.cloud.channel.v1.IImportCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.IImportCustomerRequest | undefined,
        {} | undefined
    ]>;

Imports a from the Cloud Identity associated with the provided Cloud Identity ID or domain before a TransferEntitlements call. If a linked Customer already exists and overwrite_if_exists is true, it will update that Customer's data.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * NOT_FOUND: Cloud Identity doesn't exist or was deleted. * INVALID_ARGUMENT: Required parameters are missing, or the auth_token is expired or invalid. * ALREADY_EXISTS: A customer already exists and has conflicting critical fields. Requires an overwrite.

Return value: The .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IImportCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Customer domain.
   */
  // const domain = 'abc123'
  /**
   *  Required. Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  Required. The resource name of the reseller's account.
   *  Parent takes the format: accounts/{account_id} or
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. The super admin of the resold customer generates this token to
   *  authorize a reseller to access their Cloud Identity and purchase
   *  entitlements on their behalf. You can omit this token after authorization.
   *  See https://support.google.com/a/answer/7643790 for more details.
   */
  // const authToken = 'abc123'
  /**
   *  Required. Choose to overwrite an existing customer if found.
   *  This must be set to true if there is an existing customer with a
   *  conflicting region code or domain.
   */
  // const overwriteIfExists = true
  /**
   *  Optional. Cloud Identity ID of a channel partner who will be the direct
   *  reseller for the customer's order. This field is required for 2-tier
   *  transfer scenarios and can be provided via the request Parent binding as
   *  well.
   */
  // const channelPartnerId = 'abc123'
  /**
   *  Optional. Specifies the customer that will receive imported Cloud Identity
   *  information.
   *  Format: accounts/{account_id}/customers/{customer_id}
   */
  // const customer = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callImportCustomer() {
    // Construct request
    const request = {
      domain,
      cloudIdentityId,
      parent,
      overwriteIfExists,
    };

    // Run request
    const response = await channelClient.importCustomer(request);
    console.log(response);
  }

  callImportCustomer();

importCustomer(request, options, callback)

importCustomer(request: protos.google.cloud.channel.v1.IImportCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IImportCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

importCustomer(request, callback)

importCustomer(request: protos.google.cloud.channel.v1.IImportCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IImportCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IImportCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

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
TypeDescription
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listChannelPartnerLinks(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink[],
        protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest | null,
        protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse
    ]>;

List s belonging to a distributor. You must be a distributor to call this method.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: The list of the distributor account's resources.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink[], protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest | null, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listChannelPartnerLinksAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listChannelPartnerLinks(request: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>
Returns
TypeDescription
void
listChannelPartnerLinks(request: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, protos.google.cloud.channel.v1.IListChannelPartnerLinksResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerLink>
Returns
TypeDescription
void

listChannelPartnerLinksAsync(request, options)

listChannelPartnerLinksAsync(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerLink>;

Equivalent to listChannelPartnerLinks, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerLink>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account for listing channel
   *  partner links. Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, server will pick a default size (25). The
   *  maximum value is 200; the server will coerce values above 200.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Obtained using
   *  ListChannelPartnerLinksResponse.next_page_token google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListChannelPartnerLinks google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The level of granularity the ChannelPartnerLink will display.
   */
  // const view = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListChannelPartnerLinks() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listChannelPartnerLinksAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListChannelPartnerLinks();

listChannelPartnerLinksStream(request, options)

listChannelPartnerLinksStream(request?: protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerLinksRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listChannelPartnerLinksAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listChannelPartnerRepricingConfigs(request, options)

listChannelPartnerRepricingConfigs(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig[],
        protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest | null,
        protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse
    ]>;

Lists information about how a Reseller modifies their bill before sending it to a ChannelPartner.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the resources. The data for each resource is displayed in the ascending order of: * channel partner ID * *

If unsuccessful, returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig[], protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest | null, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listChannelPartnerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listChannelPartnerRepricingConfigs(request, options, callback)

listChannelPartnerRepricingConfigs(request: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>
Returns
TypeDescription
void

listChannelPartnerRepricingConfigs(request, callback)

listChannelPartnerRepricingConfigs(request: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>
Returns
TypeDescription
void

listChannelPartnerRepricingConfigsAsync(request, options)

listChannelPartnerRepricingConfigsAsync(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>;

Equivalent to listChannelPartnerRepricingConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the account's
   *  ChannelPartnerLink google.cloud.channel.v1.ChannelPartnerLink. Parent
   *  uses the format:
   *  accounts/{account_id}/channelPartnerLinks/{channel_partner_id}.
   *  Supports accounts/{account_id}/channelPartnerLinks/- to retrieve configs
   *  for all channel partners.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of repricing configs to return. The service
   *  may return fewer than this value. If unspecified, returns a maximum of 50
   *  rules. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListChannelPartnerRepricingConfigsResponse.next_page_token google.cloud.channel.v1.ListChannelPartnerRepricingConfigsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListChannelPartnerRepricingConfigs google.cloud.channel.v1.CloudChannelService.ListChannelPartnerRepricingConfigs 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. A filter for
   *  CloudChannelService.ListChannelPartnerRepricingConfigs  results
   *  (channel_partner_link only). You can use this filter when you support a
   *  BatchGet-like query. To use the filter, you must set
   *  `parent=accounts/{account_id}/channelPartnerLinks/-`.
   *  Example: `channel_partner_link =
   *  accounts/account_id/channelPartnerLinks/c1` OR `channel_partner_link =
   *  accounts/account_id/channelPartnerLinks/c2`.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListChannelPartnerRepricingConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listChannelPartnerRepricingConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListChannelPartnerRepricingConfigs();

listChannelPartnerRepricingConfigsStream(request, options)

listChannelPartnerRepricingConfigsStream(request?: protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListChannelPartnerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listChannelPartnerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listCustomerRepricingConfigs(request, options)

listCustomerRepricingConfigs(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig[],
        protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest | null,
        protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse
    ]>;

Lists information about how a Reseller modifies their bill before sending it to a Customer.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the resources. The data for each resource is displayed in the ascending order of: * customer ID * * *

If unsuccessful, returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig[], protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest | null, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listCustomerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listCustomerRepricingConfigs(request, options, callback)

listCustomerRepricingConfigs(request: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>
Returns
TypeDescription
void

listCustomerRepricingConfigs(request, callback)

listCustomerRepricingConfigs(request: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, protos.google.cloud.channel.v1.IListCustomerRepricingConfigsResponse | null | undefined, protos.google.cloud.channel.v1.ICustomerRepricingConfig>
Returns
TypeDescription
void

listCustomerRepricingConfigsAsync(request, options)

listCustomerRepricingConfigsAsync(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ICustomerRepricingConfig>;

Equivalent to listCustomerRepricingConfigs, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ICustomerRepricingConfig>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the customer.
   *  Parent uses the format: accounts/{account_id}/customers/{customer_id}.
   *  Supports accounts/{account_id}/customers/- to retrieve configs for all
   *  customers.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of repricing configs to return. The service
   *  may return fewer than this value. If unspecified, returns a maximum of 50
   *  rules. The maximum value is 100; values above 100 will be coerced to 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results beyond the first page.
   *  Obtained through
   *  ListCustomerRepricingConfigsResponse.next_page_token google.cloud.channel.v1.ListCustomerRepricingConfigsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListCustomerRepricingConfigs google.cloud.channel.v1.CloudChannelService.ListCustomerRepricingConfigs 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. A filter for CloudChannelService.ListCustomerRepricingConfigs 
   *  results (customer only). You can use this filter when you support
   *  a BatchGet-like query.
   *  To use the filter, you must set `parent=accounts/{account_id}/customers/-`.
   *  Example: customer = accounts/account_id/customers/c1 OR
   *  customer = accounts/account_id/customers/c2.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListCustomerRepricingConfigs() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listCustomerRepricingConfigsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomerRepricingConfigs();

listCustomerRepricingConfigsStream(request, options)

listCustomerRepricingConfigsStream(request?: protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomerRepricingConfigsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listCustomerRepricingConfigsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listCustomers(request, options)

listCustomers(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer[],
        protos.google.cloud.channel.v1.IListCustomersRequest | null,
        protos.google.cloud.channel.v1.IListCustomersResponse
    ]>;

List s.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: List of s, or an empty list if there are no customers.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer[], protos.google.cloud.channel.v1.IListCustomersRequest | null, protos.google.cloud.channel.v1.IListCustomersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listCustomersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listCustomers(request, options, callback)

listCustomers(request: protos.google.cloud.channel.v1.IListCustomersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>
Returns
TypeDescription
void

listCustomers(request, callback)

listCustomers(request: protos.google.cloud.channel.v1.IListCustomersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListCustomersRequest, protos.google.cloud.channel.v1.IListCustomersResponse | null | undefined, protos.google.cloud.channel.v1.ICustomer>
Returns
TypeDescription
void

listCustomersAsync(request, options)

listCustomersAsync(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ICustomer>;

Equivalent to listCustomers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ICustomer>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account to list customers from.
   *  Parent uses the format: accounts/{account_id}.
   */
  // const parent = 'abc123'
  /**
   *  Optional. The maximum number of customers to return. The service may return
   *  fewer than this value. If unspecified, returns at most 10 customers. The
   *  maximum value is 50.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token identifying a page of results other than the first page.
   *  Obtained through
   *  ListCustomersResponse.next_page_token google.cloud.channel.v1.ListCustomersResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListCustomers google.cloud.channel.v1.CloudChannelService.ListCustomers 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. Filters applied to the CloudChannelService.ListCustomers 
   *  results. See
   *  https://cloud.google.com/channel/docs/concepts/google-cloud/filter-customers
   *  for more information.
   */
  // const filter = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListCustomers() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listCustomersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListCustomers();

listCustomersStream(request, options)

listCustomersStream(request?: protos.google.cloud.channel.v1.IListCustomersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListCustomersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listCustomersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listEntitlements(request, options)

listEntitlements(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IEntitlement[],
        protos.google.cloud.channel.v1.IListEntitlementsRequest | null,
        protos.google.cloud.channel.v1.IListEntitlementsResponse
    ]>;

Lists s belonging to a customer.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer's s.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IEntitlement[], protos.google.cloud.channel.v1.IListEntitlementsRequest | null, protos.google.cloud.channel.v1.IListEntitlementsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listEntitlementsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listEntitlements(request, options, callback)

listEntitlements(request: protos.google.cloud.channel.v1.IListEntitlementsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListEntitlementsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>
Returns
TypeDescription
void

listEntitlements(request, callback)

listEntitlements(request: protos.google.cloud.channel.v1.IListEntitlementsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListEntitlementsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListEntitlementsRequest, protos.google.cloud.channel.v1.IListEntitlementsResponse | null | undefined, protos.google.cloud.channel.v1.IEntitlement>
Returns
TypeDescription
void

listEntitlementsAsync(request, options)

listEntitlementsAsync(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IEntitlement>;

Equivalent to listEntitlements, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IEntitlement>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account to list
   *  entitlements for.
   *  Parent uses the format: accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, return at most 50 entitlements. The maximum
   *  value is 100; the server will coerce values above 100.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Obtained using
   *  ListEntitlementsResponse.next_page_token google.cloud.channel.v1.ListEntitlementsResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListEntitlements google.cloud.channel.v1.CloudChannelService.ListEntitlements 
   *  call.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListEntitlements() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listEntitlementsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListEntitlements();

listEntitlementsStream(request, options)

listEntitlementsStream(request?: protos.google.cloud.channel.v1.IListEntitlementsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listEntitlementsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listOffers(request, options)

listOffers(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IOffer[],
        protos.google.cloud.channel.v1.IListOffersRequest | null,
        protos.google.cloud.channel.v1.IListOffersResponse
    ]>;

Lists the Offers the reseller can sell.

Possible error codes:

* INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IOffer[], protos.google.cloud.channel.v1.IListOffersRequest | null, protos.google.cloud.channel.v1.IListOffersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listOffers(request, options, callback)

listOffers(request: protos.google.cloud.channel.v1.IListOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>
Returns
TypeDescription
void

listOffers(request, callback)

listOffers(request: protos.google.cloud.channel.v1.IListOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListOffersRequest, protos.google.cloud.channel.v1.IListOffersResponse | null | undefined, protos.google.cloud.channel.v1.IOffer>
Returns
TypeDescription
void

listOffersAsync(request, options)

listOffersAsync(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IOffer>;

Equivalent to listOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IOffer>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account from which to list
   *  Offers. Parent uses the format: accounts/{account_id}.
   */
  // const parent = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, returns at most 500 Offers. The maximum value is
   *  1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The expression to filter results by name (name of
   *  the Offer), sku.name (name of the SKU), or sku.product.name (name of the
   *  Product).
   *  Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
   *  Example 2: name=accounts/a1/offers/o1
   */
  // const filter = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListOffers() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListOffers();

listOffersStream(request, options)

listOffersStream(request?: protos.google.cloud.channel.v1.IListOffersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listOperationsAsync(request, options)

listOperationsAsync(request: protos.google.longrunning.ListOperationsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.longrunning.ListOperationsResponse>;

Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns UNIMPLEMENTED. Returns an iterable object.

For-await-of syntax is used with the iterable to recursively get response element on-demand.

Parameters
NameDescription
request protos.google.longrunning.ListOperationsRequest

The request object that will be sent.

options gax.CallOptions

Optional parameters. You can override the default settings for this call, e.g, timeout, retries, paginations, etc. See gax.CallOptions for the details.

Returns
TypeDescription
AsyncIterable<protos.google.longrunning.ListOperationsResponse>

{Object} An iterable Object that conforms to iteration protocols.

Example

const client = longrunning.operationsClient();
for await (const response of client.listOperationsAsync(request));
// doThingsWith(response)

listProducts(request, options)

listProducts(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IProduct[],
        protos.google.cloud.channel.v1.IListProductsRequest | null,
        protos.google.cloud.channel.v1.IListProductsResponse
    ]>;

Lists the Products the reseller is authorized to sell.

Possible error codes:

* INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IProduct[], protos.google.cloud.channel.v1.IListProductsRequest | null, protos.google.cloud.channel.v1.IListProductsResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listProductsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listProducts(request, options, callback)

listProducts(request: protos.google.cloud.channel.v1.IListProductsRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListProductsRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>
Returns
TypeDescription
void

listProducts(request, callback)

listProducts(request: protos.google.cloud.channel.v1.IListProductsRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListProductsRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListProductsRequest, protos.google.cloud.channel.v1.IListProductsResponse | null | undefined, protos.google.cloud.channel.v1.IProduct>
Returns
TypeDescription
void

listProductsAsync(request, options)

listProductsAsync(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IProduct>;

Equivalent to listProducts, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IProduct>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller account.
   *  Format: accounts/{account_id}.
   */
  // const account = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, returns at most 100 Products. The maximum value
   *  is 1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListProducts() {
    // Construct request
    const request = {
      account,
    };

    // Run request
    const iterable = await channelClient.listProductsAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListProducts();

listProductsStream(request, options)

listProductsStream(request?: protos.google.cloud.channel.v1.IListProductsRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListProductsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listProductsAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPurchasableOffers(request, options)

listPurchasableOffers(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IPurchasableOffer[],
        protos.google.cloud.channel.v1.IListPurchasableOffersRequest | null,
        protos.google.cloud.channel.v1.IListPurchasableOffersResponse
    ]>;

Lists the following:

* Offers that you can purchase for a customer. * Offers that you can change for an entitlement.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IPurchasableOffer[], protos.google.cloud.channel.v1.IListPurchasableOffersRequest | null, protos.google.cloud.channel.v1.IListPurchasableOffersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listPurchasableOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPurchasableOffers(request, options, callback)

listPurchasableOffers(request: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>
Returns
TypeDescription
void

listPurchasableOffers(request, callback)

listPurchasableOffers(request: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableOffersRequest, protos.google.cloud.channel.v1.IListPurchasableOffersResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableOffer>
Returns
TypeDescription
void

listPurchasableOffersAsync(request, options)

listPurchasableOffersAsync(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IPurchasableOffer>;

Equivalent to listPurchasableOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IPurchasableOffer>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  List Offers for CreateEntitlement purchase.
   */
  // const createEntitlementPurchase = {}
  /**
   *  List Offers for ChangeOffer purchase.
   */
  // const changeOfferPurchase = {}
  /**
   *  Required. The resource name of the customer to list Offers for.
   *  Format: accounts/{account_id}/customers/{customer_id}.
   */
  // const customer = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, returns at most 100 Offers. The maximum value is
   *  1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListPurchasableOffers() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const iterable = await channelClient.listPurchasableOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPurchasableOffers();

listPurchasableOffersStream(request, options)

listPurchasableOffersStream(request?: protos.google.cloud.channel.v1.IListPurchasableOffersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listPurchasableOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPurchasableSkus(request, options)

listPurchasableSkus(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IPurchasableSku[],
        protos.google.cloud.channel.v1.IListPurchasableSkusRequest | null,
        protos.google.cloud.channel.v1.IListPurchasableSkusResponse
    ]>;

Lists the following:

* SKUs that you can purchase for a customer * SKUs that you can upgrade or downgrade for an entitlement.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IPurchasableSku[], protos.google.cloud.channel.v1.IListPurchasableSkusRequest | null, protos.google.cloud.channel.v1.IListPurchasableSkusResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listPurchasableSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listPurchasableSkus(request, options, callback)

listPurchasableSkus(request: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>
Returns
TypeDescription
void

listPurchasableSkus(request, callback)

listPurchasableSkus(request: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListPurchasableSkusRequest, protos.google.cloud.channel.v1.IListPurchasableSkusResponse | null | undefined, protos.google.cloud.channel.v1.IPurchasableSku>
Returns
TypeDescription
void

listPurchasableSkusAsync(request, options)

listPurchasableSkusAsync(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.IPurchasableSku>;

Equivalent to listPurchasableSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.IPurchasableSku>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  List SKUs for CreateEntitlement purchase.
   */
  // const createEntitlementPurchase = {}
  /**
   *  List SKUs for ChangeOffer purchase with a new SKU.
   */
  // const changeOfferPurchase = {}
  /**
   *  Required. The resource name of the customer to list SKUs for.
   *  Format: accounts/{account_id}/customers/{customer_id}.
   */
  // const customer = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, returns at most 100 SKUs. The maximum value is
   *  1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListPurchasableSkus() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const iterable = await channelClient.listPurchasableSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPurchasableSkus();

listPurchasableSkusStream(request, options)

listPurchasableSkusStream(request?: protos.google.cloud.channel.v1.IListPurchasableSkusRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListPurchasableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listPurchasableSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSkus(request, options)

listSkus(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ISku[],
        protos.google.cloud.channel.v1.IListSkusRequest | null,
        protos.google.cloud.channel.v1.IListSkusResponse
    ]>;

Lists the SKUs for a product the reseller is authorized to sell.

Possible error codes:

* INVALID_ARGUMENT: Required request parameters are missing or invalid.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ISku[], protos.google.cloud.channel.v1.IListSkusRequest | null, protos.google.cloud.channel.v1.IListSkusResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSkus(request, options, callback)

listSkus(request: protos.google.cloud.channel.v1.IListSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>
Returns
TypeDescription
void

listSkus(request, callback)

listSkus(request: protos.google.cloud.channel.v1.IListSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSkusRequest, protos.google.cloud.channel.v1.IListSkusResponse | null | undefined, protos.google.cloud.channel.v1.ISku>
Returns
TypeDescription
void

listSkusAsync(request, options)

listSkusAsync(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ISku>;

Equivalent to listSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ISku>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the Product to list SKUs for.
   *  Parent uses the format: products/{product_id}.
   *  Supports products/- to retrieve SKUs for all products.
   */
  // const parent = 'abc123'
  /**
   *  Required. Resource name of the reseller.
   *  Format: accounts/{account_id}.
   */
  // const account = 'abc123'
  /**
   *  Optional. Requested page size. Server might return fewer results than
   *  requested. If unspecified, returns at most 100 SKUs. The maximum value is
   *  1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A token for a page of results other than the first page.
   *  Optional.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSkus() {
    // Construct request
    const request = {
      parent,
      account,
    };

    // Run request
    const iterable = await channelClient.listSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSkus();

listSkusStream(request, options)

listSkusStream(request?: protos.google.cloud.channel.v1.IListSkusRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSubscribers(request, options)

listSubscribers(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): Promise<[
        string[],
        protos.google.cloud.channel.v1.IListSubscribersRequest | null,
        protos.google.cloud.channel.v1.IListSubscribersResponse
    ]>;

Lists service accounts with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: A list of service email addresses.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ string[], protos.google.cloud.channel.v1.IListSubscribersRequest | null, protos.google.cloud.channel.v1.IListSubscribersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of string. 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 listSubscribersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listSubscribers(request, options, callback)

listSubscribers(request: protos.google.cloud.channel.v1.IListSubscribersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSubscribersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>
Returns
TypeDescription
void

listSubscribers(request, callback)

listSubscribers(request: protos.google.cloud.channel.v1.IListSubscribersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSubscribersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListSubscribersRequest, protos.google.cloud.channel.v1.IListSubscribersResponse | null | undefined, string>
Returns
TypeDescription
void

listSubscribersAsync(request, options)

listSubscribersAsync(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): AsyncIterable<string>;

Equivalent to listSubscribers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<string>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing string. 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the account.
   */
  // const account = 'abc123'
  /**
   *  Optional. The maximum number of service accounts to return. The service may
   *  return fewer than this value. If unspecified, returns at most 100 service
   *  accounts. The maximum value is 1000; the server will coerce values above
   *  1000.
   */
  // const pageSize = 1234
  /**
   *  Optional. A page token, received from a previous `ListSubscribers` call.
   *  Provide this to retrieve the subsequent page.
   *  When paginating, all other parameters provided to `ListSubscribers` must
   *  match the call that provided the page token.
   */
  // const pageToken = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListSubscribers() {
    // Construct request
    const request = {
      account,
    };

    // Run request
    const iterable = await channelClient.listSubscribersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListSubscribers();

listSubscribersStream(request, options)

listSubscribersStream(request?: protos.google.cloud.channel.v1.IListSubscribersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListSubscribersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing string 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 listSubscribersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTransferableOffers(request, options)

listTransferableOffers(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ITransferableOffer[],
        protos.google.cloud.channel.v1.IListTransferableOffersRequest | null,
        protos.google.cloud.channel.v1.IListTransferableOffersResponse
    ]>;

List s of a customer based on Cloud Identity ID or Customer Name in the request.

Use this method when a reseller gets the entitlement information of an unowned customer. The reseller should provide the customer's Cloud Identity ID or Customer Name.

Possible error codes:

* PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The customer provided incorrect reseller information when generating auth token. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: List of for the given customer and SKU.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ITransferableOffer[], protos.google.cloud.channel.v1.IListTransferableOffersRequest | null, protos.google.cloud.channel.v1.IListTransferableOffersResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listTransferableOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTransferableOffers(request, options, callback)

listTransferableOffers(request: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableOffersRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>
Returns
TypeDescription
void

listTransferableOffers(request, callback)

listTransferableOffers(request: protos.google.cloud.channel.v1.IListTransferableOffersRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableOffersRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableOffersRequest, protos.google.cloud.channel.v1.IListTransferableOffersResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableOffer>
Returns
TypeDescription
void

listTransferableOffersAsync(request, options)

listTransferableOffersAsync(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ITransferableOffer>;

Equivalent to listTransferableOffers, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ITransferableOffer>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  A reseller should create a customer and use the resource name of
   *  that customer here.
   */
  // const customerName = 'abc123'
  /**
   *  Required. The resource name of the reseller's account.
   */
  // const parent = 'abc123'
  /**
   *  Requested page size. Server might return fewer results than requested.
   *  If unspecified, returns at most 100 offers.
   *  The maximum value is 1000; the server will coerce values above 1000.
   */
  // const pageSize = 1234
  /**
   *  A token for a page of results other than the first page.
   *  Obtained using
   *  ListTransferableOffersResponse.next_page_token google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListTransferableOffers google.cloud.channel.v1.CloudChannelService.ListTransferableOffers 
   *  call.
   */
  // const pageToken = 'abc123'
  /**
   *  Required. The SKU to look up Offers for.
   */
  // const sku = 'abc123'
  /**
   *  Optional. The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListTransferableOffers() {
    // Construct request
    const request = {
      parent,
      sku,
    };

    // Run request
    const iterable = await channelClient.listTransferableOffersAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTransferableOffers();

listTransferableOffersStream(request, options)

listTransferableOffersStream(request?: protos.google.cloud.channel.v1.IListTransferableOffersRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableOffersRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listTransferableOffersAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTransferableSkus(request, options)

listTransferableSkus(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ITransferableSku[],
        protos.google.cloud.channel.v1.IListTransferableSkusRequest | null,
        protos.google.cloud.channel.v1.IListTransferableSkusResponse
    ]>;

List s of a customer based on the Cloud Identity ID or Customer Name in the request.

Use this method to list the entitlements information of an unowned customer. You should provide the customer's Cloud Identity ID or Customer Name.

Possible error codes:

* PERMISSION_DENIED: * The customer doesn't belong to the reseller and has no auth token. * The supplied auth token is invalid. * The reseller account making the request is different from the reseller account in the query. * INVALID_ARGUMENT: Required request parameters are missing or invalid.

Return value: A list of the customer's .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ITransferableSku[], protos.google.cloud.channel.v1.IListTransferableSkusRequest | null, protos.google.cloud.channel.v1.IListTransferableSkusResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . 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 listTransferableSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

listTransferableSkus(request, options, callback)

listTransferableSkus(request: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options: CallOptions, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableSkusRequest
options CallOptions
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>
Returns
TypeDescription
void

listTransferableSkus(request, callback)

listTransferableSkus(request: protos.google.cloud.channel.v1.IListTransferableSkusRequest, callback: PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableSkusRequest
callback PaginationCallback<protos.google.cloud.channel.v1.IListTransferableSkusRequest, protos.google.cloud.channel.v1.IListTransferableSkusResponse | null | undefined, protos.google.cloud.channel.v1.ITransferableSku>
Returns
TypeDescription
void

listTransferableSkusAsync(request, options)

listTransferableSkusAsync(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): AsyncIterable<protos.google.cloud.channel.v1.ITransferableSku>;

Equivalent to listTransferableSkus, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
AsyncIterable<protos.google.cloud.channel.v1.ITransferableSku>

{Object} An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols). When you iterate the returned iterable, each element will be an object representing . 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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Customer's Cloud Identity ID
   */
  // const cloudIdentityId = 'abc123'
  /**
   *  A reseller is required to create a customer and use the resource name of
   *  the created customer here.
   *  Customer_name uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const customerName = 'abc123'
  /**
   *  Required. The reseller account's resource name.
   *  Parent uses the format: accounts/{account_id}
   */
  // const parent = 'abc123'
  /**
   *  The requested page size. Server might return fewer results than requested.
   *  If unspecified, returns at most 100 SKUs.
   *  The maximum value is 1000; the server will coerce values above 1000.
   *  Optional.
   */
  // const pageSize = 1234
  /**
   *  A token for a page of results other than the first page.
   *  Obtained using
   *  ListTransferableSkusResponse.next_page_token google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token 
   *  of the previous
   *  CloudChannelService.ListTransferableSkus google.cloud.channel.v1.CloudChannelService.ListTransferableSkus 
   *  call. Optional.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The super admin of the resold customer generates this token to
   *  authorize a reseller to access their Cloud Identity and purchase
   *  entitlements on their behalf. You can omit this token after authorization.
   *  See https://support.google.com/a/answer/7643790 for more details.
   */
  // const authToken = 'abc123'
  /**
   *  The BCP-47 language code. For example, "en-US". The
   *  response will localize in the corresponding language code, if specified.
   *  The default value is "en-US".
   *  Optional.
   */
  // const languageCode = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callListTransferableSkus() {
    // Construct request
    const request = {
      parent,
    };

    // Run request
    const iterable = await channelClient.listTransferableSkusAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListTransferableSkus();

listTransferableSkusStream(request, options)

listTransferableSkusStream(request?: protos.google.cloud.channel.v1.IListTransferableSkusRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IListTransferableSkusRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Transform

{Stream} An object stream which emits an object representing 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 listTransferableSkusAsync() method described below for async iteration which you can stop as needed. Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination) for more details and examples.

lookupOffer(request, options)

lookupOffer(request?: protos.google.cloud.channel.v1.ILookupOfferRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IOffer,
        protos.google.cloud.channel.v1.ILookupOfferRequest | undefined,
        {} | undefined
    ]>;

Returns the requested resource.

Possible error codes:

* PERMISSION_DENIED: The entitlement doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement or offer was not found.

Return value: The resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.ILookupOfferRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IOffer, protos.google.cloud.channel.v1.ILookupOfferRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to retrieve the Offer.
   *  Entitlement uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const entitlement = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callLookupOffer() {
    // Construct request
    const request = {
      entitlement,
    };

    // Run request
    const response = await channelClient.lookupOffer(request);
    console.log(response);
  }

  callLookupOffer();

lookupOffer(request, options, callback)

lookupOffer(request: protos.google.cloud.channel.v1.ILookupOfferRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IOffer, protos.google.cloud.channel.v1.ILookupOfferRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ILookupOfferRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IOffer, protos.google.cloud.channel.v1.ILookupOfferRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

lookupOffer(request, callback)

lookupOffer(request: protos.google.cloud.channel.v1.ILookupOfferRequest, callback: Callback<protos.google.cloud.channel.v1.IOffer, protos.google.cloud.channel.v1.ILookupOfferRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ILookupOfferRequest
callback Callback<protos.google.cloud.channel.v1.IOffer, protos.google.cloud.channel.v1.ILookupOfferRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

matchAccountFromChannelPartnerLinkName(channelPartnerLinkName)

matchAccountFromChannelPartnerLinkName(channelPartnerLinkName: string): string | number;

Parse the account from ChannelPartnerLink resource.

Parameter
NameDescription
channelPartnerLinkName string

A fully-qualified path representing ChannelPartnerLink resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchAccountFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the account from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromCustomerName(customerName)

matchAccountFromCustomerName(customerName: string): string | number;

Parse the account from Customer resource.

Parameter
NameDescription
customerName string

A fully-qualified path representing Customer resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName)

matchAccountFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the account from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromEntitlementName(entitlementName)

matchAccountFromEntitlementName(entitlementName: string): string | number;

Parse the account from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromOfferName(offerName)

matchAccountFromOfferName(offerName: string): string | number;

Parse the account from Offer resource.

Parameter
NameDescription
offerName string

A fully-qualified path representing Offer resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromReportJobName(reportJobName)

matchAccountFromReportJobName(reportJobName: string): string | number;

Parse the account from ReportJob resource.

Parameter
NameDescription
reportJobName string

A fully-qualified path representing ReportJob resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchAccountFromReportName(reportName)

matchAccountFromReportName(reportName: string): string | number;

Parse the account from Report resource.

Parameter
NameDescription
reportName string

A fully-qualified path representing Report resource.

Returns
TypeDescription
string | number

{string} A string representing the account.

matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchChannelPartnerFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the channel_partner from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner.

matchChannelPartnerLinkFromChannelPartnerLinkName(channelPartnerLinkName)

matchChannelPartnerLinkFromChannelPartnerLinkName(channelPartnerLinkName: string): string | number;

Parse the channel_partner_link from ChannelPartnerLink resource.

Parameter
NameDescription
channelPartnerLinkName string

A fully-qualified path representing ChannelPartnerLink resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner_link.

matchChannelPartnerRepricingConfigFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName)

matchChannelPartnerRepricingConfigFromChannelPartnerRepricingConfigName(channelPartnerRepricingConfigName: string): string | number;

Parse the channel_partner_repricing_config from ChannelPartnerRepricingConfig resource.

Parameter
NameDescription
channelPartnerRepricingConfigName string

A fully-qualified path representing ChannelPartnerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the channel_partner_repricing_config.

matchCustomerFromCustomerName(customerName)

matchCustomerFromCustomerName(customerName: string): string | number;

Parse the customer from Customer resource.

Parameter
NameDescription
customerName string

A fully-qualified path representing Customer resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName)

matchCustomerFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the customer from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerFromEntitlementName(entitlementName)

matchCustomerFromEntitlementName(entitlementName: string): string | number;

Parse the customer from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the customer.

matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName)

matchCustomerRepricingConfigFromCustomerRepricingConfigName(customerRepricingConfigName: string): string | number;

Parse the customer_repricing_config from CustomerRepricingConfig resource.

Parameter
NameDescription
customerRepricingConfigName string

A fully-qualified path representing CustomerRepricingConfig resource.

Returns
TypeDescription
string | number

{string} A string representing the customer_repricing_config.

matchEntitlementFromEntitlementName(entitlementName)

matchEntitlementFromEntitlementName(entitlementName: string): string | number;

Parse the entitlement from Entitlement resource.

Parameter
NameDescription
entitlementName string

A fully-qualified path representing Entitlement resource.

Returns
TypeDescription
string | number

{string} A string representing the entitlement.

matchOfferFromOfferName(offerName)

matchOfferFromOfferName(offerName: string): string | number;

Parse the offer from Offer resource.

Parameter
NameDescription
offerName string

A fully-qualified path representing Offer resource.

Returns
TypeDescription
string | number

{string} A string representing the offer.

matchProductFromProductName(productName)

matchProductFromProductName(productName: string): string | number;

Parse the product from Product resource.

Parameter
NameDescription
productName string

A fully-qualified path representing Product resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchProductFromSkuName(skuName)

matchProductFromSkuName(skuName: string): string | number;

Parse the product from Sku resource.

Parameter
NameDescription
skuName string

A fully-qualified path representing Sku resource.

Returns
TypeDescription
string | number

{string} A string representing the product.

matchReportFromReportName(reportName)

matchReportFromReportName(reportName: string): string | number;

Parse the report from Report resource.

Parameter
NameDescription
reportName string

A fully-qualified path representing Report resource.

Returns
TypeDescription
string | number

{string} A string representing the report.

matchReportJobFromReportJobName(reportJobName)

matchReportJobFromReportJobName(reportJobName: string): string | number;

Parse the report_job from ReportJob resource.

Parameter
NameDescription
reportJobName string

A fully-qualified path representing ReportJob resource.

Returns
TypeDescription
string | number

{string} A string representing the report_job.

matchSkuFromSkuName(skuName)

matchSkuFromSkuName(skuName: string): string | number;

Parse the sku from Sku resource.

Parameter
NameDescription
skuName string

A fully-qualified path representing Sku resource.

Returns
TypeDescription
string | number

{string} A string representing the sku.

offerPath(account, offer)

offerPath(account: string, offer: string): string;

Return a fully-qualified offer resource name string.

Parameters
NameDescription
account string
offer string
Returns
TypeDescription
string

{string} Resource name string.

productPath(product)

productPath(product: string): string;

Return a fully-qualified product resource name string.

Parameter
NameDescription
product string
Returns
TypeDescription
string

{string} Resource name string.

provisionCloudIdentity(request, options)

provisionCloudIdentity(request?: protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Creates a Cloud Identity for the given customer using the customer's information, or the information provided here.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer was not found. * ALREADY_EXISTS: The customer's primary email already exists. Retry after changing the customer's primary contact email. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata contains an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the customer.
   *  Format: accounts/{account_id}/customers/{customer_id}
   */
  // const customer = 'abc123'
  /**
   *  CloudIdentity-specific customer information.
   */
  // const cloudIdentityInfo = {}
  /**
   *  Admin user information.
   */
  // const user = {}
  /**
   *  Validate the request and preview the review, but do not post it.
   */
  // const validateOnly = true

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callProvisionCloudIdentity() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const [operation] = await channelClient.provisionCloudIdentity(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callProvisionCloudIdentity();

provisionCloudIdentity(request, options, callback)

provisionCloudIdentity(request: protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

provisionCloudIdentity(request, callback)

provisionCloudIdentity(request: protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IProvisionCloudIdentityRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

registerSubscriber(request, options)

registerSubscriber(request?: protos.google.cloud.channel.v1.IRegisterSubscriberRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IRegisterSubscriberResponse,
        protos.google.cloud.channel.v1.IRegisterSubscriberRequest | undefined,
        {} | undefined
    ]>;

Registers a service account with subscriber privileges on the Cloud Pub/Sub topic for this Channel Services account. After you create a subscriber, you get the events through

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name with the registered service email address.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IRegisterSubscriberRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IRegisterSubscriberResponse, protos.google.cloud.channel.v1.IRegisterSubscriberRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the account.
   */
  // const account = 'abc123'
  /**
   *  Required. Service account that provides subscriber access to the registered
   *  topic.
   */
  // const serviceAccount = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callRegisterSubscriber() {
    // Construct request
    const request = {
      account,
      serviceAccount,
    };

    // Run request
    const response = await channelClient.registerSubscriber(request);
    console.log(response);
  }

  callRegisterSubscriber();

registerSubscriber(request, options, callback)

registerSubscriber(request: protos.google.cloud.channel.v1.IRegisterSubscriberRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IRegisterSubscriberResponse, protos.google.cloud.channel.v1.IRegisterSubscriberRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IRegisterSubscriberRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IRegisterSubscriberResponse, protos.google.cloud.channel.v1.IRegisterSubscriberRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

registerSubscriber(request, callback)

registerSubscriber(request: protos.google.cloud.channel.v1.IRegisterSubscriberRequest, callback: Callback<protos.google.cloud.channel.v1.IRegisterSubscriberResponse, protos.google.cloud.channel.v1.IRegisterSubscriberRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IRegisterSubscriberRequest
callback Callback<protos.google.cloud.channel.v1.IRegisterSubscriberResponse, protos.google.cloud.channel.v1.IRegisterSubscriberRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

reportJobPath(account, reportJob)

reportJobPath(account: string, reportJob: string): string;

Return a fully-qualified reportJob resource name string.

Parameters
NameDescription
account string
reportJob string
Returns
TypeDescription
string

{string} Resource name string.

reportPath(account, report)

reportPath(account: string, report: string): string;

Return a fully-qualified report resource name string.

Parameters
NameDescription
account string
report string
Returns
TypeDescription
string

{string} Resource name string.

skuPath(product, sku)

skuPath(product: string, sku: string): string;

Return a fully-qualified sku resource name string.

Parameters
NameDescription
product string
sku string
Returns
TypeDescription
string

{string} Resource name string.

startPaidService(request, options)

startPaidService(request?: protos.google.cloud.channel.v1.IStartPaidServiceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Starts paid service for a trial entitlement.

Starts paid service for a trial entitlement immediately. This method is only applicable if a plan is set up for a trial entitlement but has some trial days remaining.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.IStartPaidServiceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The name of the entitlement to start a paid service for.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callStartPaidService() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.startPaidService(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callStartPaidService();

startPaidService(request, options, callback)

startPaidService(request: protos.google.cloud.channel.v1.IStartPaidServiceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IStartPaidServiceRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

startPaidService(request, callback)

startPaidService(request: protos.google.cloud.channel.v1.IStartPaidServiceRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IStartPaidServiceRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

suspendEntitlement(request, options)

suspendEntitlement(request?: protos.google.cloud.channel.v1.ISuspendEntitlementRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Suspends a previously fulfilled entitlement.

An entitlement suspension is a long-running operation.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: Entitlement resource not found. * NOT_ACTIVE: Entitlement is not active. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.ISuspendEntitlementRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the entitlement to suspend.
   *  Name uses the format:
   *  accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
   */
  // const name = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callSuspendEntitlement() {
    // Construct request
    const request = {
      name,
    };

    // Run request
    const [operation] = await channelClient.suspendEntitlement(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callSuspendEntitlement();

suspendEntitlement(request, options, callback)

suspendEntitlement(request: protos.google.cloud.channel.v1.ISuspendEntitlementRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ISuspendEntitlementRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

suspendEntitlement(request, callback)

suspendEntitlement(request: protos.google.cloud.channel.v1.ISuspendEntitlementRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ISuspendEntitlementRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.IEntitlement, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferEntitlements(request, options)

transferEntitlements(request?: protos.google.cloud.channel.v1.ITransferEntitlementsRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Transfers customer entitlements to new reseller.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * Specify all transferring entitlements. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account that will
   *  receive transferred entitlements. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The new entitlements to create or transfer.
   */
  // const entitlements = 1234
  /**
   *  The super admin of the resold customer generates this token to
   *  authorize a reseller to access their Cloud Identity and purchase
   *  entitlements on their behalf. You can omit this token after authorization.
   *  See https://support.google.com/a/answer/7643790 for more details.
   */
  // const authToken = 'abc123'
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlements() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlements(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlements();

transferEntitlements(request, options, callback)

transferEntitlements(request: protos.google.cloud.channel.v1.ITransferEntitlementsRequest, options: CallOptions, callback: Callback<LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsRequest
options CallOptions
callback Callback<LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferEntitlements(request, callback)

transferEntitlements(request: protos.google.cloud.channel.v1.ITransferEntitlementsRequest, callback: Callback<LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsRequest
callback Callback<LROperation<protos.google.cloud.channel.v1.ITransferEntitlementsResponse, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferEntitlementsToGoogle(request, options)

transferEntitlementsToGoogle(request?: protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Transfers customer entitlements from their current reseller to Google.

Possible error codes:

* PERMISSION_DENIED: The customer doesn't belong to the reseller. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The customer or offer resource was not found. * ALREADY_EXISTS: The SKU was already transferred for the customer. * CONDITION_NOT_MET or FAILED_PRECONDITION: * The SKU requires domain verification to transfer, but the domain is not verified. * An Add-On SKU (example, Vault or Drive) is missing the pre-requisite SKU (example, G Suite Basic). * (Developer accounts only) Reseller and resold domain must meet the following naming requirements: * Domain names must start with goog-test. * Domain names must include the reseller domain. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The ID of a long-running operation.

To get the results of the operation, call the GetOperation method of CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The Operation metadata will contain an instance of .

Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{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 [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the reseller's customer account where the
   *  entitlements transfer from. Parent uses the format:
   *  accounts/{account_id}/customers/{customer_id}
   */
  // const parent = 'abc123'
  /**
   *  Required. The entitlements to transfer to Google.
   */
  // const entitlements = 1234
  /**
   *  Optional. You can specify an optional unique request ID, and if you need to
   *  retry your request, the server will know to ignore the request if it's
   *  complete.
   *  For example, you make an initial request and the request times out. If you
   *  make the request again with the same request ID, the server can check if
   *  it received the original operation with the same request ID. If it did, it
   *  will ignore the second request.
   *  The request ID must be a valid UUID (https://tools.ietf.org/html/rfc4122)
   *  with the exception that zero UUID is not supported
   *  (`00000000-0000-0000-0000-000000000000`).
   */
  // const requestId = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callTransferEntitlementsToGoogle() {
    // Construct request
    const request = {
      parent,
      entitlements,
    };

    // Run request
    const [operation] = await channelClient.transferEntitlementsToGoogle(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callTransferEntitlementsToGoogle();

transferEntitlementsToGoogle(request, options, callback)

transferEntitlementsToGoogle(request: protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest, options: CallOptions, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest
options CallOptions
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

transferEntitlementsToGoogle(request, callback)

transferEntitlementsToGoogle(request: protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest, callback: Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.ITransferEntitlementsToGoogleRequest
callback Callback<LROperation<protos.google.protobuf.IEmpty, protos.google.cloud.channel.v1.IOperationMetadata>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

unregisterSubscriber(request, options)

unregisterSubscriber(request?: protos.google.cloud.channel.v1.IUnregisterSubscriberRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IUnregisterSubscriberResponse,
        protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | undefined,
        {} | undefined
    ]>;

Unregisters a service account with subscriber privileges on the Cloud Pub/Sub topic created for this Channel Services account. If there are no service accounts left with subscriber privileges, this deletes the topic. You can call ListSubscribers to check for these accounts.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request and the provided reseller account are different, or the impersonated user is not a super admin. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: The topic resource doesn't exist. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The topic name that unregistered the service email address. Returns a success response if the service email address wasn't registered with the topic.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IUnregisterSubscriberRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IUnregisterSubscriberResponse, protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Resource name of the account.
   */
  // const account = 'abc123'
  /**
   *  Required. Service account to unregister from subscriber access to the
   *  topic.
   */
  // const serviceAccount = 'abc123'

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callUnregisterSubscriber() {
    // Construct request
    const request = {
      account,
      serviceAccount,
    };

    // Run request
    const response = await channelClient.unregisterSubscriber(request);
    console.log(response);
  }

  callUnregisterSubscriber();

unregisterSubscriber(request, options, callback)

unregisterSubscriber(request: protos.google.cloud.channel.v1.IUnregisterSubscriberRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IUnregisterSubscriberResponse, protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUnregisterSubscriberRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IUnregisterSubscriberResponse, protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

unregisterSubscriber(request, callback)

unregisterSubscriber(request: protos.google.cloud.channel.v1.IUnregisterSubscriberRequest, callback: Callback<protos.google.cloud.channel.v1.IUnregisterSubscriberResponse, protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUnregisterSubscriberRequest
callback Callback<protos.google.cloud.channel.v1.IUnregisterSubscriberResponse, protos.google.cloud.channel.v1.IUnregisterSubscriberRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
updateChannelPartnerLink(request?: protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerLink,
        (protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | undefined),
        {} | undefined
    ]>;

Updates a channel partner link. Distributors call this method to change a link's status. For example, to suspend a partner link. You must be a distributor to call this method.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: * Required request parameters are missing or invalid. * Link state cannot change from invited to active or suspended. * Cannot send reseller_cloud_identity_id, invite_url, or name in update mask. * NOT_FOUND: ChannelPartnerLink resource not found. * INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support. * UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud Channel support.

Return value: The updated resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerLink, (protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The resource name of the channel partner link to cancel.
   *  Name uses the format: accounts/{account_id}/channelPartnerLinks/{id}
   *  where {id} is the Cloud Identity ID of the partner.
   */
  // const name = 'abc123'
  /**
   *  Required. The channel partner link to update. Only
   *  channel_partner_link.link_state is allowed for updates.
   */
  // const channelPartnerLink = {}
  /**
   *  Required. The update mask that applies to the resource.
   *  The only allowable value for an update mask is
   *  channel_partner_link.link_state.
   */
  // const updateMask = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callUpdateChannelPartnerLink() {
    // Construct request
    const request = {
      name,
      channelPartnerLink,
      updateMask,
    };

    // Run request
    const response = await channelClient.updateChannelPartnerLink(request);
    console.log(response);
  }

  callUpdateChannelPartnerLink();

updateChannelPartnerLink(request: protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void
updateChannelPartnerLink(request: protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerLink, protos.google.cloud.channel.v1.IUpdateChannelPartnerLinkRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateChannelPartnerRepricingConfig(request, options)

updateChannelPartnerRepricingConfig(request?: protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig,
        (protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Updates a ChannelPartnerRepricingConfig. Call this method to set modifications for a specific ChannelPartner's bill. This method overwrites the existing CustomerRepricingConfig.

You can only update configs if the is a future month. To make changes to configs for the current month, use , taking note of its restrictions. You cannot update the .

When updating a config in the future:

* This config must already exist.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the updated resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, (protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The ChannelPartnerRepricingConfig object to update.
   */
  // const channelPartnerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callUpdateChannelPartnerRepricingConfig() {
    // Construct request
    const request = {
      channelPartnerRepricingConfig,
    };

    // Run request
    const response = await channelClient.updateChannelPartnerRepricingConfig(request);
    console.log(response);
  }

  callUpdateChannelPartnerRepricingConfig();

updateChannelPartnerRepricingConfig(request, options, callback)

updateChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateChannelPartnerRepricingConfig(request, callback)

updateChannelPartnerRepricingConfig(request: protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.IChannelPartnerRepricingConfig, protos.google.cloud.channel.v1.IUpdateChannelPartnerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCustomer(request, options)

updateCustomer(request?: protos.google.cloud.channel.v1.IUpdateCustomerRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomer,
        protos.google.cloud.channel.v1.IUpdateCustomerRequest | undefined,
        {} | undefined
    ]>;

Updates an existing resource for the reseller or distributor.

Possible error codes:

* PERMISSION_DENIED: The reseller account making the request is different from the reseller account in the API request. * INVALID_ARGUMENT: Required request parameters are missing or invalid. * NOT_FOUND: No resource found for the name in the request.

Return value: The updated resource.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IUpdateCustomerRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. New contents of the customer.
   */
  // const customer = {}
  /**
   *  The update mask that applies to the resource.
   *  Optional.
   */
  // const updateMask = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callUpdateCustomer() {
    // Construct request
    const request = {
      customer,
    };

    // Run request
    const response = await channelClient.updateCustomer(request);
    console.log(response);
  }

  callUpdateCustomer();

updateCustomer(request, options, callback)

updateCustomer(request: protos.google.cloud.channel.v1.IUpdateCustomerRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IUpdateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IUpdateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCustomer(request, callback)

updateCustomer(request: protos.google.cloud.channel.v1.IUpdateCustomerRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IUpdateCustomerRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRequest
callback Callback<protos.google.cloud.channel.v1.ICustomer, protos.google.cloud.channel.v1.IUpdateCustomerRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCustomerRepricingConfig(request, options)

updateCustomerRepricingConfig(request?: protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest, options?: CallOptions): Promise<[
        protos.google.cloud.channel.v1.ICustomerRepricingConfig,
        (protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | undefined),
        {} | undefined
    ]>;

Updates a CustomerRepricingConfig. Call this method to set modifications for a specific customer's bill. This method overwrites the existing CustomerRepricingConfig.

You can only update configs if the is a future month. To make changes to configs for the current month, use , taking note of its restrictions. You cannot update the .

When updating a config in the future:

* This config must already exist.

Possible Error Codes:

* PERMISSION_DENIED: If the account making the request and the account being queried are different. * INVALID_ARGUMENT: Missing or invalid required parameters in the request. Also displays if the updated config is for the current month or past months. * NOT_FOUND: The specified does not exist or is not associated with the given account. * INTERNAL: Any non-user error related to technical issues in the backend. In this case, contact Cloud Channel support.

Return Value: If successful, the updated resource, otherwise returns an error.

Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
TypeDescription
Promise<[ protos.google.cloud.channel.v1.ICustomerRepricingConfig, (protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. The CustomerRepricingConfig object to update.
   */
  // const customerRepricingConfig = {}

  // Imports the Channel library
  const {CloudChannelServiceClient} = require('@google-cloud/channel').v1;

  // Instantiates a client
  const channelClient = new CloudChannelServiceClient();

  async function callUpdateCustomerRepricingConfig() {
    // Construct request
    const request = {
      customerRepricingConfig,
    };

    // Run request
    const response = await channelClient.updateCustomerRepricingConfig(request);
    console.log(response);
  }

  callUpdateCustomerRepricingConfig();

updateCustomerRepricingConfig(request, options, callback)

updateCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest, options: CallOptions, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest
options CallOptions
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void

updateCustomerRepricingConfig(request, callback)

updateCustomerRepricingConfig(request: protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest, callback: Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>): void;
Parameters
NameDescription
request protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest
callback Callback<protos.google.cloud.channel.v1.ICustomerRepricingConfig, protos.google.cloud.channel.v1.IUpdateCustomerRepricingConfigRequest | null | undefined, {} | null | undefined>
Returns
TypeDescription
void