@@ -66,18 +66,36 @@ class ConversationsAsyncClient:
66
66
DEFAULT_ENDPOINT = ConversationsClient .DEFAULT_ENDPOINT
67
67
DEFAULT_MTLS_ENDPOINT = ConversationsClient .DEFAULT_MTLS_ENDPOINT
68
68
69
+ agent_path = staticmethod (ConversationsClient .agent_path )
70
+ parse_agent_path = staticmethod (ConversationsClient .parse_agent_path )
69
71
answer_record_path = staticmethod (ConversationsClient .answer_record_path )
70
72
parse_answer_record_path = staticmethod (
71
73
ConversationsClient .parse_answer_record_path
72
74
)
73
75
conversation_path = staticmethod (ConversationsClient .conversation_path )
74
76
parse_conversation_path = staticmethod (ConversationsClient .parse_conversation_path )
77
+ conversation_model_path = staticmethod (ConversationsClient .conversation_model_path )
78
+ parse_conversation_model_path = staticmethod (
79
+ ConversationsClient .parse_conversation_model_path
80
+ )
75
81
conversation_profile_path = staticmethod (
76
82
ConversationsClient .conversation_profile_path
77
83
)
78
84
parse_conversation_profile_path = staticmethod (
79
85
ConversationsClient .parse_conversation_profile_path
80
86
)
87
+ cx_security_settings_path = staticmethod (
88
+ ConversationsClient .cx_security_settings_path
89
+ )
90
+ parse_cx_security_settings_path = staticmethod (
91
+ ConversationsClient .parse_cx_security_settings_path
92
+ )
93
+ document_path = staticmethod (ConversationsClient .document_path )
94
+ parse_document_path = staticmethod (ConversationsClient .parse_document_path )
95
+ knowledge_base_path = staticmethod (ConversationsClient .knowledge_base_path )
96
+ parse_knowledge_base_path = staticmethod (
97
+ ConversationsClient .parse_knowledge_base_path
98
+ )
81
99
message_path = staticmethod (ConversationsClient .message_path )
82
100
parse_message_path = staticmethod (ConversationsClient .parse_message_path )
83
101
common_billing_account_path = staticmethod (
@@ -939,6 +957,104 @@ async def sample_suggest_conversation_summary():
939
957
# Done; return the response.
940
958
return response
941
959
960
+ async def generate_stateless_summary (
961
+ self ,
962
+ request : Optional [
963
+ Union [conversation .GenerateStatelessSummaryRequest , dict ]
964
+ ] = None ,
965
+ * ,
966
+ retry : OptionalRetry = gapic_v1 .method .DEFAULT ,
967
+ timeout : Union [float , object ] = gapic_v1 .method .DEFAULT ,
968
+ metadata : Sequence [Tuple [str , str ]] = (),
969
+ ) -> conversation .GenerateStatelessSummaryResponse :
970
+ r"""Generates and returns a summary for a conversation
971
+ that does not have a resource created for it.
972
+
973
+ .. code-block:: python
974
+
975
+ # This snippet has been automatically generated and should be regarded as a
976
+ # code template only.
977
+ # It will require modifications to work:
978
+ # - It may require correct/in-range values for request initialization.
979
+ # - It may require specifying regional endpoints when creating the service
980
+ # client as shown in:
981
+ # https://googleapis.dev/python/google-api-core/latest/client_options.html
982
+ from google.cloud import dialogflow_v2
983
+
984
+ async def sample_generate_stateless_summary():
985
+ # Create a client
986
+ client = dialogflow_v2.ConversationsAsyncClient()
987
+
988
+ # Initialize request argument(s)
989
+ stateless_conversation = dialogflow_v2.MinimalConversation()
990
+ stateless_conversation.messages.content = "content_value"
991
+ stateless_conversation.parent = "parent_value"
992
+
993
+ conversation_profile = dialogflow_v2.ConversationProfile()
994
+ conversation_profile.display_name = "display_name_value"
995
+
996
+ request = dialogflow_v2.GenerateStatelessSummaryRequest(
997
+ stateless_conversation=stateless_conversation,
998
+ conversation_profile=conversation_profile,
999
+ )
1000
+
1001
+ # Make the request
1002
+ response = await client.generate_stateless_summary(request=request)
1003
+
1004
+ # Handle the response
1005
+ print(response)
1006
+
1007
+ Args:
1008
+ request (Optional[Union[google.cloud.dialogflow_v2.types.GenerateStatelessSummaryRequest, dict]]):
1009
+ The request object. The request message for
1010
+ [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
1011
+ retry (google.api_core.retry.Retry): Designation of what errors, if any,
1012
+ should be retried.
1013
+ timeout (float): The timeout for this request.
1014
+ metadata (Sequence[Tuple[str, str]]): Strings which should be
1015
+ sent along with the request as metadata.
1016
+
1017
+ Returns:
1018
+ google.cloud.dialogflow_v2.types.GenerateStatelessSummaryResponse:
1019
+ The response message for
1020
+ [Conversations.GenerateStatelessSummary][google.cloud.dialogflow.v2.Conversations.GenerateStatelessSummary].
1021
+
1022
+ """
1023
+ # Create or coerce a protobuf request object.
1024
+ request = conversation .GenerateStatelessSummaryRequest (request )
1025
+
1026
+ # Wrap the RPC method; this adds retry and timeout information,
1027
+ # and friendly error handling.
1028
+ rpc = gapic_v1 .method_async .wrap_method (
1029
+ self ._client ._transport .generate_stateless_summary ,
1030
+ default_timeout = None ,
1031
+ client_info = DEFAULT_CLIENT_INFO ,
1032
+ )
1033
+
1034
+ # Certain fields should be provided within the metadata header;
1035
+ # add these here.
1036
+ metadata = tuple (metadata ) + (
1037
+ gapic_v1 .routing_header .to_grpc_metadata (
1038
+ (
1039
+ (
1040
+ "stateless_conversation.parent" ,
1041
+ request .stateless_conversation .parent ,
1042
+ ),
1043
+ )
1044
+ ),
1045
+ )
1046
+
1047
+ # Send the request.
1048
+ response = await rpc (
1049
+ request ,
1050
+ retry = retry ,
1051
+ timeout = timeout ,
1052
+ metadata = metadata ,
1053
+ )
1054
+
1055
+ # Done; return the response.
1056
+ return response
1057
+
942
1058
async def list_operations (
943
1059
self ,
944
1060
request : Optional [operations_pb2 .ListOperationsRequest ] = None ,
0 commit comments