diff --git a/packages/google-cloud-contactcenterinsights/README.md b/packages/google-cloud-contactcenterinsights/README.md index b8683873c39..70264defd4d 100644 --- a/packages/google-cloud-contactcenterinsights/README.md +++ b/packages/google-cloud-contactcenterinsights/README.md @@ -87,6 +87,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Contact_center_insights.bulk_analyze_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js,samples/README.md) | | Contact_center_insights.calculate_issue_model_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js,samples/README.md) | | Contact_center_insights.calculate_stats | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_stats.js,samples/README.md) | | Contact_center_insights.create_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_analysis.js,samples/README.md) | @@ -96,6 +97,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Contact_center_insights.create_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.create_view.js,samples/README.md) | | Contact_center_insights.delete_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_analysis.js,samples/README.md) | | Contact_center_insights.delete_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_conversation.js,samples/README.md) | +| Contact_center_insights.delete_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js,samples/README.md) | | Contact_center_insights.delete_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js,samples/README.md) | | Contact_center_insights.delete_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_phrase_matcher.js,samples/README.md) | | Contact_center_insights.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,samples/README.md) | @@ -108,6 +110,7 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Contact_center_insights.get_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,samples/README.md) | | Contact_center_insights.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,samples/README.md) | | Contact_center_insights.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,samples/README.md) | +| Contact_center_insights.ingest_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js,samples/README.md) | | Contact_center_insights.list_analyses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,samples/README.md) | | Contact_center_insights.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,samples/README.md) | | Contact_center_insights.list_issue_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,samples/README.md) | diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto index c5956b93f16..1ecf4321683 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -121,6 +121,33 @@ service ContactCenterInsights { option (google.api.method_signature) = "name"; } + // Analyzes multiple conversations in a single request. + rpc BulkAnalyzeConversations(BulkAnalyzeConversationsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze" + body: "*" + }; + option (google.api.method_signature) = "parent,filter,analysis_percentage"; + option (google.longrunning.operation_info) = { + response_type: "BulkAnalyzeConversationsResponse" + metadata_type: "BulkAnalyzeConversationsMetadata" + }; + } + + // Imports conversations and processes them according to the user's + // configuration. + rpc IngestConversations(IngestConversationsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/conversations:ingest" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "IngestConversationsResponse" + metadata_type: "IngestConversationsMetadata" + }; + } + // Export insights data to a destination defined in the request body. rpc ExportInsightsData(ExportInsightsDataRequest) returns (google.longrunning.Operation) { option (google.api.http) = { @@ -237,6 +264,14 @@ service ContactCenterInsights { option (google.api.method_signature) = "issue,update_mask"; } + // Deletes an issue. + rpc DeleteIssue(DeleteIssueRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}" + }; + option (google.api.method_signature) = "name"; + } + // Gets an issue model's statistics. rpc CalculateIssueModelStats(CalculateIssueModelStatsRequest) returns (CalculateIssueModelStatsResponse) { option (google.api.http) = { @@ -456,6 +491,9 @@ message CreateAnalysisOperationMetadata { type: "contactcenterinsights.googleapis.com/Conversation" } ]; + + // Output only. The annotator selector used for the analysis (if any). + AnnotatorSelector annotator_selector = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Request to create a conversation. @@ -559,6 +597,73 @@ message DeleteConversationRequest { bool force = 2; } +// The request to ingest conversations. +message IngestConversationsRequest { + // Configuration for Cloud Storage bucket sources. + message GcsSource { + // Required. The Cloud Storage bucket containing source objects. + string bucket_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration for processing transcript objects. + message TranscriptObjectConfig { + // Required. The medium transcript objects represent. + Conversation.Medium medium = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // Configuration that applies to all conversations. + message ConversationConfig { + // An opaque, user-specified string representing the human agent who handled + // the conversations. + string agent_id = 1; + } + + // Configuration for an external data store containing objects that will + // be converted to conversations. + oneof source { + // A cloud storage bucket source. + GcsSource gcs_source = 2; + } + + // Configuration for converting individual `source` objects to conversations. + oneof object_config { + // Configuration for when `source` contains conversation transcripts. + TranscriptObjectConfig transcript_object_config = 3; + } + + // Required. The parent resource for new conversations. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Configuration that applies to all conversations. + ConversationConfig conversation_config = 4; +} + +// The metadata for an IngestConversations operation. +message IngestConversationsMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The original request for ingest. + IngestConversationsRequest request = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Partial errors during ingest operation that might cause the operation + // output to be incomplete. + repeated google.rpc.Status partial_errors = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// The response to an IngestConversations operation. +message IngestConversationsResponse { + +} + // The request to create an analysis. message CreateAnalysisRequest { // Required. The parent resource of the analysis. @@ -631,6 +736,59 @@ message DeleteAnalysisRequest { ]; } +// The request to analyze conversations in bulk. +message BulkAnalyzeConversationsRequest { + // Required. The parent resource to create analyses in. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. Filter used to select the subset of conversations to analyze. + string filter = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Percentage of selected conversation to analyze, between + // [0, 100]. + float analysis_percentage = 3 [(google.api.field_behavior) = REQUIRED]; + + // To select the annotators to run and the phrase matchers to use + // (if any). If not specified, all annotators will be run. + AnnotatorSelector annotator_selector = 8; +} + +// The metadata for a bulk analyze conversations operation. +message BulkAnalyzeConversationsMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // The original request for bulk analyze. + BulkAnalyzeConversationsRequest request = 3; + + // The number of requested analyses that have completed successfully so far. + int32 completed_analyses_count = 4; + + // The number of requested analyses that have failed so far. + int32 failed_analyses_count = 5; + + // Total number of analyses requested. Computed by the number of conversations + // returned by `filter` multiplied by `analysis_percentage` in the request. + int32 total_requested_analyses_count = 6; +} + +// The response for a bulk analyze conversations operation. +message BulkAnalyzeConversationsResponse { + // Count of successful analyses. + int32 successful_analysis_count = 1; + + // Count of failed analyses. + int32 failed_analysis_count = 2; +} + // The request to export insights. message ExportInsightsDataRequest { // A BigQuery Table Reference. @@ -891,6 +1049,17 @@ message UpdateIssueRequest { google.protobuf.FieldMask update_mask = 2; } +// The request to delete an issue. +message DeleteIssueRequest { + // Required. The name of the issue to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/Issue" + } + ]; +} + // Request to get statistics of an issue model. message CalculateIssueModelStatsRequest { // Required. The resource name of the issue model to query against. diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto index bac8515aab5..715eff61177 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -227,6 +227,10 @@ message Analysis { // Output only. The result of the analysis, which is populated when the analysis // finishes. AnalysisResult analysis_result = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // To select the annotators to run and the phrase matchers to use + // (if any). If not specified, all annotators will be run. + AnnotatorSelector annotator_selector = 8; } // The conversation source, which is a combination of transcript and audio. @@ -356,6 +360,9 @@ message CallAnnotation { // Data specifying a phrase match. PhraseMatchData phrase_match_data = 17; + + // Data specifying an issue match. + IssueMatchData issue_match_data = 18; } // The channel of the audio where the annotation occurs. For single-channel @@ -579,6 +586,12 @@ message SentimentData { float score = 2; } +// The data for an issue match annotation. +message IssueMatchData { + // Information about the issue's assignment. + IssueAssignment issue_assignment = 1; +} + // The issue model resource. message IssueModel { option (google.api.resource) = { @@ -670,6 +683,10 @@ message Issue { // Output only. The most recent time that this issue was updated. google.protobuf.Timestamp update_time = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Resource names of the sample representative utterances that match to this + // issue. + repeated string sample_utterances = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; } // Aggregated statistics about an issue model. @@ -828,6 +845,10 @@ message Settings { // Percentage of conversations created using Dialogflow runtime integration // to analyze automatically, between [0, 100]. double runtime_integration_analysis_percentage = 1; + + // To select the annotators to run and the phrase matchers to use + // (if any). If not specified, all annotators will be run. + AnnotatorSelector annotator_selector = 5; } // Immutable. The resource name of the settings resource. @@ -1114,3 +1135,46 @@ message View { // String with specific view properties. string value = 5; } + +// Selector of all available annotators and phrase matchers to run. +message AnnotatorSelector { + // Whether to run the interruption annotator. + bool run_interruption_annotator = 1; + + // Whether to run the silence annotator. + bool run_silence_annotator = 2; + + // Whether to run the active phrase matcher annotator(s). + bool run_phrase_matcher_annotator = 3; + + // The list of phrase matchers to run. If not provided, all active phrase + // matchers will be used. If inactive phrase matchers are provided, they will + // not be used. Phrase matchers will be run only if + // run_phrase_matcher_annotator is set to true. Format: + // projects/{project}/locations/{location}/phraseMatchers/{phrase_matcher} + repeated string phrase_matchers = 4 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/PhraseMatcher" + }]; + + // Whether to run the sentiment annotator. + bool run_sentiment_annotator = 5; + + // Whether to run the entity annotator. + bool run_entity_annotator = 6; + + // Whether to run the intent annotator. + bool run_intent_annotator = 7; + + // Whether to run the issue model annotator. A model should have already been + // deployed for this to take effect. + bool run_issue_model_annotator = 8; + + // The issue model to run. If not provided, the most recently deployed topic + // model will be used. The provided issue model will only be used for + // inference if the issue model is deployed and if run_issue_model_annotator + // is set to true. If more than one issue model is provided, only the first + // provided issue model will be used for inference. + repeated string issue_models = 10 [(google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + }]; +} diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts index c54fe68d054..70b95c70d99 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -172,6 +172,34 @@ export namespace google { */ public deleteAnalysis(request: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest): Promise; + /** + * Calls BulkAnalyzeConversations. + * @param request BulkAnalyzeConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public bulkAnalyzeConversations(request: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkAnalyzeConversationsCallback): void; + + /** + * Calls BulkAnalyzeConversations. + * @param request BulkAnalyzeConversationsRequest message or plain object + * @returns Promise + */ + public bulkAnalyzeConversations(request: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest): Promise; + + /** + * Calls IngestConversations. + * @param request IngestConversationsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public ingestConversations(request: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.IngestConversationsCallback): void; + + /** + * Calls IngestConversations. + * @param request IngestConversationsRequest message or plain object + * @returns Promise + */ + public ingestConversations(request: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest): Promise; + /** * Calls ExportInsightsData. * @param request ExportInsightsDataRequest message or plain object @@ -326,6 +354,20 @@ export namespace google { */ public updateIssue(request: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest): Promise; + /** + * Calls DeleteIssue. + * @param request DeleteIssueRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteIssue(request: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueCallback): void; + + /** + * Calls DeleteIssue. + * @param request DeleteIssueRequest message or plain object + * @returns Promise + */ + public deleteIssue(request: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest): Promise; + /** * Calls CalculateIssueModelStats. * @param request CalculateIssueModelStatsRequest message or plain object @@ -588,6 +630,20 @@ export namespace google { */ type DeleteAnalysisCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkAnalyzeConversations}. + * @param error Error, if any + * @param [response] Operation + */ + type BulkAnalyzeConversationsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|ingestConversations}. + * @param error Error, if any + * @param [response] Operation + */ + type IngestConversationsCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportInsightsData}. * @param error Error, if any @@ -665,6 +721,13 @@ export namespace google { */ type UpdateIssueCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Issue) => void; + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteIssue}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteIssueCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateIssueModelStats}. * @param error Error, if any @@ -1236,6 +1299,9 @@ export namespace google { /** CreateAnalysisOperationMetadata conversation */ conversation?: (string|null); + + /** CreateAnalysisOperationMetadata annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); } /** Represents a CreateAnalysisOperationMetadata. */ @@ -1256,6 +1322,9 @@ export namespace google { /** CreateAnalysisOperationMetadata conversation. */ public conversation: string; + /** CreateAnalysisOperationMetadata annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + /** * Creates a new CreateAnalysisOperationMetadata instance using the specified properties. * @param [properties] Properties to set @@ -1976,241 +2045,862 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreateAnalysisRequest. */ - interface ICreateAnalysisRequest { + /** Properties of an IngestConversationsRequest. */ + interface IIngestConversationsRequest { - /** CreateAnalysisRequest parent */ + /** IngestConversationsRequest gcsSource */ + gcsSource?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource|null); + + /** IngestConversationsRequest transcriptObjectConfig */ + transcriptObjectConfig?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig|null); + + /** IngestConversationsRequest parent */ parent?: (string|null); - /** CreateAnalysisRequest analysis */ - analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** IngestConversationsRequest conversationConfig */ + conversationConfig?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig|null); } - /** Represents a CreateAnalysisRequest. */ - class CreateAnalysisRequest implements ICreateAnalysisRequest { + /** Represents an IngestConversationsRequest. */ + class IngestConversationsRequest implements IIngestConversationsRequest { /** - * Constructs a new CreateAnalysisRequest. + * Constructs a new IngestConversationsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest); - /** CreateAnalysisRequest parent. */ + /** IngestConversationsRequest gcsSource. */ + public gcsSource?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource|null); + + /** IngestConversationsRequest transcriptObjectConfig. */ + public transcriptObjectConfig?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig|null); + + /** IngestConversationsRequest parent. */ public parent: string; - /** CreateAnalysisRequest analysis. */ - public analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + /** IngestConversationsRequest conversationConfig. */ + public conversationConfig?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig|null); + + /** IngestConversationsRequest source. */ + public source?: "gcsSource"; + + /** IngestConversationsRequest objectConfig. */ + public objectConfig?: "transcriptObjectConfig"; /** - * Creates a new CreateAnalysisRequest instance using the specified properties. + * Creates a new IngestConversationsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreateAnalysisRequest instance + * @returns IngestConversationsRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest): google.cloud.contactcenterinsights.v1.IngestConversationsRequest; /** - * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. - * @param message CreateAnalysisRequest message or plain object to encode + * Encodes the specified IngestConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.verify|verify} messages. + * @param message IngestConversationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. - * @param message CreateAnalysisRequest message or plain object to encode + * Encodes the specified IngestConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.verify|verify} messages. + * @param message IngestConversationsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * Decodes an IngestConversationsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreateAnalysisRequest + * @returns IngestConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsRequest; /** - * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * Decodes an IngestConversationsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreateAnalysisRequest + * @returns IngestConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsRequest; /** - * Verifies a CreateAnalysisRequest message. + * Verifies an IngestConversationsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IngestConversationsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreateAnalysisRequest + * @returns IngestConversationsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsRequest; /** - * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. - * @param message CreateAnalysisRequest + * Creates a plain object from an IngestConversationsRequest message. Also converts values to other types if specified. + * @param message IngestConversationsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CreateAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreateAnalysisRequest to JSON. + * Converts this IngestConversationsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreateAnalysisRequest + * Gets the default type url for IngestConversationsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListAnalysesRequest. */ - interface IListAnalysesRequest { - - /** ListAnalysesRequest parent */ - parent?: (string|null); + namespace IngestConversationsRequest { - /** ListAnalysesRequest pageSize */ - pageSize?: (number|null); + /** Properties of a GcsSource. */ + interface IGcsSource { - /** ListAnalysesRequest pageToken */ - pageToken?: (string|null); + /** GcsSource bucketUri */ + bucketUri?: (string|null); + } - /** ListAnalysesRequest filter */ - filter?: (string|null); - } + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { - /** Represents a ListAnalysesRequest. */ - class ListAnalysesRequest implements IListAnalysesRequest { + /** + * Constructs a new GcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource); - /** - * Constructs a new ListAnalysesRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest); + /** GcsSource bucketUri. */ + public bucketUri: string; - /** ListAnalysesRequest parent. */ - public parent: string; + /** + * Creates a new GcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource; - /** ListAnalysesRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListAnalysesRequest pageToken. */ - public pageToken: string; + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListAnalysesRequest filter. */ - public filter: string; + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource; - /** - * Creates a new ListAnalysesRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListAnalysesRequest instance - */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource; - /** - * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. - * @param message ListAnalysesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a GcsSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Encodes the specified ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. - * @param message ListAnalysesRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource; - /** - * Decodes a ListAnalysesRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListAnalysesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListAnalysesRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + /** + * Converts this GcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Verifies a ListAnalysesRequest message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Gets the default type url for GcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListAnalysesRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + /** Properties of a TranscriptObjectConfig. */ + interface ITranscriptObjectConfig { - /** - * Creates a plain object from a ListAnalysesRequest message. Also converts values to other types if specified. - * @param message ListAnalysesRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** TranscriptObjectConfig medium */ + medium?: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium|null); + } - /** - * Converts this ListAnalysesRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a TranscriptObjectConfig. */ + class TranscriptObjectConfig implements ITranscriptObjectConfig { - /** - * Gets the default type url for ListAnalysesRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Constructs a new TranscriptObjectConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig); - /** Properties of a ListAnalysesResponse. */ - interface IListAnalysesResponse { + /** TranscriptObjectConfig medium. */ + public medium: (google.cloud.contactcenterinsights.v1.Conversation.Medium|keyof typeof google.cloud.contactcenterinsights.v1.Conversation.Medium); - /** ListAnalysesResponse analyses */ - analyses?: (google.cloud.contactcenterinsights.v1.IAnalysis[]|null); + /** + * Creates a new TranscriptObjectConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns TranscriptObjectConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig; - /** ListAnalysesResponse nextPageToken */ - nextPageToken?: (string|null); - } + /** + * Encodes the specified TranscriptObjectConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.verify|verify} messages. + * @param message TranscriptObjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** Represents a ListAnalysesResponse. */ - class ListAnalysesResponse implements IListAnalysesResponse { + /** + * Encodes the specified TranscriptObjectConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.verify|verify} messages. + * @param message TranscriptObjectConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ListAnalysesResponse. - * @param [properties] Properties to set - */ + /** + * Decodes a TranscriptObjectConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranscriptObjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig; + + /** + * Decodes a TranscriptObjectConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranscriptObjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig; + + /** + * Verifies a TranscriptObjectConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a TranscriptObjectConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranscriptObjectConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig; + + /** + * Creates a plain object from a TranscriptObjectConfig message. Also converts values to other types if specified. + * @param message TranscriptObjectConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranscriptObjectConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranscriptObjectConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ConversationConfig. */ + interface IConversationConfig { + + /** ConversationConfig agentId */ + agentId?: (string|null); + } + + /** Represents a ConversationConfig. */ + class ConversationConfig implements IConversationConfig { + + /** + * Constructs a new ConversationConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig); + + /** ConversationConfig agentId. */ + public agentId: string; + + /** + * Creates a new ConversationConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationConfig instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig; + + /** + * Encodes the specified ConversationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.verify|verify} messages. + * @param message ConversationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.verify|verify} messages. + * @param message ConversationConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig; + + /** + * Decodes a ConversationConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig; + + /** + * Verifies a ConversationConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig; + + /** + * Creates a plain object from a ConversationConfig message. Also converts values to other types if specified. + * @param message ConversationConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an IngestConversationsMetadata. */ + interface IIngestConversationsMetadata { + + /** IngestConversationsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** IngestConversationsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** IngestConversationsMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IIngestConversationsRequest|null); + + /** IngestConversationsMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); + } + + /** Represents an IngestConversationsMetadata. */ + class IngestConversationsMetadata implements IIngestConversationsMetadata { + + /** + * Constructs a new IngestConversationsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata); + + /** IngestConversationsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** IngestConversationsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** IngestConversationsMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IIngestConversationsRequest|null); + + /** IngestConversationsMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; + + /** + * Creates a new IngestConversationsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestConversationsMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata): google.cloud.contactcenterinsights.v1.IngestConversationsMetadata; + + /** + * Encodes the specified IngestConversationsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.verify|verify} messages. + * @param message IngestConversationsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestConversationsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.verify|verify} messages. + * @param message IngestConversationsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestConversationsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsMetadata; + + /** + * Decodes an IngestConversationsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsMetadata; + + /** + * Verifies an IngestConversationsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IngestConversationsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestConversationsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsMetadata; + + /** + * Creates a plain object from an IngestConversationsMetadata message. Also converts values to other types if specified. + * @param message IngestConversationsMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestConversationsMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestConversationsMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IngestConversationsResponse. */ + interface IIngestConversationsResponse { + } + + /** Represents an IngestConversationsResponse. */ + class IngestConversationsResponse implements IIngestConversationsResponse { + + /** + * Constructs a new IngestConversationsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsResponse); + + /** + * Creates a new IngestConversationsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns IngestConversationsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIngestConversationsResponse): google.cloud.contactcenterinsights.v1.IngestConversationsResponse; + + /** + * Encodes the specified IngestConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsResponse.verify|verify} messages. + * @param message IngestConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IngestConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsResponse.verify|verify} messages. + * @param message IngestConversationsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IngestConversationsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IngestConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IngestConversationsResponse; + + /** + * Decodes an IngestConversationsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IngestConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IngestConversationsResponse; + + /** + * Verifies an IngestConversationsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IngestConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IngestConversationsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IngestConversationsResponse; + + /** + * Creates a plain object from an IngestConversationsResponse message. Also converts values to other types if specified. + * @param message IngestConversationsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IngestConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IngestConversationsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IngestConversationsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAnalysisRequest. */ + interface ICreateAnalysisRequest { + + /** CreateAnalysisRequest parent */ + parent?: (string|null); + + /** CreateAnalysisRequest analysis */ + analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + } + + /** Represents a CreateAnalysisRequest. */ + class CreateAnalysisRequest implements ICreateAnalysisRequest { + + /** + * Constructs a new CreateAnalysisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest); + + /** CreateAnalysisRequest parent. */ + public parent: string; + + /** CreateAnalysisRequest analysis. */ + public analysis?: (google.cloud.contactcenterinsights.v1.IAnalysis|null); + + /** + * Creates a new CreateAnalysisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAnalysisRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @param message CreateAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @param message CreateAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Verifies a CreateAnalysisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAnalysisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreateAnalysisRequest; + + /** + * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. + * @param message CreateAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreateAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalysesRequest. */ + interface IListAnalysesRequest { + + /** ListAnalysesRequest parent */ + parent?: (string|null); + + /** ListAnalysesRequest pageSize */ + pageSize?: (number|null); + + /** ListAnalysesRequest pageToken */ + pageToken?: (string|null); + + /** ListAnalysesRequest filter */ + filter?: (string|null); + } + + /** Represents a ListAnalysesRequest. */ + class ListAnalysesRequest implements IListAnalysesRequest { + + /** + * Constructs a new ListAnalysesRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest); + + /** ListAnalysesRequest parent. */ + public parent: string; + + /** ListAnalysesRequest pageSize. */ + public pageSize: number; + + /** ListAnalysesRequest pageToken. */ + public pageToken: string; + + /** ListAnalysesRequest filter. */ + public filter: string; + + /** + * Creates a new ListAnalysesRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAnalysesRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesRequest): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @param message ListAnalysesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @param message ListAnalysesRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListAnalysesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Verifies a ListAnalysesRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAnalysesRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListAnalysesRequest; + + /** + * Creates a plain object from a ListAnalysesRequest message. Also converts values to other types if specified. + * @param message ListAnalysesRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListAnalysesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAnalysesRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAnalysesRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalysesResponse. */ + interface IListAnalysesResponse { + + /** ListAnalysesResponse analyses */ + analyses?: (google.cloud.contactcenterinsights.v1.IAnalysis[]|null); + + /** ListAnalysesResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAnalysesResponse. */ + class ListAnalysesResponse implements IListAnalysesResponse { + + /** + * Constructs a new ListAnalysesResponse. + * @param [properties] Properties to set + */ constructor(properties?: google.cloud.contactcenterinsights.v1.IListAnalysesResponse); /** ListAnalysesResponse analyses. */ @@ -2373,118 +3063,463 @@ export namespace google { public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetAnalysisRequest; /** - * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. - * @param message GetAnalysisRequest + * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. + * @param message GetAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAnalysisRequest. */ + interface IDeleteAnalysisRequest { + + /** DeleteAnalysisRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAnalysisRequest. */ + class DeleteAnalysisRequest implements IDeleteAnalysisRequest { + + /** + * Constructs a new DeleteAnalysisRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest); + + /** DeleteAnalysisRequest name. */ + public name: string; + + /** + * Creates a new DeleteAnalysisRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAnalysisRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @param message DeleteAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * @param message DeleteAnalysisRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Verifies a DeleteAnalysisRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAnalysisRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + + /** + * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. + * @param message DeleteAnalysisRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAnalysisRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAnalysisRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkAnalyzeConversationsRequest. */ + interface IBulkAnalyzeConversationsRequest { + + /** BulkAnalyzeConversationsRequest parent */ + parent?: (string|null); + + /** BulkAnalyzeConversationsRequest filter */ + filter?: (string|null); + + /** BulkAnalyzeConversationsRequest analysisPercentage */ + analysisPercentage?: (number|null); + + /** BulkAnalyzeConversationsRequest annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + } + + /** Represents a BulkAnalyzeConversationsRequest. */ + class BulkAnalyzeConversationsRequest implements IBulkAnalyzeConversationsRequest { + + /** + * Constructs a new BulkAnalyzeConversationsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest); + + /** BulkAnalyzeConversationsRequest parent. */ + public parent: string; + + /** BulkAnalyzeConversationsRequest filter. */ + public filter: string; + + /** BulkAnalyzeConversationsRequest analysisPercentage. */ + public analysisPercentage: number; + + /** BulkAnalyzeConversationsRequest annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + + /** + * Creates a new BulkAnalyzeConversationsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkAnalyzeConversationsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest; + + /** + * Encodes the specified BulkAnalyzeConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.verify|verify} messages. + * @param message BulkAnalyzeConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkAnalyzeConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.verify|verify} messages. + * @param message BulkAnalyzeConversationsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkAnalyzeConversationsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkAnalyzeConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest; + + /** + * Decodes a BulkAnalyzeConversationsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkAnalyzeConversationsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest; + + /** + * Verifies a BulkAnalyzeConversationsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkAnalyzeConversationsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkAnalyzeConversationsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest; + + /** + * Creates a plain object from a BulkAnalyzeConversationsRequest message. Also converts values to other types if specified. + * @param message BulkAnalyzeConversationsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BulkAnalyzeConversationsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BulkAnalyzeConversationsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BulkAnalyzeConversationsMetadata. */ + interface IBulkAnalyzeConversationsMetadata { + + /** BulkAnalyzeConversationsMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** BulkAnalyzeConversationsMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** BulkAnalyzeConversationsMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest|null); + + /** BulkAnalyzeConversationsMetadata completedAnalysesCount */ + completedAnalysesCount?: (number|null); + + /** BulkAnalyzeConversationsMetadata failedAnalysesCount */ + failedAnalysesCount?: (number|null); + + /** BulkAnalyzeConversationsMetadata totalRequestedAnalysesCount */ + totalRequestedAnalysesCount?: (number|null); + } + + /** Represents a BulkAnalyzeConversationsMetadata. */ + class BulkAnalyzeConversationsMetadata implements IBulkAnalyzeConversationsMetadata { + + /** + * Constructs a new BulkAnalyzeConversationsMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata); + + /** BulkAnalyzeConversationsMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** BulkAnalyzeConversationsMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** BulkAnalyzeConversationsMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest|null); + + /** BulkAnalyzeConversationsMetadata completedAnalysesCount. */ + public completedAnalysesCount: number; + + /** BulkAnalyzeConversationsMetadata failedAnalysesCount. */ + public failedAnalysesCount: number; + + /** BulkAnalyzeConversationsMetadata totalRequestedAnalysesCount. */ + public totalRequestedAnalysesCount: number; + + /** + * Creates a new BulkAnalyzeConversationsMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns BulkAnalyzeConversationsMetadata instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata; + + /** + * Encodes the specified BulkAnalyzeConversationsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.verify|verify} messages. + * @param message BulkAnalyzeConversationsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BulkAnalyzeConversationsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.verify|verify} messages. + * @param message BulkAnalyzeConversationsMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BulkAnalyzeConversationsMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BulkAnalyzeConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata; + + /** + * Decodes a BulkAnalyzeConversationsMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BulkAnalyzeConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata; + + /** + * Verifies a BulkAnalyzeConversationsMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a BulkAnalyzeConversationsMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BulkAnalyzeConversationsMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata; + + /** + * Creates a plain object from a BulkAnalyzeConversationsMetadata message. Also converts values to other types if specified. + * @param message BulkAnalyzeConversationsMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetAnalysisRequest to JSON. + * Converts this BulkAnalyzeConversationsMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetAnalysisRequest + * Gets the default type url for BulkAnalyzeConversationsMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteAnalysisRequest. */ - interface IDeleteAnalysisRequest { + /** Properties of a BulkAnalyzeConversationsResponse. */ + interface IBulkAnalyzeConversationsResponse { - /** DeleteAnalysisRequest name */ - name?: (string|null); + /** BulkAnalyzeConversationsResponse successfulAnalysisCount */ + successfulAnalysisCount?: (number|null); + + /** BulkAnalyzeConversationsResponse failedAnalysisCount */ + failedAnalysisCount?: (number|null); } - /** Represents a DeleteAnalysisRequest. */ - class DeleteAnalysisRequest implements IDeleteAnalysisRequest { + /** Represents a BulkAnalyzeConversationsResponse. */ + class BulkAnalyzeConversationsResponse implements IBulkAnalyzeConversationsResponse { /** - * Constructs a new DeleteAnalysisRequest. + * Constructs a new BulkAnalyzeConversationsResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse); - /** DeleteAnalysisRequest name. */ - public name: string; + /** BulkAnalyzeConversationsResponse successfulAnalysisCount. */ + public successfulAnalysisCount: number; + + /** BulkAnalyzeConversationsResponse failedAnalysisCount. */ + public failedAnalysisCount: number; /** - * Creates a new DeleteAnalysisRequest instance using the specified properties. + * Creates a new BulkAnalyzeConversationsResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteAnalysisRequest instance + * @returns BulkAnalyzeConversationsResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse; /** - * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. - * @param message DeleteAnalysisRequest message or plain object to encode + * Encodes the specified BulkAnalyzeConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse.verify|verify} messages. + * @param message BulkAnalyzeConversationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. - * @param message DeleteAnalysisRequest message or plain object to encode + * Encodes the specified BulkAnalyzeConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse.verify|verify} messages. + * @param message BulkAnalyzeConversationsResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. + * Decodes a BulkAnalyzeConversationsResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteAnalysisRequest + * @returns BulkAnalyzeConversationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse; /** - * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. + * Decodes a BulkAnalyzeConversationsResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteAnalysisRequest + * @returns BulkAnalyzeConversationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse; /** - * Verifies a DeleteAnalysisRequest message. + * Verifies a BulkAnalyzeConversationsResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BulkAnalyzeConversationsResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteAnalysisRequest + * @returns BulkAnalyzeConversationsResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse; /** - * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. - * @param message DeleteAnalysisRequest + * Creates a plain object from a BulkAnalyzeConversationsResponse message. Also converts values to other types if specified. + * @param message BulkAnalyzeConversationsResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteAnalysisRequest to JSON. + * Converts this BulkAnalyzeConversationsResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteAnalysisRequest + * Gets the default type url for BulkAnalyzeConversationsResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -4740,6 +5775,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a DeleteIssueRequest. */ + interface IDeleteIssueRequest { + + /** DeleteIssueRequest name */ + name?: (string|null); + } + + /** Represents a DeleteIssueRequest. */ + class DeleteIssueRequest implements IDeleteIssueRequest { + + /** + * Constructs a new DeleteIssueRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest); + + /** DeleteIssueRequest name. */ + public name: string; + + /** + * Creates a new DeleteIssueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIssueRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @param message DeleteIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @param message DeleteIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Verifies a DeleteIssueRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIssueRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. + * @param message DeleteIssueRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteIssueRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteIssueRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a CalculateIssueModelStatsRequest. */ interface ICalculateIssueModelStatsRequest { @@ -7162,6 +8294,9 @@ export namespace google { /** Analysis analysisResult */ analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + + /** Analysis annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); } /** Represents an Analysis. */ @@ -7185,6 +8320,9 @@ export namespace google { /** Analysis analysisResult. */ public analysisResult?: (google.cloud.contactcenterinsights.v1.IAnalysisResult|null); + /** Analysis annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + /** * Creates a new Analysis instance using the specified properties. * @param [properties] Properties to set @@ -8150,6 +9288,9 @@ export namespace google { /** CallAnnotation phraseMatchData */ phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); + /** CallAnnotation issueMatchData */ + issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); + /** CallAnnotation channelTag */ channelTag?: (number|null); @@ -8190,6 +9331,9 @@ export namespace google { /** CallAnnotation phraseMatchData. */ public phraseMatchData?: (google.cloud.contactcenterinsights.v1.IPhraseMatchData|null); + /** CallAnnotation issueMatchData. */ + public issueMatchData?: (google.cloud.contactcenterinsights.v1.IIssueMatchData|null); + /** CallAnnotation channelTag. */ public channelTag: number; @@ -8200,7 +9344,7 @@ export namespace google { public annotationEndBoundary?: (google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null); /** CallAnnotation data. */ - public data?: ("interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"); + public data?: ("interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"); /** * Creates a new CallAnnotation instance using the specified properties. @@ -9422,6 +10566,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of an IssueMatchData. */ + interface IIssueMatchData { + + /** IssueMatchData issueAssignment */ + issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); + } + + /** Represents an IssueMatchData. */ + class IssueMatchData implements IIssueMatchData { + + /** + * Constructs a new IssueMatchData. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData); + + /** IssueMatchData issueAssignment. */ + public issueAssignment?: (google.cloud.contactcenterinsights.v1.IIssueAssignment|null); + + /** + * Creates a new IssueMatchData instance using the specified properties. + * @param [properties] Properties to set + * @returns IssueMatchData instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IIssueMatchData): google.cloud.contactcenterinsights.v1.IssueMatchData; + + /** + * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @param message IssueMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @param message IssueMatchData message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IIssueMatchData, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IssueMatchData message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IssueMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.IssueMatchData; + + /** + * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IssueMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.IssueMatchData; + + /** + * Verifies an IssueMatchData message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an IssueMatchData message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IssueMatchData + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.IssueMatchData; + + /** + * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. + * @param message IssueMatchData + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.IssueMatchData, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IssueMatchData to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IssueMatchData + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an IssueModel. */ interface IIssueModel { @@ -9691,6 +10932,9 @@ export namespace google { /** Issue updateTime */ updateTime?: (google.protobuf.ITimestamp|null); + + /** Issue sampleUtterances */ + sampleUtterances?: (string[]|null); } /** Represents an Issue. */ @@ -9714,6 +10958,9 @@ export namespace google { /** Issue updateTime. */ public updateTime?: (google.protobuf.ITimestamp|null); + /** Issue sampleUtterances. */ + public sampleUtterances: string[]; + /** * Creates a new Issue instance using the specified properties. * @param [properties] Properties to set @@ -10739,6 +11986,9 @@ export namespace google { /** AnalysisConfig runtimeIntegrationAnalysisPercentage */ runtimeIntegrationAnalysisPercentage?: (number|null); + + /** AnalysisConfig annotatorSelector */ + annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); } /** Represents an AnalysisConfig. */ @@ -10753,6 +12003,9 @@ export namespace google { /** AnalysisConfig runtimeIntegrationAnalysisPercentage. */ public runtimeIntegrationAnalysisPercentage: number; + /** AnalysisConfig annotatorSelector. */ + public annotatorSelector?: (google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null); + /** * Creates a new AnalysisConfig instance using the specified properties. * @param [properties] Properties to set @@ -11949,6 +13202,151 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AnnotatorSelector. */ + interface IAnnotatorSelector { + + /** AnnotatorSelector runInterruptionAnnotator */ + runInterruptionAnnotator?: (boolean|null); + + /** AnnotatorSelector runSilenceAnnotator */ + runSilenceAnnotator?: (boolean|null); + + /** AnnotatorSelector runPhraseMatcherAnnotator */ + runPhraseMatcherAnnotator?: (boolean|null); + + /** AnnotatorSelector phraseMatchers */ + phraseMatchers?: (string[]|null); + + /** AnnotatorSelector runSentimentAnnotator */ + runSentimentAnnotator?: (boolean|null); + + /** AnnotatorSelector runEntityAnnotator */ + runEntityAnnotator?: (boolean|null); + + /** AnnotatorSelector runIntentAnnotator */ + runIntentAnnotator?: (boolean|null); + + /** AnnotatorSelector runIssueModelAnnotator */ + runIssueModelAnnotator?: (boolean|null); + + /** AnnotatorSelector issueModels */ + issueModels?: (string[]|null); + } + + /** Represents an AnnotatorSelector. */ + class AnnotatorSelector implements IAnnotatorSelector { + + /** + * Constructs a new AnnotatorSelector. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector); + + /** AnnotatorSelector runInterruptionAnnotator. */ + public runInterruptionAnnotator: boolean; + + /** AnnotatorSelector runSilenceAnnotator. */ + public runSilenceAnnotator: boolean; + + /** AnnotatorSelector runPhraseMatcherAnnotator. */ + public runPhraseMatcherAnnotator: boolean; + + /** AnnotatorSelector phraseMatchers. */ + public phraseMatchers: string[]; + + /** AnnotatorSelector runSentimentAnnotator. */ + public runSentimentAnnotator: boolean; + + /** AnnotatorSelector runEntityAnnotator. */ + public runEntityAnnotator: boolean; + + /** AnnotatorSelector runIntentAnnotator. */ + public runIntentAnnotator: boolean; + + /** AnnotatorSelector runIssueModelAnnotator. */ + public runIssueModelAnnotator: boolean; + + /** AnnotatorSelector issueModels. */ + public issueModels: string[]; + + /** + * Creates a new AnnotatorSelector instance using the specified properties. + * @param [properties] Properties to set + * @returns AnnotatorSelector instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IAnnotatorSelector): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + + /** + * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @param message AnnotatorSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @param message AnnotatorSelector message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IAnnotatorSelector, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnnotatorSelector message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnnotatorSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + + /** + * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnnotatorSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + + /** + * Verifies an AnnotatorSelector message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnnotatorSelector message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnnotatorSelector + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.AnnotatorSelector; + + /** + * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. + * @param message AnnotatorSelector + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.AnnotatorSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnnotatorSelector to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnnotatorSelector + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } } } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js index 4cd9d71c172..f8b48675e96 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.js +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -395,6 +395,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|bulkAnalyzeConversations}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef BulkAnalyzeConversationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls BulkAnalyzeConversations. + * @function bulkAnalyzeConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest} request BulkAnalyzeConversationsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkAnalyzeConversationsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.bulkAnalyzeConversations = function bulkAnalyzeConversations(request, callback) { + return this.rpcCall(bulkAnalyzeConversations, $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "BulkAnalyzeConversations" }); + + /** + * Calls BulkAnalyzeConversations. + * @function bulkAnalyzeConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest} request BulkAnalyzeConversationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|ingestConversations}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef IngestConversationsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls IngestConversations. + * @function ingestConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest} request IngestConversationsRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.IngestConversationsCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.ingestConversations = function ingestConversations(request, callback) { + return this.rpcCall(ingestConversations, $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "IngestConversations" }); + + /** + * Calls IngestConversations. + * @function ingestConversations + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest} request IngestConversationsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportInsightsData}. * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights @@ -758,6 +824,39 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|deleteIssue}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef DeleteIssueCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteIssue. + * @function deleteIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} request DeleteIssueRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssueCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.deleteIssue = function deleteIssue(request, callback) { + return this.rpcCall(deleteIssue, $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteIssue" }); + + /** + * Calls DeleteIssue. + * @function deleteIssue + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} request DeleteIssueRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|calculateIssueModelStats}. * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights @@ -2481,6 +2580,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] CreateAnalysisOperationMetadata createTime * @property {google.protobuf.ITimestamp|null} [endTime] CreateAnalysisOperationMetadata endTime * @property {string|null} [conversation] CreateAnalysisOperationMetadata conversation + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] CreateAnalysisOperationMetadata annotatorSelector */ /** @@ -2522,6 +2622,14 @@ */ CreateAnalysisOperationMetadata.prototype.conversation = ""; + /** + * CreateAnalysisOperationMetadata annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata + * @instance + */ + CreateAnalysisOperationMetadata.prototype.annotatorSelector = null; + /** * Creates a new CreateAnalysisOperationMetadata instance using the specified properties. * @function create @@ -2552,6 +2660,8 @@ $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.conversation != null && Object.hasOwnProperty.call(message, "conversation")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.conversation); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -2598,6 +2708,10 @@ message.conversation = reader.string(); break; } + case 4: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2646,6 +2760,11 @@ if (message.conversation != null && message.hasOwnProperty("conversation")) if (!$util.isString(message.conversation)) return "conversation: string expected"; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; + } return null; }; @@ -2673,6 +2792,11 @@ } if (object.conversation != null) message.conversation = String(object.conversation); + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } return message; }; @@ -2693,6 +2817,7 @@ object.createTime = null; object.endTime = null; object.conversation = ""; + object.annotatorSelector = null; } if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); @@ -2700,6 +2825,8 @@ object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); if (message.conversation != null && message.hasOwnProperty("conversation")) object.conversation = message.conversation; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); return object; }; @@ -4270,25 +4397,27 @@ return DeleteConversationRequest; })(); - v1.CreateAnalysisRequest = (function() { + v1.IngestConversationsRequest = (function() { /** - * Properties of a CreateAnalysisRequest. + * Properties of an IngestConversationsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICreateAnalysisRequest - * @property {string|null} [parent] CreateAnalysisRequest parent - * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [analysis] CreateAnalysisRequest analysis + * @interface IIngestConversationsRequest + * @property {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource|null} [gcsSource] IngestConversationsRequest gcsSource + * @property {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig|null} [transcriptObjectConfig] IngestConversationsRequest transcriptObjectConfig + * @property {string|null} [parent] IngestConversationsRequest parent + * @property {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig|null} [conversationConfig] IngestConversationsRequest conversationConfig */ /** - * Constructs a new CreateAnalysisRequest. + * Constructs a new IngestConversationsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CreateAnalysisRequest. - * @implements ICreateAnalysisRequest + * @classdesc Represents an IngestConversationsRequest. + * @implements IIngestConversationsRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest=} [properties] Properties to set */ - function CreateAnalysisRequest(properties) { + function IngestConversationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4296,89 +4425,142 @@ } /** - * CreateAnalysisRequest parent. + * IngestConversationsRequest gcsSource. + * @member {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + IngestConversationsRequest.prototype.gcsSource = null; + + /** + * IngestConversationsRequest transcriptObjectConfig. + * @member {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig|null|undefined} transcriptObjectConfig + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + IngestConversationsRequest.prototype.transcriptObjectConfig = null; + + /** + * IngestConversationsRequest parent. * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @instance */ - CreateAnalysisRequest.prototype.parent = ""; + IngestConversationsRequest.prototype.parent = ""; /** - * CreateAnalysisRequest analysis. - * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} analysis - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * IngestConversationsRequest conversationConfig. + * @member {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig|null|undefined} conversationConfig + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @instance */ - CreateAnalysisRequest.prototype.analysis = null; + IngestConversationsRequest.prototype.conversationConfig = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new CreateAnalysisRequest instance using the specified properties. + * IngestConversationsRequest source. + * @member {"gcsSource"|undefined} source + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + Object.defineProperty(IngestConversationsRequest.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * IngestConversationsRequest objectConfig. + * @member {"transcriptObjectConfig"|undefined} objectConfig + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + Object.defineProperty(IngestConversationsRequest.prototype, "objectConfig", { + get: $util.oneOfGetter($oneOfFields = ["transcriptObjectConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IngestConversationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest instance + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest} IngestConversationsRequest instance */ - CreateAnalysisRequest.create = function create(properties) { - return new CreateAnalysisRequest(properties); + IngestConversationsRequest.create = function create(properties) { + return new IngestConversationsRequest(properties); }; /** - * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * Encodes the specified IngestConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest} message IngestConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAnalysisRequest.encode = function encode(message, writer) { + IngestConversationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) - $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analysis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.transcriptObjectConfig != null && Object.hasOwnProperty.call(message, "transcriptObjectConfig")) + $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.encode(message.transcriptObjectConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.conversationConfig != null && Object.hasOwnProperty.call(message, "conversationConfig")) + $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.encode(message.conversationConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * Encodes the specified IngestConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest} message IngestConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreateAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + IngestConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * Decodes an IngestConversationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest} IngestConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAnalysisRequest.decode = function decode(reader, length) { + IngestConversationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.decode(reader, reader.uint32()); + break; + } + case 3: { + message.transcriptObjectConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.decode(reader, reader.uint32()); + break; + } case 1: { message.parent = reader.string(); break; } - case 2: { - message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); + case 4: { + message.conversationConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.decode(reader, reader.uint32()); break; } default: @@ -4390,257 +4572,2323 @@ }; /** - * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * Decodes an IngestConversationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest} IngestConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreateAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + IngestConversationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreateAnalysisRequest message. + * Verifies an IngestConversationsRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreateAnalysisRequest.verify = function verify(message) { + IngestConversationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } + } + if (message.transcriptObjectConfig != null && message.hasOwnProperty("transcriptObjectConfig")) { + properties.objectConfig = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.verify(message.transcriptObjectConfig); + if (error) + return "transcriptObjectConfig." + error; + } + } if (message.parent != null && message.hasOwnProperty("parent")) if (!$util.isString(message.parent)) return "parent: string expected"; - if (message.analysis != null && message.hasOwnProperty("analysis")) { - var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analysis); + if (message.conversationConfig != null && message.hasOwnProperty("conversationConfig")) { + var error = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.verify(message.conversationConfig); if (error) - return "analysis." + error; + return "conversationConfig." + error; } return null; }; /** - * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * Creates an IngestConversationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest} IngestConversationsRequest */ - CreateAnalysisRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest) + IngestConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + var message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.fromObject(object.gcsSource); + } + if (object.transcriptObjectConfig != null) { + if (typeof object.transcriptObjectConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.transcriptObjectConfig: object expected"); + message.transcriptObjectConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.fromObject(object.transcriptObjectConfig); + } if (object.parent != null) message.parent = String(object.parent); - if (object.analysis != null) { - if (typeof object.analysis !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.analysis: object expected"); - message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analysis); + if (object.conversationConfig != null) { + if (typeof object.conversationConfig !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.conversationConfig: object expected"); + message.conversationConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.fromObject(object.conversationConfig); } return message; }; /** - * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. + * Creates a plain object from an IngestConversationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} message CreateAnalysisRequest + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest} message IngestConversationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreateAnalysisRequest.toObject = function toObject(message, options) { + IngestConversationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { object.parent = ""; - object.analysis = null; + object.conversationConfig = null; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.analysis != null && message.hasOwnProperty("analysis")) - object.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analysis, options); + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.source = "gcsSource"; + } + if (message.transcriptObjectConfig != null && message.hasOwnProperty("transcriptObjectConfig")) { + object.transcriptObjectConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.toObject(message.transcriptObjectConfig, options); + if (options.oneofs) + object.objectConfig = "transcriptObjectConfig"; + } + if (message.conversationConfig != null && message.hasOwnProperty("conversationConfig")) + object.conversationConfig = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.toObject(message.conversationConfig, options); return object; }; /** - * Converts this CreateAnalysisRequest to JSON. + * Converts this IngestConversationsRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @instance * @returns {Object.} JSON object */ - CreateAnalysisRequest.prototype.toJSON = function toJSON() { + IngestConversationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreateAnalysisRequest + * Gets the default type url for IngestConversationsRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreateAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IngestConversationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateAnalysisRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsRequest"; }; - return CreateAnalysisRequest; - })(); + IngestConversationsRequest.GcsSource = (function() { - v1.ListAnalysesRequest = (function() { + /** + * Properties of a GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @interface IGcsSource + * @property {string|null} [bucketUri] GcsSource bucketUri + */ - /** - * Properties of a ListAnalysesRequest. - * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListAnalysesRequest - * @property {string|null} [parent] ListAnalysesRequest parent - * @property {number|null} [pageSize] ListAnalysesRequest pageSize - * @property {string|null} [pageToken] ListAnalysesRequest pageToken - * @property {string|null} [filter] ListAnalysesRequest filter - */ + /** + * Constructs a new GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new ListAnalysesRequest. - * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListAnalysesRequest. - * @implements IListAnalysesRequest - * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set - */ - function ListAnalysesRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * GcsSource bucketUri. + * @member {string} bucketUri + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @instance + */ + GcsSource.prototype.bucketUri = ""; - /** - * ListAnalysesRequest parent. - * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest - * @instance - */ - ListAnalysesRequest.prototype.parent = ""; + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; - /** - * ListAnalysesRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bucketUri != null && Object.hasOwnProperty.call(message, "bucketUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketUri); + return writer; + }; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.bucketUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) + if (!$util.isString(message.bucketUri)) + return "bucketUri: string expected"; + return null; + }; + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} GcsSource + */ + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource(); + if (object.bucketUri != null) + message.bucketUri = String(object.bucketUri); + return message; + }; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} message GcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.bucketUri = ""; + if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) + object.bucketUri = message.bucketUri; + return object; + }; + + /** + * Converts this GcsSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @instance + * @returns {Object.} JSON object + */ + GcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource"; + }; + + return GcsSource; + })(); + + IngestConversationsRequest.TranscriptObjectConfig = (function() { + + /** + * Properties of a TranscriptObjectConfig. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @interface ITranscriptObjectConfig + * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] TranscriptObjectConfig medium + */ + + /** + * Constructs a new TranscriptObjectConfig. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @classdesc Represents a TranscriptObjectConfig. + * @implements ITranscriptObjectConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig=} [properties] Properties to set + */ + function TranscriptObjectConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TranscriptObjectConfig medium. + * @member {google.cloud.contactcenterinsights.v1.Conversation.Medium} medium + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @instance + */ + TranscriptObjectConfig.prototype.medium = 0; + + /** + * Creates a new TranscriptObjectConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} TranscriptObjectConfig instance + */ + TranscriptObjectConfig.create = function create(properties) { + return new TranscriptObjectConfig(properties); + }; + + /** + * Encodes the specified TranscriptObjectConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig} message TranscriptObjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptObjectConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.medium != null && Object.hasOwnProperty.call(message, "medium")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.medium); + return writer; + }; + + /** + * Encodes the specified TranscriptObjectConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ITranscriptObjectConfig} message TranscriptObjectConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranscriptObjectConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranscriptObjectConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} TranscriptObjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptObjectConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.medium = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranscriptObjectConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} TranscriptObjectConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranscriptObjectConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranscriptObjectConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranscriptObjectConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.medium != null && message.hasOwnProperty("medium")) + switch (message.medium) { + default: + return "medium: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a TranscriptObjectConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} TranscriptObjectConfig + */ + TranscriptObjectConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig(); + switch (object.medium) { + default: + if (typeof object.medium === "number") { + message.medium = object.medium; + break; + } + break; + case "MEDIUM_UNSPECIFIED": + case 0: + message.medium = 0; + break; + case "PHONE_CALL": + case 1: + message.medium = 1; + break; + case "CHAT": + case 2: + message.medium = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a TranscriptObjectConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} message TranscriptObjectConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranscriptObjectConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.medium = options.enums === String ? "MEDIUM_UNSPECIFIED" : 0; + if (message.medium != null && message.hasOwnProperty("medium")) + object.medium = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] === undefined ? message.medium : $root.google.cloud.contactcenterinsights.v1.Conversation.Medium[message.medium] : message.medium; + return object; + }; + + /** + * Converts this TranscriptObjectConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @instance + * @returns {Object.} JSON object + */ + TranscriptObjectConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranscriptObjectConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranscriptObjectConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig"; + }; + + return TranscriptObjectConfig; + })(); + + IngestConversationsRequest.ConversationConfig = (function() { + + /** + * Properties of a ConversationConfig. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @interface IConversationConfig + * @property {string|null} [agentId] ConversationConfig agentId + */ + + /** + * Constructs a new ConversationConfig. + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @classdesc Represents a ConversationConfig. + * @implements IConversationConfig + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig=} [properties] Properties to set + */ + function ConversationConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationConfig agentId. + * @member {string} agentId + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @instance + */ + ConversationConfig.prototype.agentId = ""; + + /** + * Creates a new ConversationConfig instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} ConversationConfig instance + */ + ConversationConfig.create = function create(properties) { + return new ConversationConfig(properties); + }; + + /** + * Encodes the specified ConversationConfig message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig} message ConversationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.agentId != null && Object.hasOwnProperty.call(message, "agentId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.agentId); + return writer; + }; + + /** + * Encodes the specified ConversationConfig message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig} message ConversationConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} ConversationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.agentId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} ConversationConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationConfig message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.agentId != null && message.hasOwnProperty("agentId")) + if (!$util.isString(message.agentId)) + return "agentId: string expected"; + return null; + }; + + /** + * Creates a ConversationConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} ConversationConfig + */ + ConversationConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig(); + if (object.agentId != null) + message.agentId = String(object.agentId); + return message; + }; + + /** + * Creates a plain object from a ConversationConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} message ConversationConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.agentId = ""; + if (message.agentId != null && message.hasOwnProperty("agentId")) + object.agentId = message.agentId; + return object; + }; + + /** + * Converts this ConversationConfig to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @instance + * @returns {Object.} JSON object + */ + ConversationConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationConfig + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig"; + }; + + return ConversationConfig; + })(); + + return IngestConversationsRequest; + })(); + + v1.IngestConversationsMetadata = (function() { + + /** + * Properties of an IngestConversationsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIngestConversationsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] IngestConversationsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] IngestConversationsMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest|null} [request] IngestConversationsMetadata request + * @property {Array.|null} [partialErrors] IngestConversationsMetadata partialErrors + */ + + /** + * Constructs a new IngestConversationsMetadata. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IngestConversationsMetadata. + * @implements IIngestConversationsMetadata + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata=} [properties] Properties to set + */ + function IngestConversationsMetadata(properties) { + this.partialErrors = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IngestConversationsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @instance + */ + IngestConversationsMetadata.prototype.createTime = null; + + /** + * IngestConversationsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @instance + */ + IngestConversationsMetadata.prototype.endTime = null; + + /** + * IngestConversationsMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IIngestConversationsRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @instance + */ + IngestConversationsMetadata.prototype.request = null; + + /** + * IngestConversationsMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @instance + */ + IngestConversationsMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * Creates a new IngestConversationsMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsMetadata} IngestConversationsMetadata instance + */ + IngestConversationsMetadata.create = function create(properties) { + return new IngestConversationsMetadata(properties); + }; + + /** + * Encodes the specified IngestConversationsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata} message IngestConversationsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestConversationsMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IngestConversationsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata} message IngestConversationsMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestConversationsMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestConversationsMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsMetadata} IngestConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestConversationsMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestConversationsMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsMetadata} IngestConversationsMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestConversationsMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestConversationsMetadata message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestConversationsMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } + } + return null; + }; + + /** + * Creates an IngestConversationsMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsMetadata} IngestConversationsMetadata + */ + IngestConversationsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an IngestConversationsMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsMetadata} message IngestConversationsMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestConversationsMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.partialErrors = []; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); + } + return object; + }; + + /** + * Converts this IngestConversationsMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @instance + * @returns {Object.} JSON object + */ + IngestConversationsMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestConversationsMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestConversationsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsMetadata"; + }; + + return IngestConversationsMetadata; + })(); + + v1.IngestConversationsResponse = (function() { + + /** + * Properties of an IngestConversationsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIngestConversationsResponse + */ + + /** + * Constructs a new IngestConversationsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IngestConversationsResponse. + * @implements IIngestConversationsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsResponse=} [properties] Properties to set + */ + function IngestConversationsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new IngestConversationsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsResponse} IngestConversationsResponse instance + */ + IngestConversationsResponse.create = function create(properties) { + return new IngestConversationsResponse(properties); + }; + + /** + * Encodes the specified IngestConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsResponse} message IngestConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestConversationsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified IngestConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IngestConversationsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IIngestConversationsResponse} message IngestConversationsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IngestConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IngestConversationsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsResponse} IngestConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestConversationsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IngestConversationsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IngestConversationsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsResponse} IngestConversationsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IngestConversationsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IngestConversationsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IngestConversationsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an IngestConversationsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IngestConversationsResponse} IngestConversationsResponse + */ + IngestConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IngestConversationsResponse) + return object; + return new $root.google.cloud.contactcenterinsights.v1.IngestConversationsResponse(); + }; + + /** + * Creates a plain object from an IngestConversationsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsResponse} message IngestConversationsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IngestConversationsResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this IngestConversationsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @instance + * @returns {Object.} JSON object + */ + IngestConversationsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IngestConversationsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IngestConversationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IngestConversationsResponse"; + }; + + return IngestConversationsResponse; + })(); + + v1.CreateAnalysisRequest = (function() { + + /** + * Properties of a CreateAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreateAnalysisRequest + * @property {string|null} [parent] CreateAnalysisRequest parent + * @property {google.cloud.contactcenterinsights.v1.IAnalysis|null} [analysis] CreateAnalysisRequest analysis + */ + + /** + * Constructs a new CreateAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreateAnalysisRequest. + * @implements ICreateAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set + */ + function CreateAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAnalysisRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + */ + CreateAnalysisRequest.prototype.parent = ""; + + /** + * CreateAnalysisRequest analysis. + * @member {google.cloud.contactcenterinsights.v1.IAnalysis|null|undefined} analysis + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + */ + CreateAnalysisRequest.prototype.analysis = null; + + /** + * Creates a new CreateAnalysisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest instance + */ + CreateAnalysisRequest.create = function create(properties) { + return new CreateAnalysisRequest(properties); + }; + + /** + * Encodes the specified CreateAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.analysis != null && Object.hasOwnProperty.call(message, "analysis")) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analysis, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreateAnalysisRequest} message CreateAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAnalysisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAnalysisRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAnalysisRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.analysis != null && message.hasOwnProperty("analysis")) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analysis); + if (error) + return "analysis." + error; + } + return null; + }; + + /** + * Creates a CreateAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} CreateAnalysisRequest + */ + CreateAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreateAnalysisRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.analysis != null) { + if (typeof object.analysis !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreateAnalysisRequest.analysis: object expected"); + message.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analysis); + } + return message; + }; + + /** + * Creates a plain object from a CreateAnalysisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreateAnalysisRequest} message CreateAnalysisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAnalysisRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.analysis = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.analysis != null && message.hasOwnProperty("analysis")) + object.analysis = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analysis, options); + return object; + }; + + /** + * Converts this CreateAnalysisRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAnalysisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAnalysisRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreateAnalysisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreateAnalysisRequest"; + }; + + return CreateAnalysisRequest; + })(); + + v1.ListAnalysesRequest = (function() { + + /** + * Properties of a ListAnalysesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAnalysesRequest + * @property {string|null} [parent] ListAnalysesRequest parent + * @property {number|null} [pageSize] ListAnalysesRequest pageSize + * @property {string|null} [pageToken] ListAnalysesRequest pageToken + * @property {string|null} [filter] ListAnalysesRequest filter + */ + + /** + * Constructs a new ListAnalysesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAnalysesRequest. + * @implements IListAnalysesRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set + */ + function ListAnalysesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalysesRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.parent = ""; + + /** + * ListAnalysesRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.pageSize = 0; + + /** + * ListAnalysesRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.pageToken = ""; + + /** + * ListAnalysesRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + */ + ListAnalysesRequest.prototype.filter = ""; + + /** + * Creates a new ListAnalysesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest instance + */ + ListAnalysesRequest.create = function create(properties) { + return new ListAnalysesRequest(properties); + }; + + /** + * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalysesRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalysesRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + */ + ListAnalysesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListAnalysesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} message ListAnalysesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalysesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListAnalysesRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @instance + * @returns {Object.} JSON object + */ + ListAnalysesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalysesRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalysesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesRequest"; + }; + + return ListAnalysesRequest; + })(); + + v1.ListAnalysesResponse = (function() { + + /** + * Properties of a ListAnalysesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListAnalysesResponse + * @property {Array.|null} [analyses] ListAnalysesResponse analyses + * @property {string|null} [nextPageToken] ListAnalysesResponse nextPageToken + */ + + /** + * Constructs a new ListAnalysesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListAnalysesResponse. + * @implements IListAnalysesResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set + */ + function ListAnalysesResponse(properties) { + this.analyses = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalysesResponse analyses. + * @member {Array.} analyses + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + */ + ListAnalysesResponse.prototype.analyses = $util.emptyArray; + + /** + * ListAnalysesResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + */ + ListAnalysesResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAnalysesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse instance + */ + ListAnalysesResponse.create = function create(properties) { + return new ListAnalysesResponse(properties); + }; + + /** + * Encodes the specified ListAnalysesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyses != null && message.analyses.length) + for (var i = 0; i < message.analyses.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analyses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListAnalysesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalysesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.analyses && message.analyses.length)) + message.analyses = []; + message.analyses.push($root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalysesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalysesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalysesResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalysesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyses != null && message.hasOwnProperty("analyses")) { + if (!Array.isArray(message.analyses)) + return "analyses: array expected"; + for (var i = 0; i < message.analyses.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analyses[i]); + if (error) + return "analyses." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAnalysesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + */ + ListAnalysesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); + if (object.analyses) { + if (!Array.isArray(object.analyses)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: array expected"); + message.analyses = []; + for (var i = 0; i < object.analyses.length; ++i) { + if (typeof object.analyses[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: object expected"); + message.analyses[i] = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analyses[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAnalysesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} message ListAnalysesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalysesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.analyses = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.analyses && message.analyses.length) { + object.analyses = []; + for (var j = 0; j < message.analyses.length; ++j) + object.analyses[j] = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analyses[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAnalysesResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @instance + * @returns {Object.} JSON object + */ + ListAnalysesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalysesResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalysesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesResponse"; + }; + + return ListAnalysesResponse; + })(); + + v1.GetAnalysisRequest = (function() { + + /** + * Properties of a GetAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetAnalysisRequest + * @property {string|null} [name] GetAnalysisRequest name + */ + + /** + * Constructs a new GetAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetAnalysisRequest. + * @implements IGetAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set + */ + function GetAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetAnalysisRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @instance + */ + GetAnalysisRequest.prototype.name = ""; + + /** + * Creates a new GetAnalysisRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest instance + */ + GetAnalysisRequest.create = function create(properties) { + return new GetAnalysisRequest(properties); + }; + + /** + * Encodes the specified GetAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAnalysisRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAnalysisRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetAnalysisRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetAnalysisRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetAnalysisRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + */ + GetAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} message GetAnalysisRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetAnalysisRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetAnalysisRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest * @instance + * @returns {Object.} JSON object + */ + GetAnalysisRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetAnalysisRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetAnalysisRequest"; + }; + + return GetAnalysisRequest; + })(); + + v1.DeleteAnalysisRequest = (function() { + + /** + * Properties of a DeleteAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteAnalysisRequest + * @property {string|null} [name] DeleteAnalysisRequest name */ - ListAnalysesRequest.prototype.pageSize = 0; /** - * ListAnalysesRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest - * @instance + * Constructs a new DeleteAnalysisRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteAnalysisRequest. + * @implements IDeleteAnalysisRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set */ - ListAnalysesRequest.prototype.pageToken = ""; + function DeleteAnalysisRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * ListAnalysesRequest filter. - * @member {string} filter - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * DeleteAnalysisRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @instance */ - ListAnalysesRequest.prototype.filter = ""; + DeleteAnalysisRequest.prototype.name = ""; /** - * Creates a new ListAnalysesRequest instance using the specified properties. + * Creates a new DeleteAnalysisRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest instance + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest instance */ - ListAnalysesRequest.create = function create(properties) { - return new ListAnalysesRequest(properties); + DeleteAnalysisRequest.create = function create(properties) { + return new DeleteAnalysisRequest(properties); }; /** - * Encodes the specified ListAnalysesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnalysesRequest.encode = function encode(message, writer) { + DeleteAnalysisRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListAnalysesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesRequest.verify|verify} messages. + * Encodes the specified DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesRequest} message ListAnalysesRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnalysesRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAnalysesRequest message from the specified reader or buffer. + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnalysesRequest.decode = function decode(reader, length) { + DeleteAnalysisRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.name = reader.string(); break; } default: @@ -4652,149 +6900,125 @@ }; /** - * Decodes a ListAnalysesRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnalysesRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAnalysesRequest message. + * Verifies a DeleteAnalysisRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAnalysesRequest.verify = function verify(message) { + DeleteAnalysisRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListAnalysesRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} ListAnalysesRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest */ - ListAnalysesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest) + DeleteAnalysisRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListAnalysesRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListAnalysesRequest} message ListAnalysesRequest + * @param {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} message DeleteAnalysisRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAnalysesRequest.toObject = function toObject(message, options) { + DeleteAnalysisRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListAnalysesRequest to JSON. + * Converts this DeleteAnalysisRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @instance * @returns {Object.} JSON object */ - ListAnalysesRequest.prototype.toJSON = function toJSON() { + DeleteAnalysisRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAnalysesRequest + * Gets the default type url for DeleteAnalysisRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAnalysesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest"; }; - return ListAnalysesRequest; + return DeleteAnalysisRequest; })(); - v1.ListAnalysesResponse = (function() { + v1.BulkAnalyzeConversationsRequest = (function() { /** - * Properties of a ListAnalysesResponse. + * Properties of a BulkAnalyzeConversationsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListAnalysesResponse - * @property {Array.|null} [analyses] ListAnalysesResponse analyses - * @property {string|null} [nextPageToken] ListAnalysesResponse nextPageToken + * @interface IBulkAnalyzeConversationsRequest + * @property {string|null} [parent] BulkAnalyzeConversationsRequest parent + * @property {string|null} [filter] BulkAnalyzeConversationsRequest filter + * @property {number|null} [analysisPercentage] BulkAnalyzeConversationsRequest analysisPercentage + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] BulkAnalyzeConversationsRequest annotatorSelector */ /** - * Constructs a new ListAnalysesResponse. + * Constructs a new BulkAnalyzeConversationsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListAnalysesResponse. - * @implements IListAnalysesResponse + * @classdesc Represents a BulkAnalyzeConversationsRequest. + * @implements IBulkAnalyzeConversationsRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest=} [properties] Properties to set */ - function ListAnalysesResponse(properties) { - this.analyses = []; + function BulkAnalyzeConversationsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4802,92 +7026,117 @@ } /** - * ListAnalysesResponse analyses. - * @member {Array.} analyses - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * BulkAnalyzeConversationsRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @instance */ - ListAnalysesResponse.prototype.analyses = $util.emptyArray; + BulkAnalyzeConversationsRequest.prototype.parent = ""; /** - * ListAnalysesResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * BulkAnalyzeConversationsRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @instance */ - ListAnalysesResponse.prototype.nextPageToken = ""; + BulkAnalyzeConversationsRequest.prototype.filter = ""; /** - * Creates a new ListAnalysesResponse instance using the specified properties. + * BulkAnalyzeConversationsRequest analysisPercentage. + * @member {number} analysisPercentage + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest + * @instance + */ + BulkAnalyzeConversationsRequest.prototype.analysisPercentage = 0; + + /** + * BulkAnalyzeConversationsRequest annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest + * @instance + */ + BulkAnalyzeConversationsRequest.prototype.annotatorSelector = null; + + /** + * Creates a new BulkAnalyzeConversationsRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse instance + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest} BulkAnalyzeConversationsRequest instance */ - ListAnalysesResponse.create = function create(properties) { - return new ListAnalysesResponse(properties); + BulkAnalyzeConversationsRequest.create = function create(properties) { + return new BulkAnalyzeConversationsRequest(properties); }; /** - * Encodes the specified ListAnalysesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest} message BulkAnalyzeConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnalysesResponse.encode = function encode(message, writer) { + BulkAnalyzeConversationsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.analyses != null && message.analyses.length) - for (var i = 0; i < message.analyses.length; ++i) - $root.google.cloud.contactcenterinsights.v1.Analysis.encode(message.analyses[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.filter); + if (message.analysisPercentage != null && Object.hasOwnProperty.call(message, "analysisPercentage")) + writer.uint32(/* id 3, wireType 5 =*/29).float(message.analysisPercentage); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListAnalysesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListAnalysesResponse.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListAnalysesResponse} message ListAnalysesResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest} message BulkAnalyzeConversationsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListAnalysesResponse.encodeDelimited = function encodeDelimited(message, writer) { + BulkAnalyzeConversationsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListAnalysesResponse message from the specified reader or buffer. + * Decodes a BulkAnalyzeConversationsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest} BulkAnalyzeConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnalysesResponse.decode = function decode(reader, length) { + BulkAnalyzeConversationsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.analyses && message.analyses.length)) - message.analyses = []; - message.analyses.push($root.google.cloud.contactcenterinsights.v1.Analysis.decode(reader, reader.uint32())); + message.parent = reader.string(); + break; + } + case 2: { + message.filter = reader.string(); + break; + } + case 3: { + message.analysisPercentage = reader.float(); break; } - case 2: { - message.nextPageToken = reader.string(); + case 8: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); break; } default: @@ -4899,148 +7148,157 @@ }; /** - * Decodes a ListAnalysesResponse message from the specified reader or buffer, length delimited. + * Decodes a BulkAnalyzeConversationsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest} BulkAnalyzeConversationsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListAnalysesResponse.decodeDelimited = function decodeDelimited(reader) { + BulkAnalyzeConversationsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListAnalysesResponse message. + * Verifies a BulkAnalyzeConversationsRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListAnalysesResponse.verify = function verify(message) { + BulkAnalyzeConversationsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.analyses != null && message.hasOwnProperty("analyses")) { - if (!Array.isArray(message.analyses)) - return "analyses: array expected"; - for (var i = 0; i < message.analyses.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Analysis.verify(message.analyses[i]); - if (error) - return "analyses." + error; - } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + if (message.analysisPercentage != null && message.hasOwnProperty("analysisPercentage")) + if (typeof message.analysisPercentage !== "number") + return "analysisPercentage: number expected"; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListAnalysesResponse message from a plain object. Also converts values to their respective internal types. + * Creates a BulkAnalyzeConversationsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} ListAnalysesResponse + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest} BulkAnalyzeConversationsRequest */ - ListAnalysesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse) + BulkAnalyzeConversationsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListAnalysesResponse(); - if (object.analyses) { - if (!Array.isArray(object.analyses)) - throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: array expected"); - message.analyses = []; - for (var i = 0; i < object.analyses.length; ++i) { - if (typeof object.analyses[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ListAnalysesResponse.analyses: object expected"); - message.analyses[i] = $root.google.cloud.contactcenterinsights.v1.Analysis.fromObject(object.analyses[i]); - } + var message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.filter != null) + message.filter = String(object.filter); + if (object.analysisPercentage != null) + message.analysisPercentage = Number(object.analysisPercentage); + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListAnalysesResponse message. Also converts values to other types if specified. + * Creates a plain object from a BulkAnalyzeConversationsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListAnalysesResponse} message ListAnalysesResponse + * @param {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest} message BulkAnalyzeConversationsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListAnalysesResponse.toObject = function toObject(message, options) { + BulkAnalyzeConversationsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.analyses = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.analyses && message.analyses.length) { - object.analyses = []; - for (var j = 0; j < message.analyses.length; ++j) - object.analyses[j] = $root.google.cloud.contactcenterinsights.v1.Analysis.toObject(message.analyses[j], options); + if (options.defaults) { + object.parent = ""; + object.filter = ""; + object.analysisPercentage = 0; + object.annotatorSelector = null; } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + if (message.analysisPercentage != null && message.hasOwnProperty("analysisPercentage")) + object.analysisPercentage = options.json && !isFinite(message.analysisPercentage) ? String(message.analysisPercentage) : message.analysisPercentage; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); return object; }; /** - * Converts this ListAnalysesResponse to JSON. + * Converts this BulkAnalyzeConversationsRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @instance * @returns {Object.} JSON object */ - ListAnalysesResponse.prototype.toJSON = function toJSON() { + BulkAnalyzeConversationsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListAnalysesResponse + * Gets the default type url for BulkAnalyzeConversationsRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListAnalysesResponse + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListAnalysesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BulkAnalyzeConversationsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListAnalysesResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest"; }; - return ListAnalysesResponse; + return BulkAnalyzeConversationsRequest; })(); - v1.GetAnalysisRequest = (function() { + v1.BulkAnalyzeConversationsMetadata = (function() { /** - * Properties of a GetAnalysisRequest. + * Properties of a BulkAnalyzeConversationsMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetAnalysisRequest - * @property {string|null} [name] GetAnalysisRequest name + * @interface IBulkAnalyzeConversationsMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] BulkAnalyzeConversationsMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] BulkAnalyzeConversationsMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest|null} [request] BulkAnalyzeConversationsMetadata request + * @property {number|null} [completedAnalysesCount] BulkAnalyzeConversationsMetadata completedAnalysesCount + * @property {number|null} [failedAnalysesCount] BulkAnalyzeConversationsMetadata failedAnalysesCount + * @property {number|null} [totalRequestedAnalysesCount] BulkAnalyzeConversationsMetadata totalRequestedAnalysesCount */ /** - * Constructs a new GetAnalysisRequest. + * Constructs a new BulkAnalyzeConversationsMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetAnalysisRequest. - * @implements IGetAnalysisRequest + * @classdesc Represents a BulkAnalyzeConversationsMetadata. + * @implements IBulkAnalyzeConversationsMetadata * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata=} [properties] Properties to set */ - function GetAnalysisRequest(properties) { + function BulkAnalyzeConversationsMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5048,75 +7306,145 @@ } /** - * GetAnalysisRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * BulkAnalyzeConversationsMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @instance */ - GetAnalysisRequest.prototype.name = ""; + BulkAnalyzeConversationsMetadata.prototype.createTime = null; /** - * Creates a new GetAnalysisRequest instance using the specified properties. + * BulkAnalyzeConversationsMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + * @instance + */ + BulkAnalyzeConversationsMetadata.prototype.endTime = null; + + /** + * BulkAnalyzeConversationsMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + * @instance + */ + BulkAnalyzeConversationsMetadata.prototype.request = null; + + /** + * BulkAnalyzeConversationsMetadata completedAnalysesCount. + * @member {number} completedAnalysesCount + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + * @instance + */ + BulkAnalyzeConversationsMetadata.prototype.completedAnalysesCount = 0; + + /** + * BulkAnalyzeConversationsMetadata failedAnalysesCount. + * @member {number} failedAnalysesCount + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + * @instance + */ + BulkAnalyzeConversationsMetadata.prototype.failedAnalysesCount = 0; + + /** + * BulkAnalyzeConversationsMetadata totalRequestedAnalysesCount. + * @member {number} totalRequestedAnalysesCount + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + * @instance + */ + BulkAnalyzeConversationsMetadata.prototype.totalRequestedAnalysesCount = 0; + + /** + * Creates a new BulkAnalyzeConversationsMetadata instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest instance + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata} BulkAnalyzeConversationsMetadata instance */ - GetAnalysisRequest.create = function create(properties) { - return new GetAnalysisRequest(properties); + BulkAnalyzeConversationsMetadata.create = function create(properties) { + return new BulkAnalyzeConversationsMetadata(properties); }; /** - * Encodes the specified GetAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata} message BulkAnalyzeConversationsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAnalysisRequest.encode = function encode(message, writer) { + BulkAnalyzeConversationsMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.completedAnalysesCount != null && Object.hasOwnProperty.call(message, "completedAnalysesCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.completedAnalysesCount); + if (message.failedAnalysesCount != null && Object.hasOwnProperty.call(message, "failedAnalysesCount")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.failedAnalysesCount); + if (message.totalRequestedAnalysesCount != null && Object.hasOwnProperty.call(message, "totalRequestedAnalysesCount")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.totalRequestedAnalysesCount); return writer; }; /** - * Encodes the specified GetAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetAnalysisRequest.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IGetAnalysisRequest} message GetAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata} message BulkAnalyzeConversationsMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + BulkAnalyzeConversationsMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetAnalysisRequest message from the specified reader or buffer. + * Decodes a BulkAnalyzeConversationsMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata} BulkAnalyzeConversationsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnalysisRequest.decode = function decode(reader, length) { + BulkAnalyzeConversationsMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + message.completedAnalysesCount = reader.int32(); + break; + } + case 5: { + message.failedAnalysesCount = reader.int32(); + break; + } + case 6: { + message.totalRequestedAnalysesCount = reader.int32(); break; } default: @@ -5128,122 +7456,179 @@ }; /** - * Decodes a GetAnalysisRequest message from the specified reader or buffer, length delimited. + * Decodes a BulkAnalyzeConversationsMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata} BulkAnalyzeConversationsMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + BulkAnalyzeConversationsMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetAnalysisRequest message. + * Verifies a BulkAnalyzeConversationsMetadata message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetAnalysisRequest.verify = function verify(message) { + BulkAnalyzeConversationsMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.completedAnalysesCount != null && message.hasOwnProperty("completedAnalysesCount")) + if (!$util.isInteger(message.completedAnalysesCount)) + return "completedAnalysesCount: integer expected"; + if (message.failedAnalysesCount != null && message.hasOwnProperty("failedAnalysesCount")) + if (!$util.isInteger(message.failedAnalysesCount)) + return "failedAnalysesCount: integer expected"; + if (message.totalRequestedAnalysesCount != null && message.hasOwnProperty("totalRequestedAnalysesCount")) + if (!$util.isInteger(message.totalRequestedAnalysesCount)) + return "totalRequestedAnalysesCount: integer expected"; return null; }; /** - * Creates a GetAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BulkAnalyzeConversationsMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} GetAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata} BulkAnalyzeConversationsMetadata */ - GetAnalysisRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest) + BulkAnalyzeConversationsMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetAnalysisRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.fromObject(object.request); + } + if (object.completedAnalysesCount != null) + message.completedAnalysesCount = object.completedAnalysesCount | 0; + if (object.failedAnalysesCount != null) + message.failedAnalysesCount = object.failedAnalysesCount | 0; + if (object.totalRequestedAnalysesCount != null) + message.totalRequestedAnalysesCount = object.totalRequestedAnalysesCount | 0; return message; }; /** - * Creates a plain object from a GetAnalysisRequest message. Also converts values to other types if specified. + * Creates a plain object from a BulkAnalyzeConversationsMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.GetAnalysisRequest} message GetAnalysisRequest + * @param {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata} message BulkAnalyzeConversationsMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetAnalysisRequest.toObject = function toObject(message, options) { + BulkAnalyzeConversationsMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + object.completedAnalysesCount = 0; + object.failedAnalysesCount = 0; + object.totalRequestedAnalysesCount = 0; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest.toObject(message.request, options); + if (message.completedAnalysesCount != null && message.hasOwnProperty("completedAnalysesCount")) + object.completedAnalysesCount = message.completedAnalysesCount; + if (message.failedAnalysesCount != null && message.hasOwnProperty("failedAnalysesCount")) + object.failedAnalysesCount = message.failedAnalysesCount; + if (message.totalRequestedAnalysesCount != null && message.hasOwnProperty("totalRequestedAnalysesCount")) + object.totalRequestedAnalysesCount = message.totalRequestedAnalysesCount; return object; }; /** - * Converts this GetAnalysisRequest to JSON. + * Converts this BulkAnalyzeConversationsMetadata to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @instance * @returns {Object.} JSON object */ - GetAnalysisRequest.prototype.toJSON = function toJSON() { + BulkAnalyzeConversationsMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetAnalysisRequest + * Gets the default type url for BulkAnalyzeConversationsMetadata * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BulkAnalyzeConversationsMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetAnalysisRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata"; }; - return GetAnalysisRequest; + return BulkAnalyzeConversationsMetadata; })(); - v1.DeleteAnalysisRequest = (function() { + v1.BulkAnalyzeConversationsResponse = (function() { /** - * Properties of a DeleteAnalysisRequest. + * Properties of a BulkAnalyzeConversationsResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDeleteAnalysisRequest - * @property {string|null} [name] DeleteAnalysisRequest name + * @interface IBulkAnalyzeConversationsResponse + * @property {number|null} [successfulAnalysisCount] BulkAnalyzeConversationsResponse successfulAnalysisCount + * @property {number|null} [failedAnalysisCount] BulkAnalyzeConversationsResponse failedAnalysisCount */ /** - * Constructs a new DeleteAnalysisRequest. + * Constructs a new BulkAnalyzeConversationsResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DeleteAnalysisRequest. - * @implements IDeleteAnalysisRequest + * @classdesc Represents a BulkAnalyzeConversationsResponse. + * @implements IBulkAnalyzeConversationsResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse=} [properties] Properties to set */ - function DeleteAnalysisRequest(properties) { + function BulkAnalyzeConversationsResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5251,75 +7636,89 @@ } /** - * DeleteAnalysisRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * BulkAnalyzeConversationsResponse successfulAnalysisCount. + * @member {number} successfulAnalysisCount + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @instance */ - DeleteAnalysisRequest.prototype.name = ""; + BulkAnalyzeConversationsResponse.prototype.successfulAnalysisCount = 0; /** - * Creates a new DeleteAnalysisRequest instance using the specified properties. + * BulkAnalyzeConversationsResponse failedAnalysisCount. + * @member {number} failedAnalysisCount + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse + * @instance + */ + BulkAnalyzeConversationsResponse.prototype.failedAnalysisCount = 0; + + /** + * Creates a new BulkAnalyzeConversationsResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest instance + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse} BulkAnalyzeConversationsResponse instance */ - DeleteAnalysisRequest.create = function create(properties) { - return new DeleteAnalysisRequest(properties); + BulkAnalyzeConversationsResponse.create = function create(properties) { + return new BulkAnalyzeConversationsResponse(properties); }; /** - * Encodes the specified DeleteAnalysisRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse} message BulkAnalyzeConversationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAnalysisRequest.encode = function encode(message, writer) { + BulkAnalyzeConversationsResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.successfulAnalysisCount != null && Object.hasOwnProperty.call(message, "successfulAnalysisCount")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.successfulAnalysisCount); + if (message.failedAnalysisCount != null && Object.hasOwnProperty.call(message, "failedAnalysisCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.failedAnalysisCount); return writer; }; /** - * Encodes the specified DeleteAnalysisRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest.verify|verify} messages. + * Encodes the specified BulkAnalyzeConversationsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteAnalysisRequest} message DeleteAnalysisRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse} message BulkAnalyzeConversationsResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteAnalysisRequest.encodeDelimited = function encodeDelimited(message, writer) { + BulkAnalyzeConversationsResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteAnalysisRequest message from the specified reader or buffer. + * Decodes a BulkAnalyzeConversationsResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse} BulkAnalyzeConversationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAnalysisRequest.decode = function decode(reader, length) { + BulkAnalyzeConversationsResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.successfulAnalysisCount = reader.int32(); + break; + } + case 2: { + message.failedAnalysisCount = reader.int32(); break; } default: @@ -5331,102 +7730,111 @@ }; /** - * Decodes a DeleteAnalysisRequest message from the specified reader or buffer, length delimited. + * Decodes a BulkAnalyzeConversationsResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse} BulkAnalyzeConversationsResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteAnalysisRequest.decodeDelimited = function decodeDelimited(reader) { + BulkAnalyzeConversationsResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteAnalysisRequest message. + * Verifies a BulkAnalyzeConversationsResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteAnalysisRequest.verify = function verify(message) { + BulkAnalyzeConversationsResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; + if (message.successfulAnalysisCount != null && message.hasOwnProperty("successfulAnalysisCount")) + if (!$util.isInteger(message.successfulAnalysisCount)) + return "successfulAnalysisCount: integer expected"; + if (message.failedAnalysisCount != null && message.hasOwnProperty("failedAnalysisCount")) + if (!$util.isInteger(message.failedAnalysisCount)) + return "failedAnalysisCount: integer expected"; return null; }; /** - * Creates a DeleteAnalysisRequest message from a plain object. Also converts values to their respective internal types. + * Creates a BulkAnalyzeConversationsResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} DeleteAnalysisRequest + * @returns {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse} BulkAnalyzeConversationsResponse */ - DeleteAnalysisRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest) + BulkAnalyzeConversationsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse(); + if (object.successfulAnalysisCount != null) + message.successfulAnalysisCount = object.successfulAnalysisCount | 0; + if (object.failedAnalysisCount != null) + message.failedAnalysisCount = object.failedAnalysisCount | 0; return message; }; /** - * Creates a plain object from a DeleteAnalysisRequest message. Also converts values to other types if specified. + * Creates a plain object from a BulkAnalyzeConversationsResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static - * @param {google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest} message DeleteAnalysisRequest + * @param {google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse} message BulkAnalyzeConversationsResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteAnalysisRequest.toObject = function toObject(message, options) { + BulkAnalyzeConversationsResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + if (options.defaults) { + object.successfulAnalysisCount = 0; + object.failedAnalysisCount = 0; + } + if (message.successfulAnalysisCount != null && message.hasOwnProperty("successfulAnalysisCount")) + object.successfulAnalysisCount = message.successfulAnalysisCount; + if (message.failedAnalysisCount != null && message.hasOwnProperty("failedAnalysisCount")) + object.failedAnalysisCount = message.failedAnalysisCount; return object; }; /** - * Converts this DeleteAnalysisRequest to JSON. + * Converts this BulkAnalyzeConversationsResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @instance * @returns {Object.} JSON object */ - DeleteAnalysisRequest.prototype.toJSON = function toJSON() { + BulkAnalyzeConversationsResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteAnalysisRequest + * Gets the default type url for BulkAnalyzeConversationsResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest + * @memberof google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteAnalysisRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + BulkAnalyzeConversationsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteAnalysisRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse"; }; - return DeleteAnalysisRequest; + return BulkAnalyzeConversationsResponse; })(); v1.ExportInsightsDataRequest = (function() { @@ -10331,57 +12739,279 @@ * @function encode * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateIssueRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) { + var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issue); + if (error) + return "issue." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + */ + UpdateIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + if (object.issue != null) { + if (typeof object.issue !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.issue: object expected"); + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issue); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} message UpdateIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateIssueRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = null; + object.updateMask = null; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issue, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueRequest"; + }; + + return UpdateIssueRequest; + })(); + + v1.DeleteIssueRequest = (function() { + + /** + * Properties of a DeleteIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteIssueRequest + * @property {string|null} [name] DeleteIssueRequest name + */ + + /** + * Constructs a new DeleteIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteIssueRequest. + * @implements IDeleteIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set + */ + function DeleteIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteIssueRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @instance + */ + DeleteIssueRequest.prototype.name = ""; + + /** + * Creates a new DeleteIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest instance + */ + DeleteIssueRequest.create = function create(properties) { + return new DeleteIssueRequest(properties); + }; + + /** + * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIssueRequest.encode = function encode(message, writer) { + DeleteIssueRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * Encodes the specified DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeleteIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * Decodes a DeleteIssueRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIssueRequest.decode = function decode(reader, length) { + DeleteIssueRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -10393,121 +13023,102 @@ }; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIssueRequest.decodeDelimited = function decodeDelimited(reader) { + DeleteIssueRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateIssueRequest message. + * Verifies a DeleteIssueRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateIssueRequest.verify = function verify(message) { + DeleteIssueRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issue != null && message.hasOwnProperty("issue")) { - var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issue); - if (error) - return "issue." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest */ - UpdateIssueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest) + DeleteIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); - if (object.issue != null) { - if (typeof object.issue !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.issue: object expected"); - message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issue); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); - } + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static - * @param {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} message UpdateIssueRequest + * @param {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} message DeleteIssueRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateIssueRequest.toObject = function toObject(message, options) { + DeleteIssueRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.issue = null; - object.updateMask = null; - } - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issue, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this UpdateIssueRequest to JSON. + * Converts this DeleteIssueRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @instance * @returns {Object.} JSON object */ - UpdateIssueRequest.prototype.toJSON = function toJSON() { + DeleteIssueRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateIssueRequest + * Gets the default type url for DeleteIssueRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeleteIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteIssueRequest"; }; - return UpdateIssueRequest; + return DeleteIssueRequest; })(); v1.CalculateIssueModelStatsRequest = (function() { @@ -16358,6 +18969,7 @@ * @property {google.protobuf.ITimestamp|null} [requestTime] Analysis requestTime * @property {google.protobuf.ITimestamp|null} [createTime] Analysis createTime * @property {google.cloud.contactcenterinsights.v1.IAnalysisResult|null} [analysisResult] Analysis analysisResult + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] Analysis annotatorSelector */ /** @@ -16407,6 +19019,14 @@ */ Analysis.prototype.analysisResult = null; + /** + * Analysis annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.Analysis + * @instance + */ + Analysis.prototype.annotatorSelector = null; + /** * Creates a new Analysis instance using the specified properties. * @function create @@ -16439,6 +19059,8 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.analysisResult != null && Object.hasOwnProperty.call(message, "analysisResult")) $root.google.cloud.contactcenterinsights.v1.AnalysisResult.encode(message.analysisResult, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); return writer; }; @@ -16489,6 +19111,10 @@ message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.decode(reader, reader.uint32()); break; } + case 8: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -16542,6 +19168,11 @@ if (error) return "analysisResult." + error; } + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; + } return null; }; @@ -16574,6 +19205,11 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.analysisResult: object expected"); message.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.fromObject(object.analysisResult); } + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Analysis.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } return message; }; @@ -16595,6 +19231,7 @@ object.requestTime = null; object.createTime = null; object.analysisResult = null; + object.annotatorSelector = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -16604,6 +19241,8 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.analysisResult != null && message.hasOwnProperty("analysisResult")) object.analysisResult = $root.google.cloud.contactcenterinsights.v1.AnalysisResult.toObject(message.analysisResult, options); + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); return object; }; @@ -18844,6 +21483,7 @@ * @property {google.cloud.contactcenterinsights.v1.IEntityMentionData|null} [entityMentionData] CallAnnotation entityMentionData * @property {google.cloud.contactcenterinsights.v1.IIntentMatchData|null} [intentMatchData] CallAnnotation intentMatchData * @property {google.cloud.contactcenterinsights.v1.IPhraseMatchData|null} [phraseMatchData] CallAnnotation phraseMatchData + * @property {google.cloud.contactcenterinsights.v1.IIssueMatchData|null} [issueMatchData] CallAnnotation issueMatchData * @property {number|null} [channelTag] CallAnnotation channelTag * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationStartBoundary] CallAnnotation annotationStartBoundary * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [annotationEndBoundary] CallAnnotation annotationEndBoundary @@ -18920,6 +21560,14 @@ */ CallAnnotation.prototype.phraseMatchData = null; + /** + * CallAnnotation issueMatchData. + * @member {google.cloud.contactcenterinsights.v1.IIssueMatchData|null|undefined} issueMatchData + * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation + * @instance + */ + CallAnnotation.prototype.issueMatchData = null; + /** * CallAnnotation channelTag. * @member {number} channelTag @@ -18949,12 +21597,12 @@ /** * CallAnnotation data. - * @member {"interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|undefined} data + * @member {"interruptionData"|"sentimentData"|"silenceData"|"holdData"|"entityMentionData"|"intentMatchData"|"phraseMatchData"|"issueMatchData"|undefined} data * @memberof google.cloud.contactcenterinsights.v1.CallAnnotation * @instance */ Object.defineProperty(CallAnnotation.prototype, "data", { - get: $util.oneOfGetter($oneOfFields = ["interruptionData", "sentimentData", "silenceData", "holdData", "entityMentionData", "intentMatchData", "phraseMatchData"]), + get: $util.oneOfGetter($oneOfFields = ["interruptionData", "sentimentData", "silenceData", "holdData", "entityMentionData", "intentMatchData", "phraseMatchData", "issueMatchData"]), set: $util.oneOfSetter($oneOfFields) }); @@ -19002,6 +21650,8 @@ $root.google.cloud.contactcenterinsights.v1.IntentMatchData.encode(message.intentMatchData, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.phraseMatchData != null && Object.hasOwnProperty.call(message, "phraseMatchData")) $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.encode(message.phraseMatchData, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.issueMatchData != null && Object.hasOwnProperty.call(message, "issueMatchData")) + $root.google.cloud.contactcenterinsights.v1.IssueMatchData.encode(message.issueMatchData, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); return writer; }; @@ -19064,6 +21714,10 @@ message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.decode(reader, reader.uint32()); break; } + case 18: { + message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.decode(reader, reader.uint32()); + break; + } case 1: { message.channelTag = reader.int32(); break; @@ -19180,6 +21834,16 @@ return "phraseMatchData." + error; } } + if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { + if (properties.data === 1) + return "data: multiple values"; + properties.data = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.verify(message.issueMatchData); + if (error) + return "issueMatchData." + error; + } + } if (message.channelTag != null && message.hasOwnProperty("channelTag")) if (!$util.isInteger(message.channelTag)) return "channelTag: integer expected"; @@ -19243,6 +21907,11 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.phraseMatchData: object expected"); message.phraseMatchData = $root.google.cloud.contactcenterinsights.v1.PhraseMatchData.fromObject(object.phraseMatchData); } + if (object.issueMatchData != null) { + if (typeof object.issueMatchData !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CallAnnotation.issueMatchData: object expected"); + message.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.fromObject(object.issueMatchData); + } if (object.channelTag != null) message.channelTag = object.channelTag | 0; if (object.annotationStartBoundary != null) { @@ -19317,6 +21986,11 @@ if (options.oneofs) object.data = "phraseMatchData"; } + if (message.issueMatchData != null && message.hasOwnProperty("issueMatchData")) { + object.issueMatchData = $root.google.cloud.contactcenterinsights.v1.IssueMatchData.toObject(message.issueMatchData, options); + if (options.oneofs) + object.data = "issueMatchData"; + } return object; }; @@ -21933,19 +24607,227 @@ /** * Gets the default type url for SentimentData * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @memberof google.cloud.contactcenterinsights.v1.SentimentData + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SentimentData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SentimentData"; + }; + + return SentimentData; + })(); + + v1.IssueMatchData = (function() { + + /** + * Properties of an IssueMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IIssueMatchData + * @property {google.cloud.contactcenterinsights.v1.IIssueAssignment|null} [issueAssignment] IssueMatchData issueAssignment + */ + + /** + * Constructs a new IssueMatchData. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an IssueMatchData. + * @implements IIssueMatchData + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set + */ + function IssueMatchData(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IssueMatchData issueAssignment. + * @member {google.cloud.contactcenterinsights.v1.IIssueAssignment|null|undefined} issueAssignment + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @instance + */ + IssueMatchData.prototype.issueAssignment = null; + + /** + * Creates a new IssueMatchData instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData instance + */ + IssueMatchData.create = function create(properties) { + return new IssueMatchData(properties); + }; + + /** + * Encodes the specified IssueMatchData message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueMatchData.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueAssignment != null && Object.hasOwnProperty.call(message, "issueAssignment")) + $root.google.cloud.contactcenterinsights.v1.IssueAssignment.encode(message.issueAssignment, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified IssueMatchData message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.IssueMatchData.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IIssueMatchData} message IssueMatchData message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IssueMatchData.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IssueMatchData message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueMatchData.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IssueMatchData message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IssueMatchData.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IssueMatchData message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IssueMatchData.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.verify(message.issueAssignment); + if (error) + return "issueAssignment." + error; + } + return null; + }; + + /** + * Creates an IssueMatchData message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.IssueMatchData} IssueMatchData + */ + IssueMatchData.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.IssueMatchData) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.IssueMatchData(); + if (object.issueAssignment != null) { + if (typeof object.issueAssignment !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.IssueMatchData.issueAssignment: object expected"); + message.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.fromObject(object.issueAssignment); + } + return message; + }; + + /** + * Creates a plain object from an IssueMatchData message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @static + * @param {google.cloud.contactcenterinsights.v1.IssueMatchData} message IssueMatchData + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IssueMatchData.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.issueAssignment = null; + if (message.issueAssignment != null && message.hasOwnProperty("issueAssignment")) + object.issueAssignment = $root.google.cloud.contactcenterinsights.v1.IssueAssignment.toObject(message.issueAssignment, options); + return object; + }; + + /** + * Converts this IssueMatchData to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData + * @instance + * @returns {Object.} JSON object + */ + IssueMatchData.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IssueMatchData + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.IssueMatchData * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SentimentData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + IssueMatchData.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.SentimentData"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.IssueMatchData"; }; - return SentimentData; + return IssueMatchData; })(); v1.IssueModel = (function() { @@ -22669,6 +25551,7 @@ * @property {string|null} [displayName] Issue displayName * @property {google.protobuf.ITimestamp|null} [createTime] Issue createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Issue updateTime + * @property {Array.|null} [sampleUtterances] Issue sampleUtterances */ /** @@ -22680,6 +25563,7 @@ * @param {google.cloud.contactcenterinsights.v1.IIssue=} [properties] Properties to set */ function Issue(properties) { + this.sampleUtterances = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -22718,6 +25602,14 @@ */ Issue.prototype.updateTime = null; + /** + * Issue sampleUtterances. + * @member {Array.} sampleUtterances + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.sampleUtterances = $util.emptyArray; + /** * Creates a new Issue instance using the specified properties. * @function create @@ -22750,6 +25642,9 @@ $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.sampleUtterances != null && message.sampleUtterances.length) + for (var i = 0; i < message.sampleUtterances.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.sampleUtterances[i]); return writer; }; @@ -22800,6 +25695,12 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } + case 6: { + if (!(message.sampleUtterances && message.sampleUtterances.length)) + message.sampleUtterances = []; + message.sampleUtterances.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -22851,6 +25752,13 @@ if (error) return "updateTime." + error; } + if (message.sampleUtterances != null && message.hasOwnProperty("sampleUtterances")) { + if (!Array.isArray(message.sampleUtterances)) + return "sampleUtterances: array expected"; + for (var i = 0; i < message.sampleUtterances.length; ++i) + if (!$util.isString(message.sampleUtterances[i])) + return "sampleUtterances: string[] expected"; + } return null; }; @@ -22880,6 +25788,13 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } + if (object.sampleUtterances) { + if (!Array.isArray(object.sampleUtterances)) + throw TypeError(".google.cloud.contactcenterinsights.v1.Issue.sampleUtterances: array expected"); + message.sampleUtterances = []; + for (var i = 0; i < object.sampleUtterances.length; ++i) + message.sampleUtterances[i] = String(object.sampleUtterances[i]); + } return message; }; @@ -22896,6 +25811,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.sampleUtterances = []; if (options.defaults) { object.name = ""; object.displayName = ""; @@ -22910,6 +25827,11 @@ object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.sampleUtterances && message.sampleUtterances.length) { + object.sampleUtterances = []; + for (var j = 0; j < message.sampleUtterances.length; ++j) + object.sampleUtterances[j] = message.sampleUtterances[j]; + } return object; }; @@ -25447,6 +28369,7 @@ * @memberof google.cloud.contactcenterinsights.v1.Settings * @interface IAnalysisConfig * @property {number|null} [runtimeIntegrationAnalysisPercentage] AnalysisConfig runtimeIntegrationAnalysisPercentage + * @property {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null} [annotatorSelector] AnalysisConfig annotatorSelector */ /** @@ -25472,6 +28395,14 @@ */ AnalysisConfig.prototype.runtimeIntegrationAnalysisPercentage = 0; + /** + * AnalysisConfig annotatorSelector. + * @member {google.cloud.contactcenterinsights.v1.IAnnotatorSelector|null|undefined} annotatorSelector + * @memberof google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig + * @instance + */ + AnalysisConfig.prototype.annotatorSelector = null; + /** * Creates a new AnalysisConfig instance using the specified properties. * @function create @@ -25498,6 +28429,8 @@ writer = $Writer.create(); if (message.runtimeIntegrationAnalysisPercentage != null && Object.hasOwnProperty.call(message, "runtimeIntegrationAnalysisPercentage")) writer.uint32(/* id 1, wireType 1 =*/9).double(message.runtimeIntegrationAnalysisPercentage); + if (message.annotatorSelector != null && Object.hasOwnProperty.call(message, "annotatorSelector")) + $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.encode(message.annotatorSelector, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); return writer; }; @@ -25536,6 +28469,10 @@ message.runtimeIntegrationAnalysisPercentage = reader.double(); break; } + case 5: { + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -25574,6 +28511,11 @@ if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) if (typeof message.runtimeIntegrationAnalysisPercentage !== "number") return "runtimeIntegrationAnalysisPercentage: number expected"; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) { + var error = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify(message.annotatorSelector); + if (error) + return "annotatorSelector." + error; + } return null; }; @@ -25591,6 +28533,11 @@ var message = new $root.google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig(); if (object.runtimeIntegrationAnalysisPercentage != null) message.runtimeIntegrationAnalysisPercentage = Number(object.runtimeIntegrationAnalysisPercentage); + if (object.annotatorSelector != null) { + if (typeof object.annotatorSelector !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.Settings.AnalysisConfig.annotatorSelector: object expected"); + message.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.fromObject(object.annotatorSelector); + } return message; }; @@ -25607,10 +28554,14 @@ if (!options) options = {}; var object = {}; - if (options.defaults) + if (options.defaults) { object.runtimeIntegrationAnalysisPercentage = 0; + object.annotatorSelector = null; + } if (message.runtimeIntegrationAnalysisPercentage != null && message.hasOwnProperty("runtimeIntegrationAnalysisPercentage")) object.runtimeIntegrationAnalysisPercentage = options.json && !isFinite(message.runtimeIntegrationAnalysisPercentage) ? String(message.runtimeIntegrationAnalysisPercentage) : message.runtimeIntegrationAnalysisPercentage; + if (message.annotatorSelector != null && message.hasOwnProperty("annotatorSelector")) + object.annotatorSelector = $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector.toObject(message.annotatorSelector, options); return object; }; @@ -28683,6 +31634,428 @@ return View; })(); + v1.AnnotatorSelector = (function() { + + /** + * Properties of an AnnotatorSelector. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IAnnotatorSelector + * @property {boolean|null} [runInterruptionAnnotator] AnnotatorSelector runInterruptionAnnotator + * @property {boolean|null} [runSilenceAnnotator] AnnotatorSelector runSilenceAnnotator + * @property {boolean|null} [runPhraseMatcherAnnotator] AnnotatorSelector runPhraseMatcherAnnotator + * @property {Array.|null} [phraseMatchers] AnnotatorSelector phraseMatchers + * @property {boolean|null} [runSentimentAnnotator] AnnotatorSelector runSentimentAnnotator + * @property {boolean|null} [runEntityAnnotator] AnnotatorSelector runEntityAnnotator + * @property {boolean|null} [runIntentAnnotator] AnnotatorSelector runIntentAnnotator + * @property {boolean|null} [runIssueModelAnnotator] AnnotatorSelector runIssueModelAnnotator + * @property {Array.|null} [issueModels] AnnotatorSelector issueModels + */ + + /** + * Constructs a new AnnotatorSelector. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an AnnotatorSelector. + * @implements IAnnotatorSelector + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set + */ + function AnnotatorSelector(properties) { + this.phraseMatchers = []; + this.issueModels = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnnotatorSelector runInterruptionAnnotator. + * @member {boolean} runInterruptionAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runInterruptionAnnotator = false; + + /** + * AnnotatorSelector runSilenceAnnotator. + * @member {boolean} runSilenceAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runSilenceAnnotator = false; + + /** + * AnnotatorSelector runPhraseMatcherAnnotator. + * @member {boolean} runPhraseMatcherAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runPhraseMatcherAnnotator = false; + + /** + * AnnotatorSelector phraseMatchers. + * @member {Array.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.phraseMatchers = $util.emptyArray; + + /** + * AnnotatorSelector runSentimentAnnotator. + * @member {boolean} runSentimentAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runSentimentAnnotator = false; + + /** + * AnnotatorSelector runEntityAnnotator. + * @member {boolean} runEntityAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runEntityAnnotator = false; + + /** + * AnnotatorSelector runIntentAnnotator. + * @member {boolean} runIntentAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runIntentAnnotator = false; + + /** + * AnnotatorSelector runIssueModelAnnotator. + * @member {boolean} runIssueModelAnnotator + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.runIssueModelAnnotator = false; + + /** + * AnnotatorSelector issueModels. + * @member {Array.} issueModels + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + */ + AnnotatorSelector.prototype.issueModels = $util.emptyArray; + + /** + * Creates a new AnnotatorSelector instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector instance + */ + AnnotatorSelector.create = function create(properties) { + return new AnnotatorSelector(properties); + }; + + /** + * Encodes the specified AnnotatorSelector message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotatorSelector.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.runInterruptionAnnotator != null && Object.hasOwnProperty.call(message, "runInterruptionAnnotator")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.runInterruptionAnnotator); + if (message.runSilenceAnnotator != null && Object.hasOwnProperty.call(message, "runSilenceAnnotator")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.runSilenceAnnotator); + if (message.runPhraseMatcherAnnotator != null && Object.hasOwnProperty.call(message, "runPhraseMatcherAnnotator")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.runPhraseMatcherAnnotator); + if (message.phraseMatchers != null && message.phraseMatchers.length) + for (var i = 0; i < message.phraseMatchers.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.phraseMatchers[i]); + if (message.runSentimentAnnotator != null && Object.hasOwnProperty.call(message, "runSentimentAnnotator")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.runSentimentAnnotator); + if (message.runEntityAnnotator != null && Object.hasOwnProperty.call(message, "runEntityAnnotator")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.runEntityAnnotator); + if (message.runIntentAnnotator != null && Object.hasOwnProperty.call(message, "runIntentAnnotator")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.runIntentAnnotator); + if (message.runIssueModelAnnotator != null && Object.hasOwnProperty.call(message, "runIssueModelAnnotator")) + writer.uint32(/* id 8, wireType 0 =*/64).bool(message.runIssueModelAnnotator); + if (message.issueModels != null && message.issueModels.length) + for (var i = 0; i < message.issueModels.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.issueModels[i]); + return writer; + }; + + /** + * Encodes the specified AnnotatorSelector message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.AnnotatorSelector.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {google.cloud.contactcenterinsights.v1.IAnnotatorSelector} message AnnotatorSelector message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnnotatorSelector.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnnotatorSelector message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotatorSelector.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.runInterruptionAnnotator = reader.bool(); + break; + } + case 2: { + message.runSilenceAnnotator = reader.bool(); + break; + } + case 3: { + message.runPhraseMatcherAnnotator = reader.bool(); + break; + } + case 4: { + if (!(message.phraseMatchers && message.phraseMatchers.length)) + message.phraseMatchers = []; + message.phraseMatchers.push(reader.string()); + break; + } + case 5: { + message.runSentimentAnnotator = reader.bool(); + break; + } + case 6: { + message.runEntityAnnotator = reader.bool(); + break; + } + case 7: { + message.runIntentAnnotator = reader.bool(); + break; + } + case 8: { + message.runIssueModelAnnotator = reader.bool(); + break; + } + case 10: { + if (!(message.issueModels && message.issueModels.length)) + message.issueModels = []; + message.issueModels.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnnotatorSelector message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnnotatorSelector.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnnotatorSelector message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnnotatorSelector.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) + if (typeof message.runInterruptionAnnotator !== "boolean") + return "runInterruptionAnnotator: boolean expected"; + if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) + if (typeof message.runSilenceAnnotator !== "boolean") + return "runSilenceAnnotator: boolean expected"; + if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) + if (typeof message.runPhraseMatcherAnnotator !== "boolean") + return "runPhraseMatcherAnnotator: boolean expected"; + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!Array.isArray(message.phraseMatchers)) + return "phraseMatchers: array expected"; + for (var i = 0; i < message.phraseMatchers.length; ++i) + if (!$util.isString(message.phraseMatchers[i])) + return "phraseMatchers: string[] expected"; + } + if (message.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) + if (typeof message.runSentimentAnnotator !== "boolean") + return "runSentimentAnnotator: boolean expected"; + if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) + if (typeof message.runEntityAnnotator !== "boolean") + return "runEntityAnnotator: boolean expected"; + if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) + if (typeof message.runIntentAnnotator !== "boolean") + return "runIntentAnnotator: boolean expected"; + if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) + if (typeof message.runIssueModelAnnotator !== "boolean") + return "runIssueModelAnnotator: boolean expected"; + if (message.issueModels != null && message.hasOwnProperty("issueModels")) { + if (!Array.isArray(message.issueModels)) + return "issueModels: array expected"; + for (var i = 0; i < message.issueModels.length; ++i) + if (!$util.isString(message.issueModels[i])) + return "issueModels: string[] expected"; + } + return null; + }; + + /** + * Creates an AnnotatorSelector message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.AnnotatorSelector} AnnotatorSelector + */ + AnnotatorSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.AnnotatorSelector(); + if (object.runInterruptionAnnotator != null) + message.runInterruptionAnnotator = Boolean(object.runInterruptionAnnotator); + if (object.runSilenceAnnotator != null) + message.runSilenceAnnotator = Boolean(object.runSilenceAnnotator); + if (object.runPhraseMatcherAnnotator != null) + message.runPhraseMatcherAnnotator = Boolean(object.runPhraseMatcherAnnotator); + if (object.phraseMatchers) { + if (!Array.isArray(object.phraseMatchers)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.phraseMatchers: array expected"); + message.phraseMatchers = []; + for (var i = 0; i < object.phraseMatchers.length; ++i) + message.phraseMatchers[i] = String(object.phraseMatchers[i]); + } + if (object.runSentimentAnnotator != null) + message.runSentimentAnnotator = Boolean(object.runSentimentAnnotator); + if (object.runEntityAnnotator != null) + message.runEntityAnnotator = Boolean(object.runEntityAnnotator); + if (object.runIntentAnnotator != null) + message.runIntentAnnotator = Boolean(object.runIntentAnnotator); + if (object.runIssueModelAnnotator != null) + message.runIssueModelAnnotator = Boolean(object.runIssueModelAnnotator); + if (object.issueModels) { + if (!Array.isArray(object.issueModels)) + throw TypeError(".google.cloud.contactcenterinsights.v1.AnnotatorSelector.issueModels: array expected"); + message.issueModels = []; + for (var i = 0; i < object.issueModels.length; ++i) + message.issueModels[i] = String(object.issueModels[i]); + } + return message; + }; + + /** + * Creates a plain object from an AnnotatorSelector message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} message AnnotatorSelector + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnnotatorSelector.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.phraseMatchers = []; + object.issueModels = []; + } + if (options.defaults) { + object.runInterruptionAnnotator = false; + object.runSilenceAnnotator = false; + object.runPhraseMatcherAnnotator = false; + object.runSentimentAnnotator = false; + object.runEntityAnnotator = false; + object.runIntentAnnotator = false; + object.runIssueModelAnnotator = false; + } + if (message.runInterruptionAnnotator != null && message.hasOwnProperty("runInterruptionAnnotator")) + object.runInterruptionAnnotator = message.runInterruptionAnnotator; + if (message.runSilenceAnnotator != null && message.hasOwnProperty("runSilenceAnnotator")) + object.runSilenceAnnotator = message.runSilenceAnnotator; + if (message.runPhraseMatcherAnnotator != null && message.hasOwnProperty("runPhraseMatcherAnnotator")) + object.runPhraseMatcherAnnotator = message.runPhraseMatcherAnnotator; + if (message.phraseMatchers && message.phraseMatchers.length) { + object.phraseMatchers = []; + for (var j = 0; j < message.phraseMatchers.length; ++j) + object.phraseMatchers[j] = message.phraseMatchers[j]; + } + if (message.runSentimentAnnotator != null && message.hasOwnProperty("runSentimentAnnotator")) + object.runSentimentAnnotator = message.runSentimentAnnotator; + if (message.runEntityAnnotator != null && message.hasOwnProperty("runEntityAnnotator")) + object.runEntityAnnotator = message.runEntityAnnotator; + if (message.runIntentAnnotator != null && message.hasOwnProperty("runIntentAnnotator")) + object.runIntentAnnotator = message.runIntentAnnotator; + if (message.runIssueModelAnnotator != null && message.hasOwnProperty("runIssueModelAnnotator")) + object.runIssueModelAnnotator = message.runIssueModelAnnotator; + if (message.issueModels && message.issueModels.length) { + object.issueModels = []; + for (var j = 0; j < message.issueModels.length; ++j) + object.issueModels[j] = message.issueModels[j]; + } + return object; + }; + + /** + * Converts this AnnotatorSelector to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @instance + * @returns {Object.} JSON object + */ + AnnotatorSelector.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnnotatorSelector + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.AnnotatorSelector + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnnotatorSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.AnnotatorSelector"; + }; + + return AnnotatorSelector; + })(); + return v1; })(); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json index c22c45509ff..8e9d8399c00 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.json +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -201,6 +201,62 @@ } ] }, + "BulkAnalyzeConversations": { + "requestType": "BulkAnalyzeConversationsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,filter,analysis_percentage", + "(google.longrunning.operation_info).response_type": "BulkAnalyzeConversationsResponse", + "(google.longrunning.operation_info).metadata_type": "BulkAnalyzeConversationsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/conversations:bulkAnalyze", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,filter,analysis_percentage" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "BulkAnalyzeConversationsResponse", + "metadata_type": "BulkAnalyzeConversationsMetadata" + } + } + ] + }, + "IngestConversations": { + "requestType": "IngestConversationsRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/conversations:ingest", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "IngestConversationsResponse", + "(google.longrunning.operation_info).metadata_type": "IngestConversationsMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/conversations:ingest", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "IngestConversationsResponse", + "metadata_type": "IngestConversationsMetadata" + } + } + ] + }, "ExportInsightsData": { "requestType": "ExportInsightsDataRequest", "responseType": "google.longrunning.Operation", @@ -451,6 +507,24 @@ } ] }, + "DeleteIssue": { + "requestType": "DeleteIssueRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1/{name=projects/*/locations/*/issueModels/*/issues/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, "CalculateIssueModelStats": { "requestType": "CalculateIssueModelStatsRequest", "responseType": "CalculateIssueModelStatsResponse", @@ -833,6 +907,13 @@ "(google.api.field_behavior)": "OUTPUT_ONLY", "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Conversation" } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -947,6 +1028,110 @@ } } }, + "IngestConversationsRequest": { + "oneofs": { + "source": { + "oneof": [ + "gcsSource" + ] + }, + "objectConfig": { + "oneof": [ + "transcriptObjectConfig" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 2 + }, + "transcriptObjectConfig": { + "type": "TranscriptObjectConfig", + "id": 3 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "conversationConfig": { + "type": "ConversationConfig", + "id": 4 + } + }, + "nested": { + "GcsSource": { + "fields": { + "bucketUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TranscriptObjectConfig": { + "fields": { + "medium": { + "type": "Conversation.Medium", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ConversationConfig": { + "fields": { + "agentId": { + "type": "string", + "id": 1 + } + } + } + } + }, + "IngestConversationsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "IngestConversationsRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "IngestConversationsResponse": { + "fields": {} + }, "CreateAnalysisRequest": { "fields": { "parent": { @@ -1027,6 +1212,76 @@ } } }, + "BulkAnalyzeConversationsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "filter": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "analysisPercentage": { + "type": "float", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 8 + } + } + }, + "BulkAnalyzeConversationsMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "BulkAnalyzeConversationsRequest", + "id": 3 + }, + "completedAnalysesCount": { + "type": "int32", + "id": 4 + }, + "failedAnalysesCount": { + "type": "int32", + "id": 5 + }, + "totalRequestedAnalysesCount": { + "type": "int32", + "id": 6 + } + } + }, + "BulkAnalyzeConversationsResponse": { + "fields": { + "successfulAnalysisCount": { + "type": "int32", + "id": 1 + }, + "failedAnalysisCount": { + "type": "int32", + "id": 2 + } + } + }, "ExportInsightsDataRequest": { "oneofs": { "destination": { @@ -1365,6 +1620,18 @@ } } }, + "DeleteIssueRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/Issue" + } + } + } + }, "CalculateIssueModelStatsRequest": { "fields": { "issueModel": { @@ -1870,6 +2137,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 8 } } }, @@ -2034,7 +2305,8 @@ "holdData", "entityMentionData", "intentMatchData", - "phraseMatchData" + "phraseMatchData", + "issueMatchData" ] } }, @@ -2067,6 +2339,10 @@ "type": "PhraseMatchData", "id": 17 }, + "issueMatchData": { + "type": "IssueMatchData", + "id": 18 + }, "channelTag": { "type": "int32", "id": 1 @@ -2230,6 +2506,14 @@ } } }, + "IssueMatchData": { + "fields": { + "issueAssignment": { + "type": "IssueAssignment", + "id": 1 + } + } + }, "IssueModel": { "options": { "(google.api.resource).type": "contactcenterinsights.googleapis.com/IssueModel", @@ -2345,6 +2629,14 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "sampleUtterances": { + "rule": "repeated", + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } } }, @@ -2578,6 +2870,10 @@ "runtimeIntegrationAnalysisPercentage": { "type": "double", "id": 1 + }, + "annotatorSelector": { + "type": "AnnotatorSelector", + "id": 5 } } } @@ -2861,6 +3157,54 @@ "id": 5 } } + }, + "AnnotatorSelector": { + "fields": { + "runInterruptionAnnotator": { + "type": "bool", + "id": 1 + }, + "runSilenceAnnotator": { + "type": "bool", + "id": 2 + }, + "runPhraseMatcherAnnotator": { + "type": "bool", + "id": 3 + }, + "phraseMatchers": { + "rule": "repeated", + "type": "string", + "id": 4, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/PhraseMatcher" + } + }, + "runSentimentAnnotator": { + "type": "bool", + "id": 5 + }, + "runEntityAnnotator": { + "type": "bool", + "id": 6 + }, + "runIntentAnnotator": { + "type": "bool", + "id": 7 + }, + "runIssueModelAnnotator": { + "type": "bool", + "id": 8 + }, + "issueModels": { + "rule": "repeated", + "type": "string", + "id": 10, + "options": { + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + } } } } diff --git a/packages/google-cloud-contactcenterinsights/samples/README.md b/packages/google-cloud-contactcenterinsights/samples/README.md index 09c3f771d54..087aceb29cf 100644 --- a/packages/google-cloud-contactcenterinsights/samples/README.md +++ b/packages/google-cloud-contactcenterinsights/samples/README.md @@ -12,6 +12,7 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Contact_center_insights.bulk_analyze_conversations](#contact_center_insights.bulk_analyze_conversations) * [Contact_center_insights.calculate_issue_model_stats](#contact_center_insights.calculate_issue_model_stats) * [Contact_center_insights.calculate_stats](#contact_center_insights.calculate_stats) * [Contact_center_insights.create_analysis](#contact_center_insights.create_analysis) @@ -21,6 +22,7 @@ * [Contact_center_insights.create_view](#contact_center_insights.create_view) * [Contact_center_insights.delete_analysis](#contact_center_insights.delete_analysis) * [Contact_center_insights.delete_conversation](#contact_center_insights.delete_conversation) + * [Contact_center_insights.delete_issue](#contact_center_insights.delete_issue) * [Contact_center_insights.delete_issue_model](#contact_center_insights.delete_issue_model) * [Contact_center_insights.delete_phrase_matcher](#contact_center_insights.delete_phrase_matcher) * [Contact_center_insights.delete_view](#contact_center_insights.delete_view) @@ -33,6 +35,7 @@ * [Contact_center_insights.get_phrase_matcher](#contact_center_insights.get_phrase_matcher) * [Contact_center_insights.get_settings](#contact_center_insights.get_settings) * [Contact_center_insights.get_view](#contact_center_insights.get_view) + * [Contact_center_insights.ingest_conversations](#contact_center_insights.ingest_conversations) * [Contact_center_insights.list_analyses](#contact_center_insights.list_analyses) * [Contact_center_insights.list_conversations](#contact_center_insights.list_conversations) * [Contact_center_insights.list_issue_models](#contact_center_insights.list_issue_models) @@ -64,6 +67,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Contact_center_insights.bulk_analyze_conversations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js` + + +----- + + + + ### Contact_center_insights.calculate_issue_model_stats View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.calculate_issue_model_stats.js). @@ -217,6 +237,23 @@ __Usage:__ +### Contact_center_insights.delete_issue + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js` + + +----- + + + + ### Contact_center_insights.delete_issue_model View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue_model.js). @@ -421,6 +458,23 @@ __Usage:__ +### Contact_center_insights.ingest_conversations + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js` + + +----- + + + + ### Contact_center_insights.list_analyses View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js). diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js new file mode 100644 index 00000000000..2a55a01eac3 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js @@ -0,0 +1,78 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, filter, analysisPercentage) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async] + /** + * 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(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js new file mode 100644 index 00000000000..b15837c83cf --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_issue.js @@ -0,0 +1,61 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async] + /** + * 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 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 callDeleteIssue() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.deleteIssue(request); + console.log(response); + } + + callDeleteIssue(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js new file mode 100644 index 00000000000..4b2a93c9f2c --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js @@ -0,0 +1,74 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async] + /** + * 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. + */ + // 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 = {} + + // 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(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index f6704aa2812..ad687ee8e67 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -423,6 +423,110 @@ } } }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async", + "title": "ContactCenterInsights bulkAnalyzeConversations Sample", + "origin": "API_DEFINITION", + "description": " Analyzes multiple conversations in a single request.", + "canonical": true, + "file": "contact_center_insights.bulk_analyze_conversations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 70, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "BulkAnalyzeConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkAnalyzeConversations", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + }, + { + "name": "analysis_percentage", + "type": "TYPE_FLOAT" + }, + { + "name": "annotator_selector", + "type": ".google.cloud.contactcenterinsights.v1.AnnotatorSelector" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "BulkAnalyzeConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.BulkAnalyzeConversations", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async", + "title": "ContactCenterInsights ingestConversations Sample", + "origin": "API_DEFINITION", + "description": " Imports conversations and processes them according to the user's configuration.", + "canonical": true, + "file": "contact_center_insights.ingest_conversations.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 66, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "IngestConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.IngestConversations", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource" + }, + { + "name": "transcript_object_config", + "type": ".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "conversation_config", + "type": ".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "IngestConversations", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.IngestConversations", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ExportInsightsData_async", "title": "ContactCenterInsights exportInsightsData Sample", @@ -891,6 +995,46 @@ } } }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async", + "title": "ContactCenterInsights deleteIssue Sample", + "origin": "API_DEFINITION", + "description": " Deletes an issue.", + "canonical": true, + "file": "contact_center_insights.delete_issue.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssue", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "DeleteIssue", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.DeleteIssue", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CalculateIssueModelStats_async", "title": "ContactCenterInsights calculateIssueModelStats Sample", diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts index 5c7d5c96dcb..0599b0442f1 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts @@ -124,6 +124,9 @@ export class ContactCenterInsightsClient { (typeof window !== 'undefined' && typeof window?.fetch === 'function'); opts = Object.assign({servicePath, port, clientConfig, fallback}, opts); + // Request numeric enum values if REST transport is used. + opts.numericEnums = true; + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. if (servicePath !== staticMembers.servicePath && !('scopes' in opts)) { opts['scopes'] = staticMembers.scopes; @@ -265,6 +268,18 @@ export class ContactCenterInsightsClient { const createAnalysisMetadata = protoFilesRoot.lookup( '.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata' ) as gax.protobuf.Type; + const bulkAnalyzeConversationsResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse' + ) as gax.protobuf.Type; + const bulkAnalyzeConversationsMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata' + ) as gax.protobuf.Type; + const ingestConversationsResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.IngestConversationsResponse' + ) as gax.protobuf.Type; + const ingestConversationsMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata' + ) as gax.protobuf.Type; const exportInsightsDataResponse = protoFilesRoot.lookup( '.google.cloud.contactcenterinsights.v1.ExportInsightsDataResponse' ) as gax.protobuf.Type; @@ -302,6 +317,20 @@ export class ContactCenterInsightsClient { createAnalysisResponse.decode.bind(createAnalysisResponse), createAnalysisMetadata.decode.bind(createAnalysisMetadata) ), + bulkAnalyzeConversations: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + bulkAnalyzeConversationsResponse.decode.bind( + bulkAnalyzeConversationsResponse + ), + bulkAnalyzeConversationsMetadata.decode.bind( + bulkAnalyzeConversationsMetadata + ) + ), + ingestConversations: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + ingestConversationsResponse.decode.bind(ingestConversationsResponse), + ingestConversationsMetadata.decode.bind(ingestConversationsMetadata) + ), exportInsightsData: new this._gaxModule.LongrunningDescriptor( this.operationsClient, exportInsightsDataResponse.decode.bind(exportInsightsDataResponse), @@ -389,6 +418,8 @@ export class ContactCenterInsightsClient { 'getAnalysis', 'listAnalyses', 'deleteAnalysis', + 'bulkAnalyzeConversations', + 'ingestConversations', 'exportInsightsData', 'createIssueModel', 'updateIssueModel', @@ -400,6 +431,7 @@ export class ContactCenterInsightsClient { 'getIssue', 'listIssues', 'updateIssue', + 'deleteIssue', 'calculateIssueModelStats', 'createPhraseMatcher', 'getPhraseMatcher', @@ -1679,6 +1711,103 @@ export class ContactCenterInsightsClient { this.initialize(); return this.innerApiCalls.updateIssue(request, options, callback); } + /** + * Deletes an issue. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the issue to delete. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.delete_issue.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async + */ + deleteIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | undefined + ), + {} | undefined + ] + >; + deleteIssue( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteIssue( + request: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteIssue( + request?: protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.contactcenterinsights.v1.IDeleteIssueRequest + | undefined + ), + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteIssue(request, options, callback); + } /** * Gets an issue model's statistics. * @@ -3002,6 +3131,301 @@ export class ContactCenterInsightsClient { protos.google.cloud.contactcenterinsights.v1.CreateAnalysisOperationMetadata >; } + /** + * Analyzes multiple conversations in a single request. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource to create analyses in. + * @param {string} request.filter + * Required. Filter used to select the subset of conversations to analyze. + * @param {number} request.analysisPercentage + * Required. Percentage of selected conversation to analyze, between + * [0, 100]. + * @param {google.cloud.contactcenterinsights.v1.AnnotatorSelector} request.annotatorSelector + * To select the annotators to run and the phrase matchers to use + * (if any). If not specified, all annotators will be run. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async + */ + bulkAnalyzeConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + bulkAnalyzeConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkAnalyzeConversations( + request: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + bulkAnalyzeConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.bulkAnalyzeConversations( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `bulkAnalyzeConversations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.bulk_analyze_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async + */ + async checkBulkAnalyzeConversationsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.bulkAnalyzeConversations, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsMetadata + >; + } + /** + * Imports conversations and processes them according to the user's + * configuration. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource} request.gcsSource + * A cloud storage bucket source. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.TranscriptObjectConfig} request.transcriptObjectConfig + * Configuration for when `source` contains conversation transcripts. + * @param {string} request.parent + * Required. The parent resource for new conversations. + * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.ConversationConfig} request.conversationConfig + * Configuration that applies to all conversations. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.ingest_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async + */ + ingestConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + >; + ingestConversations( + request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + ingestConversations( + request: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + ingestConversations( + request?: protos.google.cloud.contactcenterinsights.v1.IIngestConversationsRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.ingestConversations(request, options, callback); + } + /** + * Check the status of the long running operation returned by `ingestConversations()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the + * [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations) + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.ingest_conversations.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async + */ + async checkIngestConversationsProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + > + > { + const request = + new this._gaxModule.operationsProtos.google.longrunning.GetOperationRequest( + {name} + ); + const [operation] = await this.operationsClient.getOperation(request); + const decodeOperation = new this._gaxModule.Operation( + operation, + this.descriptors.longrunning.ingestConversations, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.IngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IngestConversationsMetadata + >; + } /** * Export insights data to a destination defined in the request body. * diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json index 185d8b39a84..081f19a1212 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json @@ -77,6 +77,16 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "BulkAnalyzeConversations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "IngestConversations": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "ExportInsightsData": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -132,6 +142,11 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "DeleteIssue": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "CalculateIssueModelStats": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json index 660ed0a1e33..de8d31be6c2 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json @@ -70,6 +70,11 @@ "updateIssue" ] }, + "DeleteIssue": { + "methods": [ + "deleteIssue" + ] + }, "CalculateIssueModelStats": { "methods": [ "calculateIssueModelStats" @@ -135,6 +140,16 @@ "createAnalysis" ] }, + "BulkAnalyzeConversations": { + "methods": [ + "bulkAnalyzeConversations" + ] + }, + "IngestConversations": { + "methods": [ + "ingestConversations" + ] + }, "ExportInsightsData": { "methods": [ "exportInsightsData" @@ -253,6 +268,11 @@ "updateIssue" ] }, + "DeleteIssue": { + "methods": [ + "deleteIssue" + ] + }, "CalculateIssueModelStats": { "methods": [ "calculateIssueModelStats" @@ -318,6 +338,16 @@ "createAnalysis" ] }, + "BulkAnalyzeConversations": { + "methods": [ + "bulkAnalyzeConversations" + ] + }, + "IngestConversations": { + "methods": [ + "ingestConversations" + ] + }, "ExportInsightsData": { "methods": [ "exportInsightsData" diff --git a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts index 3fe31da3776..8c050e65f7a 100644 --- a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts +++ b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts @@ -1887,6 +1887,140 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('deleteIssue', () => { + it('invokes deleteIssue without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteIssue = stubSimpleCall(expectedResponse); + const [response] = await client.deleteIssue(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssue without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteIssue = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteIssue( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssue with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteIssue = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.deleteIssue(request), expectedError); + const actualRequest = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteIssue as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteIssue with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.DeleteIssueRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.DeleteIssueRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.deleteIssue(request), expectedError); + }); + }); + describe('calculateIssueModelStats', () => { it('invokes calculateIssueModelStats without error', async () => { const client = @@ -3714,6 +3848,410 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('bulkAnalyzeConversations', () => { + it('invokes bulkAnalyzeConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkAnalyzeConversations = + stubLongRunningCall(expectedResponse); + const [operation] = await client.bulkAnalyzeConversations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.bulkAnalyzeConversations = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.bulkAnalyzeConversations( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IBulkAnalyzeConversationsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.bulkAnalyzeConversations(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes bulkAnalyzeConversations with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.BulkAnalyzeConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.bulkAnalyzeConversations = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.bulkAnalyzeConversations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.bulkAnalyzeConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkBulkAnalyzeConversationsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkBulkAnalyzeConversationsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkBulkAnalyzeConversationsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkBulkAnalyzeConversationsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('ingestConversations', () => { + it('invokes ingestConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.ingestConversations = + stubLongRunningCall(expectedResponse); + const [operation] = await client.ingestConversations(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.ingestConversations = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.ingestConversations( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsResponse, + protos.google.cloud.contactcenterinsights.v1.IIngestConversationsMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.ingestConversations = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.ingestConversations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes ingestConversations with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.IngestConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.IngestConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.ingestConversations = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.ingestConversations(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.ingestConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkIngestConversationsProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkIngestConversationsProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkIngestConversationsProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkIngestConversationsProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('exportInsightsData', () => { it('invokes exportInsightsData without error', async () => { const client =