Skip to content

Commit cc4c0a3

Browse files
feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Issue 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>
1 parent 47947b9 commit cc4c0a3

7 files changed

+837
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BulkAnalyzeConversations
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
async def sample_bulk_analyze_conversations():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = contact_center_insights_v1.BulkAnalyzeConversationsRequest(
43+
parent="parent_value",
44+
filter="filter_value",
45+
analysis_percentage=0.20170000000000002,
46+
)
47+
48+
# Make the request
49+
operation = client.bulk_analyze_conversations(request=request)
50+
51+
print("Waiting for operation to complete...")
52+
53+
response = (await operation).result()
54+
55+
# Handle the response
56+
print(response)
57+
58+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for BulkAnalyzeConversations
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
def sample_bulk_analyze_conversations():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsClient()
40+
41+
# Initialize request argument(s)
42+
request = contact_center_insights_v1.BulkAnalyzeConversationsRequest(
43+
parent="parent_value",
44+
filter="filter_value",
45+
analysis_percentage=0.20170000000000002,
46+
)
47+
48+
# Make the request
49+
operation = client.bulk_analyze_conversations(request=request)
50+
51+
print("Waiting for operation to complete...")
52+
53+
response = operation.result()
54+
55+
# Handle the response
56+
print(response)
57+
58+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_BulkAnalyzeConversations_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteIssue
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
async def sample_delete_issue():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient()
40+
41+
# Initialize request argument(s)
42+
request = contact_center_insights_v1.DeleteIssueRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
await client.delete_issue(request=request)
48+
49+
50+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for DeleteIssue
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
def sample_delete_issue():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsClient()
40+
41+
# Initialize request argument(s)
42+
request = contact_center_insights_v1.DeleteIssueRequest(
43+
name="name_value",
44+
)
45+
46+
# Make the request
47+
client.delete_issue(request=request)
48+
49+
50+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_DeleteIssue_sync]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for IngestConversations
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
async def sample_ingest_conversations():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsAsyncClient()
40+
41+
# Initialize request argument(s)
42+
gcs_source = contact_center_insights_v1.GcsSource()
43+
gcs_source.bucket_uri = "bucket_uri_value"
44+
45+
transcript_object_config = contact_center_insights_v1.TranscriptObjectConfig()
46+
transcript_object_config.medium = "CHAT"
47+
48+
request = contact_center_insights_v1.IngestConversationsRequest(
49+
gcs_source=gcs_source,
50+
transcript_object_config=transcript_object_config,
51+
parent="parent_value",
52+
)
53+
54+
# Make the request
55+
operation = client.ingest_conversations(request=request)
56+
57+
print("Waiting for operation to complete...")
58+
59+
response = (await operation).result()
60+
61+
# Handle the response
62+
print(response)
63+
64+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_async]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
# Generated code. DO NOT EDIT!
17+
#
18+
# Snippet for IngestConversations
19+
# NOTE: This snippet has been automatically generated for illustrative purposes only.
20+
# It may require modifications to work in your environment.
21+
22+
# To install the latest published package dependency, execute the following:
23+
# python3 -m pip install google-cloud-contact-center-insights
24+
25+
26+
# [START contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync]
27+
# This snippet has been automatically generated and should be regarded as a
28+
# code template only.
29+
# It will require modifications to work:
30+
# - It may require correct/in-range values for request initialization.
31+
# - It may require specifying regional endpoints when creating the service
32+
# client as shown in:
33+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
34+
from google.cloud import contact_center_insights_v1
35+
36+
37+
def sample_ingest_conversations():
38+
# Create a client
39+
client = contact_center_insights_v1.ContactCenterInsightsClient()
40+
41+
# Initialize request argument(s)
42+
gcs_source = contact_center_insights_v1.GcsSource()
43+
gcs_source.bucket_uri = "bucket_uri_value"
44+
45+
transcript_object_config = contact_center_insights_v1.TranscriptObjectConfig()
46+
transcript_object_config.medium = "CHAT"
47+
48+
request = contact_center_insights_v1.IngestConversationsRequest(
49+
gcs_source=gcs_source,
50+
transcript_object_config=transcript_object_config,
51+
parent="parent_value",
52+
)
53+
54+
# Make the request
55+
operation = client.ingest_conversations(request=request)
56+
57+
print("Waiting for operation to complete...")
58+
59+
response = operation.result()
60+
61+
# Handle the response
62+
print(response)
63+
64+
# [END contactcenterinsights_v1_generated_ContactCenterInsights_IngestConversations_sync]

0 commit comments

Comments
 (0)