From 76dae8b03c0e3bf33123b8001e3f8d40701b5c19 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Sun, 5 Dec 2021 10:52:30 +0000 Subject: [PATCH] feat(v3): added `TelephonyTransferCall` in response message (#216) - [ ] Regenerate this pull request now. PiperOrigin-RevId: 414026488 Source-Link: https://github.com/googleapis/googleapis/commit/26ab5dd2398319e815f6d293a792d79ade3064f5 Source-Link: https://github.com/googleapis/googleapis-gen/commit/d4c1a646b4056e598eba01213af350bd8f6a6952 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDRjMWE2NDZiNDA1NmU1OThlYmEwMTIxM2FmMzUwYmQ4ZjZhNjk1MiJ9 docs: reformat comments --- .../services/versions/async_client.py | 16 ++++++------ .../services/versions/client.py | 16 ++++++------ .../services/webhooks/async_client.py | 2 +- .../services/webhooks/client.py | 2 +- .../dialogflowcx_v3/types/response_message.py | 26 +++++++++++++++++++ google/cloud/dialogflowcx_v3/types/version.py | 25 +++++++++--------- google/cloud/dialogflowcx_v3/types/webhook.py | 17 ++++++------ 7 files changed, 66 insertions(+), 38 deletions(-) diff --git a/google/cloud/dialogflowcx_v3/services/versions/async_client.py b/google/cloud/dialogflowcx_v3/services/versions/async_client.py index 9e8a0242..2a683fc1 100644 --- a/google/cloud/dialogflowcx_v3/services/versions/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/versions/async_client.py @@ -187,7 +187,7 @@ async def list_versions( parent (:class:`str`): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -201,7 +201,7 @@ async def list_versions( Returns: google.cloud.dialogflowcx_v3.services.versions.pagers.ListVersionsAsyncPager: The response message for - [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions]. + [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions]. Iterating over this object will yield results and resolve additional pages automatically. @@ -270,7 +270,7 @@ async def get_version( Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -354,7 +354,7 @@ async def create_version( to create an [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -527,7 +527,7 @@ async def delete_version( Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -603,7 +603,7 @@ async def load_version( Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -700,7 +700,7 @@ async def compare_versions( draft version of the specified flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents/ /flows//versions/``. This corresponds to the ``base_version`` field on the ``request`` instance; if ``request`` is provided, this @@ -714,7 +714,7 @@ async def compare_versions( Returns: google.cloud.dialogflowcx_v3.types.CompareVersionsResponse: The response message for - [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions]. + [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions]. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/dialogflowcx_v3/services/versions/client.py b/google/cloud/dialogflowcx_v3/services/versions/client.py index 46107891..e5b522bb 100644 --- a/google/cloud/dialogflowcx_v3/services/versions/client.py +++ b/google/cloud/dialogflowcx_v3/services/versions/client.py @@ -387,7 +387,7 @@ def list_versions( parent (str): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -401,7 +401,7 @@ def list_versions( Returns: google.cloud.dialogflowcx_v3.services.versions.pagers.ListVersionsPager: The response message for - [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions]. + [Versions.ListVersions][google.cloud.dialogflow.cx.v3.Versions.ListVersions]. Iterating over this object will yield results and resolve additional pages automatically. @@ -470,7 +470,7 @@ def get_version( Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -554,7 +554,7 @@ def create_version( to create an [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. This corresponds to the ``parent`` field on the ``request`` instance; if ``request`` is provided, this @@ -727,7 +727,7 @@ def delete_version( Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -803,7 +803,7 @@ def load_version( Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. This corresponds to the ``name`` field on the ``request`` instance; if ``request`` is provided, this @@ -900,7 +900,7 @@ def compare_versions( draft version of the specified flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents/ /flows//versions/``. This corresponds to the ``base_version`` field on the ``request`` instance; if ``request`` is provided, this @@ -914,7 +914,7 @@ def compare_versions( Returns: google.cloud.dialogflowcx_v3.types.CompareVersionsResponse: The response message for - [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions]. + [Versions.CompareVersions][google.cloud.dialogflow.cx.v3.Versions.CompareVersions]. """ # Create or coerce a protobuf request object. diff --git a/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py b/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py index 39992575..3e40edeb 100644 --- a/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py +++ b/google/cloud/dialogflowcx_v3/services/webhooks/async_client.py @@ -197,7 +197,7 @@ async def list_webhooks( Returns: google.cloud.dialogflowcx_v3.services.webhooks.pagers.ListWebhooksAsyncPager: The response message for - [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. + [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/dialogflowcx_v3/services/webhooks/client.py b/google/cloud/dialogflowcx_v3/services/webhooks/client.py index a4a5178a..bf69ccd9 100644 --- a/google/cloud/dialogflowcx_v3/services/webhooks/client.py +++ b/google/cloud/dialogflowcx_v3/services/webhooks/client.py @@ -409,7 +409,7 @@ def list_webhooks( Returns: google.cloud.dialogflowcx_v3.services.webhooks.pagers.ListWebhooksPager: The response message for - [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. + [Webhooks.ListWebhooks][google.cloud.dialogflow.cx.v3.Webhooks.ListWebhooks]. Iterating over this object will yield results and resolve additional pages automatically. diff --git a/google/cloud/dialogflowcx_v3/types/response_message.py b/google/cloud/dialogflowcx_v3/types/response_message.py index 8b0d61e7..6dde9256 100644 --- a/google/cloud/dialogflowcx_v3/types/response_message.py +++ b/google/cloud/dialogflowcx_v3/types/response_message.py @@ -104,6 +104,12 @@ class ResponseMessage(proto.Message): This message is generated by Dialogflow only and not supposed to be defined by the user. + This field is a member of `oneof`_ ``message``. + telephony_transfer_call (google.cloud.dialogflowcx_v3.types.ResponseMessage.TelephonyTransferCall): + A signal that the client should transfer the + phone call connected to this agent to a third- + party endpoint. + This field is a member of `oneof`_ ``message``. """ @@ -288,6 +294,23 @@ class Segment(proto.Message): proto.MESSAGE, number=1, message="ResponseMessage.MixedAudio.Segment", ) + class TelephonyTransferCall(proto.Message): + r"""Represents the signal that telles the client to transfer the + phone call connected to the agent to a third-party endpoint. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + phone_number (str): + Transfer the call to a phone number in `E.164 + format `__. + + This field is a member of `oneof`_ ``endpoint``. + """ + + phone_number = proto.Field(proto.STRING, number=1, oneof="endpoint",) + text = proto.Field(proto.MESSAGE, number=1, oneof="message", message=Text,) payload = proto.Field( proto.MESSAGE, number=2, oneof="message", message=struct_pb2.Struct, @@ -310,6 +333,9 @@ class Segment(proto.Message): mixed_audio = proto.Field( proto.MESSAGE, number=13, oneof="message", message=MixedAudio, ) + telephony_transfer_call = proto.Field( + proto.MESSAGE, number=18, oneof="message", message=TelephonyTransferCall, + ) __all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/google/cloud/dialogflowcx_v3/types/version.py b/google/cloud/dialogflowcx_v3/types/version.py index a216ba35..577fd012 100644 --- a/google/cloud/dialogflowcx_v3/types/version.py +++ b/google/cloud/dialogflowcx_v3/types/version.py @@ -45,7 +45,7 @@ class CreateVersionOperationMetadata(proto.Message): Attributes: version (str): Name of the created version. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. """ version = proto.Field(proto.STRING, number=1,) @@ -56,10 +56,11 @@ class Version(proto.Message): Attributes: name (str): - Format: - ``projects//locations//agents//flows//versions/``. - Version ID is a self-increasing number generated by - Dialogflow upon version creation. + Format: projects//locations//agents//flows//versions/. + Version ID is a self-increasing number generated + by Dialogflow upon version creation. display_name (str): Required. The human-readable name of the version. Limit of 64 characters. @@ -101,7 +102,7 @@ class ListVersionsRequest(proto.Message): parent (str): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to list all versions for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. page_size (int): The maximum number of items to return in a single page. By default 20 and at most 100. @@ -147,7 +148,7 @@ class GetVersionRequest(proto.Message): name (str): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version]. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. """ name = proto.Field(proto.STRING, number=1,) @@ -162,7 +163,7 @@ class CreateVersionRequest(proto.Message): Required. The [Flow][google.cloud.dialogflow.cx.v3.Flow] to create an [Version][google.cloud.dialogflow.cx.v3.Version] for. Format: - ``projects//locations//agents//flows/``. + ``projects//locations//agents//flows/``. version (google.cloud.dialogflowcx_v3.types.Version): Required. The version to create. """ @@ -199,7 +200,7 @@ class DeleteVersionRequest(proto.Message): Required. The name of the [Version][google.cloud.dialogflow.cx.v3.Version] to delete. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. """ name = proto.Field(proto.STRING, number=1,) @@ -214,7 +215,7 @@ class LoadVersionRequest(proto.Message): Required. The [Version][google.cloud.dialogflow.cx.v3.Version] to be loaded to draft flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. allow_override_agent_resources (bool): This field is used to prevent accidental overwrite of other agent resources, which can potentially impact other flow's @@ -238,12 +239,12 @@ class CompareVersionsRequest(proto.Message): version of the specified flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents/ /flows//versions/``. target_version (str): Required. Name of the target flow version to compare with the base version. Use version ID ``0`` to indicate the draft version of the specified flow. Format: - ``projects//locations//agents//flows//versions/``. + ``projects//locations//agents//flows//versions/``. language_code (str): The language to compare the flow versions for. diff --git a/google/cloud/dialogflowcx_v3/types/webhook.py b/google/cloud/dialogflowcx_v3/types/webhook.py index 24fcf43c..62dc4c69 100644 --- a/google/cloud/dialogflowcx_v3/types/webhook.py +++ b/google/cloud/dialogflowcx_v3/types/webhook.py @@ -104,15 +104,16 @@ class GenericWebService(proto.Message): verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google's default trust store - to verify certificates. N.B. Make sure the HTTPS - server certificates are signed with "subject alt - name". For instance a certificate can be self- - signed using the following command, - openssl x509 -req -days 200 -in - example.com.csr \ -signkey example.com.key + to verify certificates. + N.B. Make sure the HTTPS server certificates are + signed with "subject alt name". For instance a + certificate can be self-signed using the + following command, + openssl x509 -req -days 200 -in + example.com.csr \ -signkey example.com.key \ - -out example.com.crt \ - -extfile <(printf + -out example.com.crt \ + -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") """