ContactCenterInsightsClient

ContactCenterInsightsClient

An API that lets users analyze and explore their business conversation data.

Constructor

new ContactCenterInsightsClient(optionsopt, gaxInstanceopt)

Construct an instance of ContactCenterInsightsClient.

Parameters:
Name Type Attributes Description
options object <optional>

The configuration object. The options accepted by the constructor are described in detail in this document. The common options are:

Properties
Name Type Attributes Description
credentials object <optional>

Credentials object.

Properties
Name Type Attributes Description
client_email string <optional>
private_key string <optional>
email string <optional>

Account email address. Required when using a .pem or .p12 keyFilename.

keyFilename string <optional>

Full path to the a .json, .pem, or .p12 key downloaded from the Google Developers Console. If you provide a path to a JSON file, the projectId option below is not necessary. NOTE: .pem and .p12 require you to specify options.email as well.

port number <optional>

The port on which to connect to the remote host.

projectId string <optional>

The project ID from the Google Developer's Console, e.g. 'grape-spaceship-123'. We will also check the environment variable GCLOUD_PROJECT for your project ID. If your app is running in an environment which supports Application Default Credentials, your project ID will be detected automatically.

apiEndpoint string <optional>

The domain name of the API remote host.

clientConfig gax.ClientConfig <optional>

Client configuration override. Follows the structure of gapicConfig.

fallback boolean <optional>

Use HTTP/1.1 REST mode. For more information, please check the documentation.

gaxInstance gax <optional>

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 ContactCenterInsightsClient({fallback: true}, gax);

Members

apiEndpoint

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

port

The port for this API service.

scopes

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

servicePath

The DNS address for this API service.

Methods

analysisPath(project, location, conversation, analysis) → {string}

Return a fully-qualified analysis resource name string.

Parameters:
Name Type Description
project string
location string
conversation string
analysis string
Returns:
Type Description
string

Resource name string.

cancelOperation(request, optionsopt, callbackopt) → {Promise}

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 Operations.GetOperation 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 Operation.error value with a google.rpc.Status.code of 1, corresponding to Code.CANCELLED.

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource to be cancelled.

options Object <optional>

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

callback function <optional>

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

Returns:
Type Description
Promise
  • The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
