-
Notifications
You must be signed in to change notification settings - Fork 6.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Is…
…sue Apis (#270) * feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Issue Apis PiperOrigin-RevId: 495057883 Source-Link: googleapis/googleapis@59a66eb Source-Link: https://github.com/googleapis/googleapis-gen/commit/9e7f289c6c6e4fd5f63b6dcfee0d272ab1dca1de Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOWU3ZjI4OWM2YzZlNGZkNWY2M2I2ZGNmZWUwZDI3MmFiMWRjYTFkZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
- Loading branch information
1 parent
47947b9
commit cc4c0a3
Showing
7 changed files
with
837 additions
and
0 deletions.
There are no files selected for viewing
58 changes: 58 additions & 0 deletions
58
...ctcenterinsights_v1_generated_contact_center_insights_bulk_analyze_conversations_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for BulkAnalyzeConversations | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
async def sample_bulk_analyze_conversations(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = contact_center_insights_v1.BulkAnalyzeConversationsRequest( | ||
parent="parent_value", | ||
filter="filter_value", | ||
analysis_percentage=0.20170000000000002, | ||
) | ||
|
||
# Make the request | ||
operation = client.bulk_analyze_conversations(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = (await operation).result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async] |
58 changes: 58 additions & 0 deletions
58
...actcenterinsights_v1_generated_contact_center_insights_bulk_analyze_conversations_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for BulkAnalyzeConversations | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] | ||
# 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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
def sample_bulk_analyze_conversations(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsClient() | ||
|
||
# Initialize request argument(s) | ||
request = contact_center_insights_v1.BulkAnalyzeConversationsRequest( | ||
parent="parent_value", | ||
filter="filter_value", | ||
analysis_percentage=0.20170000000000002, | ||
) | ||
|
||
# Make the request | ||
operation = client.bulk_analyze_conversations(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = operation.result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync] |
50 changes: 50 additions & 0 deletions
50
..._samples/contactcenterinsights_v1_generated_contact_center_insights_delete_issue_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteIssue | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
async def sample_delete_issue(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
request = contact_center_insights_v1.DeleteIssueRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
await client.delete_issue(request=request) | ||
|
||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async] |
50 changes: 50 additions & 0 deletions
50
...d_samples/contactcenterinsights_v1_generated_contact_center_insights_delete_issue_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for DeleteIssue | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] | ||
# 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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
def sample_delete_issue(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsClient() | ||
|
||
# Initialize request argument(s) | ||
request = contact_center_insights_v1.DeleteIssueRequest( | ||
name="name_value", | ||
) | ||
|
||
# Make the request | ||
client.delete_issue(request=request) | ||
|
||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync] |
64 changes: 64 additions & 0 deletions
64
.../contactcenterinsights_v1_generated_contact_center_insights_ingest_conversations_async.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for IngestConversations | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
async def sample_ingest_conversations(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient() | ||
|
||
# Initialize request argument(s) | ||
gcs_source = contact_center_insights_v1.GcsSource() | ||
gcs_source.bucket_uri = "bucket_uri_value" | ||
|
||
transcript_object_config = contact_center_insights_v1.TranscriptObjectConfig() | ||
transcript_object_config.medium = "CHAT" | ||
|
||
request = contact_center_insights_v1.IngestConversationsRequest( | ||
gcs_source=gcs_source, | ||
transcript_object_config=transcript_object_config, | ||
parent="parent_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.ingest_conversations(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = (await operation).result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async] |
64 changes: 64 additions & 0 deletions
64
...s/contactcenterinsights_v1_generated_contact_center_insights_ingest_conversations_sync.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# -*- coding: utf-8 -*- | ||
# 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 | ||
# | ||
# http://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. | ||
# | ||
# Generated code. DO NOT EDIT! | ||
# | ||
# Snippet for IngestConversations | ||
# NOTE: This snippet has been automatically generated for illustrative purposes only. | ||
# It may require modifications to work in your environment. | ||
|
||
# To install the latest published package dependency, execute the following: | ||
# python3 -m pip install google-cloud-contact-center-insights | ||
|
||
|
||
# [START contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] | ||
# 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. | ||
# - It may require specifying regional endpoints when creating the service | ||
# client as shown in: | ||
# https://googleapis.dev/python/google-api-core/latest/client_options.html | ||
from google.cloud import contact_center_insights_v1 | ||
|
||
|
||
def sample_ingest_conversations(): | ||
# Create a client | ||
client = contact_center_insights_v1.ContactCenterInsightsClient() | ||
|
||
# Initialize request argument(s) | ||
gcs_source = contact_center_insights_v1.GcsSource() | ||
gcs_source.bucket_uri = "bucket_uri_value" | ||
|
||
transcript_object_config = contact_center_insights_v1.TranscriptObjectConfig() | ||
transcript_object_config.medium = "CHAT" | ||
|
||
request = contact_center_insights_v1.IngestConversationsRequest( | ||
gcs_source=gcs_source, | ||
transcript_object_config=transcript_object_config, | ||
parent="parent_value", | ||
) | ||
|
||
# Make the request | ||
operation = client.ingest_conversations(request=request) | ||
|
||
print("Waiting for operation to complete...") | ||
|
||
response = operation.result() | ||
|
||
# Handle the response | ||
print(response) | ||
|
||
# [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync] |
Oops, something went wrong.