From b72125a4e977b5c920c07ab729f63c0f2b4d1895 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 5 May 2022 20:03:10 -0400 Subject: [PATCH] docs: add the fields for setting CX virtual agent session parameters (#519) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: add the fields for setting CX virtual agent session parameters PiperOrigin-RevId: 446825520 Source-Link: https://github.com/googleapis/googleapis/commit/f6bb25583b9b7320c9642a28fde9101b492da930 Source-Link: https://github.com/googleapis/googleapis-gen/commit/cd1450b403b5a3f92676d8a34f0cfc07fc767b40 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiY2QxNDUwYjQwM2I1YTNmOTI2NzZkOGEzNGYwY2ZjMDdmYzc2N2I0MCJ9 * 🦉 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 --- .../google/cloud/dialogflow_v2/types/fulfillment.py | 8 ++++---- .../google/cloud/dialogflow_v2/types/participant.py | 13 +++++++++++++ .../scripts/fixup_dialogflow_v2_keywords.py | 2 +- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/fulfillment.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/fulfillment.py index 2956b7d032fb..6fc7ee2ec318 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/fulfillment.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/fulfillment.py @@ -70,10 +70,10 @@ class Fulfillment(proto.Message): class GenericWebService(proto.Message): r"""Represents configuration for a generic web service. - Dialogflow supports two mechanisms for authentications: - Basic - authentication with username and password. - - Authentication with additional authentication headers. More - information could be found at: + Dialogflow supports two mechanisms for authentications: + - Basic authentication with username and password. + - Authentication with additional authentication headers. + More information could be found at: https://cloud.google.com/dialogflow/docs/fulfillment-configure. Attributes: diff --git a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/participant.py b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/participant.py index ccd6a909f314..4b4ec91fbb49 100644 --- a/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/participant.py +++ b/packages/google-cloud-dialogflow/google/cloud/dialogflow_v2/types/participant.py @@ -358,6 +358,14 @@ class AnalyzeContentRequest(proto.Message): query. assist_query_params (google.cloud.dialogflow_v2.types.AssistQueryParameters): Parameters for a human assist query. + cx_parameters (google.protobuf.struct_pb2.Struct): + Additional parameters to be put into + Dialogflow CX session parameters. To remove a + parameter from the session, clients should + explicitly set the parameter value to null. + + Note: this field should only be used if you are + connecting to a Dialogflow CX agent. request_id (str): A unique identifier for this request. Restricted to 36 ASCII characters. A random UUID is recommended. This request is @@ -395,6 +403,11 @@ class AnalyzeContentRequest(proto.Message): number=14, message="AssistQueryParameters", ) + cx_parameters = proto.Field( + proto.MESSAGE, + number=18, + message=struct_pb2.Struct, + ) request_id = proto.Field( proto.STRING, number=11, diff --git a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py index 9b376106e39d..bad839925b4e 100644 --- a/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py +++ b/packages/google-cloud-dialogflow/scripts/fixup_dialogflow_v2_keywords.py @@ -39,7 +39,7 @@ def partition( class dialogflowCallTransformer(cst.CSTTransformer): CTRL_PARAMS: Tuple[str] = ('retry', 'timeout', 'metadata') METHOD_TO_PARAMS: Dict[str, Tuple[str]] = { - 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'assist_query_params', 'request_id', ), + 'analyze_content': ('participant', 'text_input', 'event_input', 'reply_audio_config', 'query_params', 'assist_query_params', 'cx_parameters', 'request_id', ), 'batch_create_entities': ('parent', 'entities', 'language_code', ), 'batch_delete_entities': ('parent', 'entity_values', 'language_code', ), 'batch_delete_entity_types': ('parent', 'entity_type_names', ),