await client.cancelOperation({name: ''});
```

(async) checkBulkAnalyzeConversationsProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 parent resource to create analyses in.
   */
  // const parent = 'abc123'
  /**
   *  Required. Filter used to select the subset of conversations to analyze.
   */
  // const filter = 'abc123'
  /**
   *  Required. Percentage of selected conversation to analyze, between
   *  0, 100.
   */
  // const analysisPercentage = 1234
  /**
   *  To select the annotators to run and the phrase matchers to use
   *  (if any). If not specified, all annotators will be run.
   */
  // const annotatorSelector = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

  async function callBulkAnalyzeConversations() {
    // Construct request
    const request = {
      parent,
      filter,
      analysisPercentage,
    };

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

  callBulkAnalyzeConversations();

(async) checkBulkDeleteConversationsProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 parent resource to delete conversations from.
   *  Format:
   *  projects/{project}/locations/{location}
   */
  // const parent = 'abc123'
  /**
   *  Filter used to select the subset of conversations to delete.
   */
  // const filter = 'abc123'
  /**
   *  Maximum number of conversations to delete.
   */
  // const maxDeleteCount = 1234
  /**
   *  If set to true, all of this conversation's analyses will also be deleted.
   *  Otherwise, the request will only succeed if the conversation has no
   *  analyses.
   */
  // const force = true

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callBulkDeleteConversations();

(async) checkCreateAnalysisProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 parent resource of the analysis.
   */
  // const parent = 'abc123'
  /**
   *  Required. The analysis to create.
   */
  // const analysis = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callCreateAnalysis();

(async) checkCreateIssueModelProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 parent resource of the issue model.
   */
  // const parent = 'abc123'
  /**
   *  Required. The issue model to create.
   */
  // const issueModel = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callCreateIssueModel();

(async) checkDeleteIssueModelProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 issue model to delete.
   */
  // const name = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callDeleteIssueModel();

(async) checkDeployIssueModelProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 issue model to deploy.
   */
  // const name = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callDeployIssueModel();

(async) checkExportInsightsDataProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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.
   */
  /**
   *  Specified if sink is a BigQuery table.
   */
  // const bigQueryDestination = {}
  /**
   *  Required. The parent resource to export data from.
   */
  // const parent = 'abc123'
  /**
   *  A filter to reduce results to a specific subset. Useful for exporting
   *  conversations with specific properties.
   */
  // const filter = 'abc123'
  /**
   *  A fully qualified KMS key name for BigQuery tables protected by CMEK.
   *  Format:
   *  projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{key}/cryptoKeyVersions/{version}
   */
  // const kmsKey = 'abc123'
  /**
   *  Options for what to do if the destination table already exists.
   */
  // const writeDisposition = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callExportInsightsData();

(async) checkIngestConversationsProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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.
   */
  /**
   *  A cloud storage bucket source. Note that any previously ingested objects
   *  from the source will be skipped to avoid duplication.
   */
  // const gcsSource = {}
  /**
   *  Configuration for when `source` contains conversation transcripts.
   */
  // const transcriptObjectConfig = {}
  /**
   *  Required. The parent resource for new conversations.
   */
  // const parent = 'abc123'
  /**
   *  Configuration that applies to all conversations.
   */
  // const conversationConfig = {}
  /**
   *  Optional. DLP settings for transcript redaction. Optional, will default to
   *  the config specified in Settings.
   */
  // const redactionConfig = {}
  /**
   *  Optional. Default Speech-to-Text configuration. Optional, will default to
   *  the config specified in Settings.
   */
  // const speechConfig = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callIngestConversations();

(async) checkUndeployIssueModelProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 issue model to undeploy.
   */
  // const name = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callUndeployIssueModel();

(async) checkUploadConversationProgress(name) → {Promise}

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

Parameters:
Name Type Description
name String

The operation name that will be passed.

Returns:
Type Description
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 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 parent resource of the conversation.
   */
  // const parent = 'abc123'
  /**
   *  Required. The conversation resource to create.
   */
  // const conversation = {}
  /**
   *  Optional. A unique ID for the new conversation. This ID will become the
   *  final component of the conversation's resource name. If no ID is specified,
   *  a server-generated ID will be used.
   *  This value should be 4-64 characters and must match the regular
   *  expression `^[a-z0-9-]{4,64}$`. Valid characters are `[a-z][0-9]-`
   */
  // const conversationId = 'abc123'
  /**
   *  Optional. DLP settings for transcript redaction. Will default to the config
   *  specified in Settings.
   */
  // const redactionConfig = {}
  /**
   *  Optional. Speech-to-Text configuration. Will default to the config
   *  specified in Settings.
   */
  // const speechConfig = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callUploadConversation();

close() → {Promise}

Terminate the gRPC channel and close the client.

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

Returns:
Type Description
Promise

A promise that resolves when the client is closed.

conversationPath(project, location, conversation) → {string}

Return a fully-qualified conversation resource name string.

Parameters:
Name Type Description
project string
location string
conversation string
Returns:
Type Description
string

Resource name string.

deleteOperation(request, optionsopt, callbackopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource to be deleted.

options Object <optional>

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

callback function <optional>

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

Returns:
Type Description
Promise
  • The promise which resolves when API call finishes. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
await client.deleteOperation({name: ''});
```

getOperation(request, optionsopt, callbackopt) → {Promise}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
name string

The name of the operation resource.

options Object <optional>

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

callback function <optional>

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

The second parameter to the callback is an object representing google.longrunning.Operation.

Returns:
Type Description
Promise
  • The promise which resolves to an array. The first element of the array is an object representing google.longrunning.Operation. The promise has a method named "cancel" which cancels the ongoing API call.
Example
```
const client = longrunning.operationsClient();
const name = '';
const [response] = await client.getOperation({name});
// doThingsWith(response)
```

getProjectId() → {Promise}

Return the project ID used by this class.

Returns:
Type Description
Promise

A promise that resolves to string containing the project ID.

initialize() → {Promise}

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:
Type Description
Promise

