Skip to content

Commit

Permalink
feat: add Configurable Analysis, Bulk Upload, Bulk Analyze, Delete Is…
Browse files Browse the repository at this point in the history
…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
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Dec 14, 2022
1 parent 47947b9 commit cc4c0a3
Show file tree
Hide file tree
Showing 7 changed files with 837 additions and 0 deletions.
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]
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]
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]
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]
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]
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]
Loading

0 comments on commit cc4c0a3

Please sign in to comment.