A promise that resolves to an authenticated service stub.

issueModelPath(project, location, issue_model) → {string}

Return a fully-qualified issueModel resource name string.

Parameters:
Name Type Description
project string
location string
issue_model string
Returns:
Type Description
string

Resource name string.

issuePath(project, location, issue_model, issue) → {string}

Return a fully-qualified issue resource name string.

Parameters:
Name Type Description
project string
location string
issue_model string
issue string
Returns:
Type Description
string

Resource name string.

listAnalysesAsync(request, optionsopt) → {Object}

Equivalent to listAnalyses, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the analyses.

pageSize number

The maximum number of analyses to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListAnalysesResponse; indicates that this is a continuation of a prior ListAnalyses call and the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Analysis. 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 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 parent resource of the analyses.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of analyses to return in the response. If this
   *  value is zero, the service will select a default size. A call might return
   *  fewer objects than requested. A non-empty `next_page_token` in the response
   *  indicates that more data is available.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListAnalysesResponse`; indicates
   *  that this is a continuation of a prior `ListAnalyses` call and
   *  the system should return the next page of data.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter to reduce results to a specific subset. Useful for querying
   *  conversations with specific properties.
   */
  // const filter = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callListAnalyses();

listAnalysesStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the analyses.

pageSize number

The maximum number of analyses to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListAnalysesResponse; indicates that this is a continuation of a prior ListAnalyses call and the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Analysis 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 listAnalysesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listConversationsAsync(request, optionsopt) → {Object}

Equivalent to listConversations, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the conversation.

pageSize number

The maximum number of conversations to return in the response. A valid page size ranges from 0 to 1,000 inclusive. If the page size is zero or unspecified, a default page size of 100 will be chosen. Note that a call might return fewer results than the requested page size.

pageToken string

The value returned by the last ListConversationsResponse. This value indicates that this is a continuation of a prior ListConversations call and that the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

view google.cloud.contactcenterinsights.v1.ConversationView

The level of details of the conversation. Default is BASIC.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Conversation. 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 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 parent resource of the conversation.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of conversations to return in the response. A valid page
   *  size ranges from 0 to 1,000 inclusive. If the page size is zero or
   *  unspecified, a default page size of 100 will be chosen. Note that a call
   *  might return fewer results than the requested page size.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListConversationsResponse`. This value
   *  indicates that this is a continuation of a prior `ListConversations` call
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter to reduce results to a specific subset. Useful for querying
   *  conversations with specific properties.
   */
  // const filter = 'abc123'
  /**
   *  The level of details of the conversation. Default is `BASIC`.
   */
  // const view = {}

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callListConversations();

listConversationsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the conversation.

pageSize number

The maximum number of conversations to return in the response. A valid page size ranges from 0 to 1,000 inclusive. If the page size is zero or unspecified, a default page size of 100 will be chosen. Note that a call might return fewer results than the requested page size.

pageToken string

The value returned by the last ListConversationsResponse. This value indicates that this is a continuation of a prior ListConversations call and that the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying conversations with specific properties.

view google.cloud.contactcenterinsights.v1.ConversationView

The level of details of the conversation. Default is BASIC.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing Conversation 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 listConversationsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listOperationsAsync(request, optionsopt) → {Object}

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:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Attributes Description
name string

The name of the operation collection.

filter string

The standard list filter.

pageSize number <optional>

The maximum number of resources contained in the underlying API response. If page streaming is performed per-resource, this parameter does not affect the return value. If page streaming is performed per-page, this determines the maximum number of resources in a page.

options Object <optional>

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

Returns:
Type Description
Object

An iterable Object that conforms to iteration protocols.

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

listPhraseMatchersAsync(request, optionsopt) → {Object}

Equivalent to listPhraseMatchers, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the phrase matcher.

pageSize number

The maximum number of phrase matchers to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListPhraseMatchersResponse. This value indicates that this is a continuation of a prior ListPhraseMatchers call and that the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying phrase matchers with specific properties.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing PhraseMatcher. 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 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 parent resource of the phrase matcher.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of phrase matchers to return in the response. If this
   *  value is zero, the service will select a default size. A call might return
   *  fewer objects than requested. A non-empty `next_page_token` in the response
   *  indicates that more data is available.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListPhraseMatchersResponse`. This value
   *  indicates that this is a continuation of a prior `ListPhraseMatchers` call
   *  and that the system should return the next page of data.
   */
  // const pageToken = 'abc123'
  /**
   *  A filter to reduce results to a specific subset. Useful for querying
   *  phrase matchers with specific properties.
   */
  // const filter = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callListPhraseMatchers();

listPhraseMatchersStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the phrase matcher.

pageSize number

The maximum number of phrase matchers to return in the response. If this value is zero, the service will select a default size. A call might return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListPhraseMatchersResponse. This value indicates that this is a continuation of a prior ListPhraseMatchers call and that the system should return the next page of data.

filter string

A filter to reduce results to a specific subset. Useful for querying phrase matchers with specific properties.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing PhraseMatcher 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 listPhraseMatchersAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listViewsAsync(request, optionsopt) → {Object}

Equivalent to listViews, but returns an iterable object.

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the views.

pageSize number

The maximum number of views to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListViewsResponse; indicates that this is a continuation of a prior ListViews call and the system should return the next page of data.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Object

An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing View. 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 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 parent resource of the views.
   */
  // const parent = 'abc123'
  /**
   *  The maximum number of views to return in the response. If this
   *  value is zero, the service will select a default size. A call may return
   *  fewer objects than requested. A non-empty `next_page_token` in the response
   *  indicates that more data is available.
   */
  // const pageSize = 1234
  /**
   *  The value returned by the last `ListViewsResponse`; indicates
   *  that this is a continuation of a prior `ListViews` call and
   *  the system should return the next page of data.
   */
  // const pageToken = 'abc123'

  // Imports the Contactcenterinsights library
  const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1;

  // Instantiates a client
  const contactcenterinsightsClient = new ContactCenterInsightsClient();

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

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

  callListViews();

listViewsStream(request, optionsopt) → {Stream}

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

Parameters:
Name Type Attributes Description
request Object

The request object that will be sent.

Properties
Name Type Description
parent string

Required. The parent resource of the views.

pageSize number

The maximum number of views to return in the response. If this value is zero, the service will select a default size. A call may return fewer objects than requested. A non-empty next_page_token in the response indicates that more data is available.

pageToken string

The value returned by the last ListViewsResponse; indicates that this is a continuation of a prior ListViews call and the system should return the next page of data.

options object <optional>

Call options. See CallOptions for more details.

Returns:
Type Description
Stream

An object stream which emits an object representing View 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 listViewsAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

locationPath(project, location) → {string}

Return a fully-qualified location resource name string.

Parameters:
Name Type Description
project string
location string
Returns:
Type Description
string

Resource name string.

matchAnalysisFromAnalysisName(analysisName) → {string}

Parse the analysis from Analysis resource.

Parameters:
Name Type Description
analysisName string

A fully-qualified path representing Analysis resource.

Returns:
Type Description
string

A string representing the analysis.

matchConversationFromAnalysisName(analysisName) → {string}

Parse the conversation from Analysis resource.

Parameters:
Name Type Description
analysisName string

A fully-qualified path representing Analysis resource.

Returns:
Type Description
string

A string representing the conversation.

matchConversationFromConversationName(conversationName) → {string}

Parse the conversation from Conversation resource.

Parameters:
Name Type Description
conversationName string

A fully-qualified path representing Conversation resource.

Returns:
Type Description
string

A string representing the conversation.

matchIssueFromIssueName(issueName) → {string}

Parse the issue from Issue resource.

Parameters:
Name Type Description
issueName string

A fully-qualified path representing Issue resource.

Returns:
Type Description
string

A string representing the issue.

matchIssueModelFromIssueModelName(issueModelName) → {string}

Parse the issue_model from IssueModel resource.

Parameters:
Name Type Description
issueModelName string

A fully-qualified path representing IssueModel resource.

Returns:
Type Description
string

A string representing the issue_model.

matchIssueModelFromIssueName(issueName) → {string}

Parse the issue_model from Issue resource.

Parameters:
Name Type Description
issueName string

A fully-qualified path representing Issue resource.

Returns:
Type Description
string

A string representing the issue_model.

matchLocationFromAnalysisName(analysisName) → {string}

Parse the location from Analysis resource.

Parameters:
Name Type Description
analysisName string

A fully-qualified path representing Analysis resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromConversationName(conversationName) → {string}

Parse the location from Conversation resource.

Parameters:
Name Type Description
conversationName string

A fully-qualified path representing Conversation resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromIssueModelName(issueModelName) → {string}

Parse the location from IssueModel resource.

Parameters:
Name Type Description
issueModelName string

A fully-qualified path representing IssueModel resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromIssueName(issueName) → {string}

Parse the location from Issue resource.

Parameters:
Name Type Description
issueName string

A fully-qualified path representing Issue resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromLocationName(locationName) → {string}

Parse the location from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromPhraseMatcherName(phraseMatcherName) → {string}

Parse the location from PhraseMatcher resource.

Parameters:
Name Type Description
phraseMatcherName string

A fully-qualified path representing PhraseMatcher resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromSettingsName(settingsName) → {string}

Parse the location from Settings resource.

Parameters:
Name Type Description
settingsName string

A fully-qualified path representing Settings resource.

Returns:
Type Description
string

A string representing the location.

matchLocationFromViewName(viewName) → {string}

Parse the location from View resource.

Parameters:
Name Type Description
viewName string

A fully-qualified path representing View resource.

Returns:
Type Description
string

A string representing the location.

matchPhraseMatcherFromPhraseMatcherName(phraseMatcherName) → {string}

Parse the phrase_matcher from PhraseMatcher resource.

Parameters:
Name Type Description
phraseMatcherName string

A fully-qualified path representing PhraseMatcher resource.

Returns:
Type Description
string

A string representing the phrase_matcher.

matchProjectFromAnalysisName(analysisName) → {string}

Parse the project from Analysis resource.

Parameters:
Name Type Description
analysisName string

A fully-qualified path representing Analysis resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromConversationName(conversationName) → {string}

Parse the project from Conversation resource.

Parameters:
Name Type Description
conversationName string

A fully-qualified path representing Conversation resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromIssueModelName(issueModelName) → {string}

Parse the project from IssueModel resource.

Parameters:
Name Type Description
issueModelName string

A fully-qualified path representing IssueModel resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromIssueName(issueName) → {string}

Parse the project from Issue resource.

Parameters:
Name Type Description
issueName string

A fully-qualified path representing Issue resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromLocationName(locationName) → {string}

Parse the project from Location resource.

Parameters:
Name Type Description
locationName string

A fully-qualified path representing Location resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromPhraseMatcherName(phraseMatcherName) → {string}

Parse the project from PhraseMatcher resource.

Parameters:
Name Type Description
phraseMatcherName string

A fully-qualified path representing PhraseMatcher resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromSettingsName(settingsName) → {string}

Parse the project from Settings resource.

Parameters:
Name Type Description
settingsName string

A fully-qualified path representing Settings resource.

Returns:
Type Description
string

A string representing the project.

matchProjectFromViewName(viewName) → {string}

Parse the project from View resource.

Parameters:
Name Type Description
viewName string

A fully-qualified path representing View resource.

Returns:
Type Description
string

A string representing the project.

matchViewFromViewName(viewName) → {string}

Parse the view from View resource.

Parameters:
Name Type Description
viewName string

A fully-qualified path representing View resource.

Returns:
Type Description
string

A string representing the view.

phraseMatcherPath(project, location, phrase_matcher) → {string}

Return a fully-qualified phraseMatcher resource name string.

Parameters:
Name Type Description
project string
location string
phrase_matcher string
Returns:
Type Description
string

Resource name string.

settingsPath(project, location) → {string}

Return a fully-qualified settings resource name string.

Parameters:
Name Type Description
project string
location string
Returns:
Type Description
string

Resource name string.

viewPath(project, location, view) → {string}

Return a fully-qualified view resource name string.

Parameters:
Name Type Description
project string
location string
view string
Returns:
Type Description
string

Resource name string.