google-cloud-dialogflow-v2 1.12.1 → 1.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/google/cloud/dialogflow/v2/agent_coaching_instruction_pb.rb +47 -0
  3. data/lib/google/cloud/dialogflow/v2/answer_record_pb.rb +3 -1
  4. data/lib/google/cloud/dialogflow/v2/answer_records/paths.rb +19 -0
  5. data/lib/google/cloud/dialogflow/v2/audio_config_pb.rb +3 -1
  6. data/lib/google/cloud/dialogflow/v2/conversation_event_pb.rb +3 -1
  7. data/lib/google/cloud/dialogflow/v2/conversation_model_pb.rb +1 -1
  8. data/lib/google/cloud/dialogflow/v2/conversation_pb.rb +1 -1
  9. data/lib/google/cloud/dialogflow/v2/conversation_profile_pb.rb +3 -1
  10. data/lib/google/cloud/dialogflow/v2/conversations/client.rb +10 -1
  11. data/lib/google/cloud/dialogflow/v2/conversations/paths.rb +19 -0
  12. data/lib/google/cloud/dialogflow/v2/conversations/rest/client.rb +10 -1
  13. data/lib/google/cloud/dialogflow/v2/document_pb.rb +1 -1
  14. data/lib/google/cloud/dialogflow/v2/generator_evaluation_pb.rb +82 -0
  15. data/lib/google/cloud/dialogflow/v2/generator_evaluation_services_pb.rb +51 -0
  16. data/lib/google/cloud/dialogflow/v2/generator_evaluations/client.rb +815 -0
  17. data/lib/google/cloud/dialogflow/v2/generator_evaluations/credentials.rb +52 -0
  18. data/lib/google/cloud/dialogflow/v2/generator_evaluations/operations.rb +841 -0
  19. data/lib/google/cloud/dialogflow/v2/generator_evaluations/paths.rb +92 -0
  20. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/client.rb +752 -0
  21. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/operations.rb +945 -0
  22. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest/service_stub.rb +326 -0
  23. data/lib/google/cloud/dialogflow/v2/generator_evaluations/rest.rb +54 -0
  24. data/lib/google/cloud/dialogflow/v2/generator_evaluations.rb +56 -0
  25. data/lib/google/cloud/dialogflow/v2/generator_pb.rb +18 -1
  26. data/lib/google/cloud/dialogflow/v2/generators/paths.rb +19 -0
  27. data/lib/google/cloud/dialogflow/v2/operations_pb.rb +45 -0
  28. data/lib/google/cloud/dialogflow/v2/participant_pb.rb +3 -1
  29. data/lib/google/cloud/dialogflow/v2/rest.rb +3 -0
  30. data/lib/google/cloud/dialogflow/v2/sip_trunk_pb.rb +62 -0
  31. data/lib/google/cloud/dialogflow/v2/sip_trunk_services_pb.rb +53 -0
  32. data/lib/google/cloud/dialogflow/v2/sip_trunks/client.rb +885 -0
  33. data/lib/google/cloud/dialogflow/v2/sip_trunks/credentials.rb +52 -0
  34. data/lib/google/cloud/dialogflow/v2/sip_trunks/paths.rb +69 -0
  35. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest/client.rb +815 -0
  36. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest/service_stub.rb +388 -0
  37. data/lib/google/cloud/dialogflow/v2/sip_trunks/rest.rb +53 -0
  38. data/lib/google/cloud/dialogflow/v2/sip_trunks.rb +55 -0
  39. data/lib/google/cloud/dialogflow/v2/tool_call_pb.rb +52 -0
  40. data/lib/google/cloud/dialogflow/v2/tool_pb.rb +80 -0
  41. data/lib/google/cloud/dialogflow/v2/tool_services_pb.rb +55 -0
  42. data/lib/google/cloud/dialogflow/v2/tools/client.rb +897 -0
  43. data/lib/google/cloud/dialogflow/v2/tools/credentials.rb +52 -0
  44. data/lib/google/cloud/dialogflow/v2/tools/paths.rb +109 -0
  45. data/lib/google/cloud/dialogflow/v2/tools/rest/client.rb +827 -0
  46. data/lib/google/cloud/dialogflow/v2/tools/rest/service_stub.rb +388 -0
  47. data/lib/google/cloud/dialogflow/v2/tools/rest.rb +55 -0
  48. data/lib/google/cloud/dialogflow/v2/tools.rb +57 -0
  49. data/lib/google/cloud/dialogflow/v2/version.rb +1 -1
  50. data/lib/google/cloud/dialogflow/v2/webhook_pb.rb +2 -1
  51. data/lib/google/cloud/dialogflow/v2.rb +3 -0
  52. data/proto_docs/google/cloud/dialogflow/v2/agent_coaching_instruction.rb +109 -0
  53. data/proto_docs/google/cloud/dialogflow/v2/answer_record.rb +8 -3
  54. data/proto_docs/google/cloud/dialogflow/v2/audio_config.rb +40 -0
  55. data/proto_docs/google/cloud/dialogflow/v2/conversation.rb +19 -2
  56. data/proto_docs/google/cloud/dialogflow/v2/conversation_event.rb +2 -0
  57. data/proto_docs/google/cloud/dialogflow/v2/conversation_model.rb +12 -0
  58. data/proto_docs/google/cloud/dialogflow/v2/conversation_profile.rb +38 -6
  59. data/proto_docs/google/cloud/dialogflow/v2/document.rb +3 -0
  60. data/proto_docs/google/cloud/dialogflow/v2/generator.rb +220 -4
  61. data/proto_docs/google/cloud/dialogflow/v2/generator_evaluation.rb +539 -0
  62. data/proto_docs/google/cloud/dialogflow/v2/operations.rb +39 -0
  63. data/proto_docs/google/cloud/dialogflow/v2/participant.rb +70 -7
  64. data/proto_docs/google/cloud/dialogflow/v2/sip_trunk.rb +211 -0
  65. data/proto_docs/google/cloud/dialogflow/v2/tool.rb +552 -0
  66. data/proto_docs/google/cloud/dialogflow/v2/tool_call.rb +115 -0
  67. metadata +39 -1
@@ -0,0 +1,552 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ # Request message of CreateTool.
25
+ # @!attribute [rw] parent
26
+ # @return [::String]
27
+ # Required. The project/location to create tool for. Format:
28
+ # `projects/<Project ID>/locations/<Location ID>`
29
+ # @!attribute [rw] tool
30
+ # @return [::Google::Cloud::Dialogflow::V2::Tool]
31
+ # Required. The tool to create.
32
+ # @!attribute [rw] tool_id
33
+ # @return [::String]
34
+ # Optional. The ID to use for the tool, which will become the final
35
+ # component of the tool's resource name.
36
+ #
37
+ # The tool ID must be compliant with the regression formula
38
+ # `[a-zA-Z][a-zA-Z0-9_-]*` with the characters length in range of [3,64].
39
+ # If the field is not provide, an Id will be auto-generated.
40
+ # If the field is provided, the caller is responsible for
41
+ # 1. the uniqueness of the ID, otherwise the request will be rejected.
42
+ # 2. the consistency for whether to use custom ID or not under a project to
43
+ # better ensure uniqueness.
44
+ class CreateToolRequest
45
+ include ::Google::Protobuf::MessageExts
46
+ extend ::Google::Protobuf::MessageExts::ClassMethods
47
+ end
48
+
49
+ # Request message of GetTool.
50
+ # @!attribute [rw] name
51
+ # @return [::String]
52
+ # Required. The tool resource name to retrieve. Format:
53
+ # `projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`
54
+ class GetToolRequest
55
+ include ::Google::Protobuf::MessageExts
56
+ extend ::Google::Protobuf::MessageExts::ClassMethods
57
+ end
58
+
59
+ # Request message of ListTools.
60
+ # @!attribute [rw] parent
61
+ # @return [::String]
62
+ # Required. The project/location to list tools for. Format:
63
+ # `projects/<Project ID>/locations/<Location ID>`
64
+ # @!attribute [rw] page_size
65
+ # @return [::Integer]
66
+ # Optional. Maximum number of conversation models to return in a single page.
67
+ # Default to 10.
68
+ # @!attribute [rw] page_token
69
+ # @return [::String]
70
+ # Optional. The next_page_token value returned from a previous list request.
71
+ class ListToolsRequest
72
+ include ::Google::Protobuf::MessageExts
73
+ extend ::Google::Protobuf::MessageExts::ClassMethods
74
+ end
75
+
76
+ # Response of ListTools.
77
+ # @!attribute [rw] tools
78
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Tool>]
79
+ # List of tools retrieved.
80
+ # @!attribute [rw] next_page_token
81
+ # @return [::String]
82
+ # Token to retrieve the next page of results, or empty if there are no more
83
+ # results in the list.
84
+ class ListToolsResponse
85
+ include ::Google::Protobuf::MessageExts
86
+ extend ::Google::Protobuf::MessageExts::ClassMethods
87
+ end
88
+
89
+ # Request of DeleteTool.
90
+ # @!attribute [rw] name
91
+ # @return [::String]
92
+ # Required. The tool resource name to delete. Format:
93
+ # `projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`
94
+ class DeleteToolRequest
95
+ include ::Google::Protobuf::MessageExts
96
+ extend ::Google::Protobuf::MessageExts::ClassMethods
97
+ end
98
+
99
+ # Request of UpdateTool.
100
+ # @!attribute [rw] tool
101
+ # @return [::Google::Cloud::Dialogflow::V2::Tool]
102
+ # Required. The tool to update.
103
+ # The name field of tool is to identify the tool to
104
+ # update.
105
+ # @!attribute [rw] update_mask
106
+ # @return [::Google::Protobuf::FieldMask]
107
+ # Optional. The list of fields to update.
108
+ class UpdateToolRequest
109
+ include ::Google::Protobuf::MessageExts
110
+ extend ::Google::Protobuf::MessageExts::ClassMethods
111
+ end
112
+
113
+ # Represents a tool.
114
+ # @!attribute [r] name
115
+ # @return [::String]
116
+ # Output only. Identifier. The resource name of the tool. Format:
117
+ # `projects/<Project ID>/locations/<Location ID>/tools/<Tool ID>`.
118
+ # @!attribute [rw] tool_key
119
+ # @return [::String]
120
+ # Required. A human readable short name of the tool, which should be unique
121
+ # within the project. It should only contain letters, numbers, and
122
+ # underscores, and it will be used by LLM to identify the tool.
123
+ # @!attribute [rw] display_name
124
+ # @return [::String]
125
+ # Optional. A human readable short name of the tool, to be shown on the UI.
126
+ # @!attribute [rw] description
127
+ # @return [::String]
128
+ # Optional. A human readable description of the tool.
129
+ # @!attribute [rw] action_confirmation_requirement
130
+ # @return [::Google::Protobuf::Map{::String => ::Google::Cloud::Dialogflow::V2::Tool::ConfirmationRequirement}]
131
+ # Optional. Confirmation requirement for the actions. Each key is an action
132
+ # name in the action_schemas. If an action's confirmation requirement is
133
+ # unspecified (either the key is not present, or its value is
134
+ # CONFIRMATION_REQUIREMENT_UNSPECIFIED), the requirement is inferred from the
135
+ # action's method_type - confirmation is not required if and only if
136
+ # method_type is GET.
137
+ # @!attribute [rw] extension_spec
138
+ # @deprecated This field is deprecated and may be removed in the next major version update.
139
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ExtensionTool]
140
+ # Vertex extension tool specification.
141
+ #
142
+ # Note: The following fields are mutually exclusive: `extension_spec`, `function_spec`, `connector_spec`, `open_api_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
143
+ # @!attribute [rw] function_spec
144
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::FunctionTool]
145
+ # Client side executed function specification.
146
+ #
147
+ # Note: The following fields are mutually exclusive: `function_spec`, `extension_spec`, `connector_spec`, `open_api_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
148
+ # @!attribute [rw] connector_spec
149
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ConnectorTool]
150
+ # Integration connectors tool specification.
151
+ #
152
+ # Note: The following fields are mutually exclusive: `connector_spec`, `extension_spec`, `function_spec`, `open_api_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
153
+ # @!attribute [rw] open_api_spec
154
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::OpenApiTool]
155
+ # OpenAPI tool.
156
+ #
157
+ # Note: The following fields are mutually exclusive: `open_api_spec`, `extension_spec`, `function_spec`, `connector_spec`. If a field in that set is populated, all other fields in the set will automatically be cleared.
158
+ # @!attribute [r] create_time
159
+ # @return [::Google::Protobuf::Timestamp]
160
+ # Output only. Creation time of this tool.
161
+ # @!attribute [r] update_time
162
+ # @return [::Google::Protobuf::Timestamp]
163
+ # Output only. Update time of this tool.
164
+ # @!attribute [r] satisfies_pzs
165
+ # @return [::Boolean]
166
+ # Output only. A read only boolean field reflecting Zone Separation
167
+ # status of the tool. If the field is absent, it means the status is unknown.
168
+ # @!attribute [r] satisfies_pzi
169
+ # @return [::Boolean]
170
+ # Output only. A read only boolean field reflecting Zone Isolation status
171
+ # of the tool. If the field is absent, it means the status is unknown.
172
+ class Tool
173
+ include ::Google::Protobuf::MessageExts
174
+ extend ::Google::Protobuf::MessageExts::ClassMethods
175
+
176
+ # An ExtensionTool is a way to use Vertex Extensions as a tool.
177
+ # @!attribute [rw] name
178
+ # @return [::String]
179
+ # Required. The full name of the referenced vertex extension.
180
+ # Format:
181
+ # `projects/{project}/locations/{location}/extensions/{extension}`
182
+ class ExtensionTool
183
+ include ::Google::Protobuf::MessageExts
184
+ extend ::Google::Protobuf::MessageExts::ClassMethods
185
+ end
186
+
187
+ # A Function tool describes the functions to be invoked on the client side.
188
+ # @!attribute [rw] input_schema
189
+ # @return [::Google::Protobuf::Struct]
190
+ # Optional. The JSON schema is encapsulated in a
191
+ # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of
192
+ # the function. This input is a JSON object that contains the function's
193
+ # parameters as properties of the object.
194
+ # @!attribute [rw] output_schema
195
+ # @return [::Google::Protobuf::Struct]
196
+ # Optional. The JSON schema is encapsulated in a
197
+ # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output
198
+ # of the function. This output is a JSON object that contains the
199
+ # function's parameters as properties of the object.
200
+ # @!attribute [rw] method_type
201
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::MethodType]
202
+ # Optional. The method type of the function. If not specified, the default
203
+ # value is GET.
204
+ class FunctionTool
205
+ include ::Google::Protobuf::MessageExts
206
+ extend ::Google::Protobuf::MessageExts::ClassMethods
207
+ end
208
+
209
+ # An OpenAPI tool is a way to provide the Tool specifications in the Open API
210
+ # schema format.
211
+ # @!attribute [rw] text_schema
212
+ # @return [::String]
213
+ # Required. The OpenAPI schema specified as a text.
214
+ # @!attribute [rw] authentication
215
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication]
216
+ # Optional. Authentication information required by the API.
217
+ # @!attribute [rw] tls_config
218
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::TLSConfig]
219
+ # Optional. TLS configuration for the HTTPS verification.
220
+ # @!attribute [rw] service_directory_config
221
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ServiceDirectoryConfig]
222
+ # Optional. Service Directory configuration.
223
+ class OpenApiTool
224
+ include ::Google::Protobuf::MessageExts
225
+ extend ::Google::Protobuf::MessageExts::ClassMethods
226
+ end
227
+
228
+ # A ConnectorTool enabling using Integration Connectors Connections as tools.
229
+ # @!attribute [rw] name
230
+ # @return [::String]
231
+ # Required. The full resource name of the referenced Integration Connectors
232
+ # Connection. Format: 'projects/*/locations/*/connections/*'
233
+ # @!attribute [rw] actions
234
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Tool::ConnectorTool::Action>]
235
+ # Required. Actions for the tool to use.
236
+ class ConnectorTool
237
+ include ::Google::Protobuf::MessageExts
238
+ extend ::Google::Protobuf::MessageExts::ClassMethods
239
+
240
+ # Configuration of a Connection operation for the tool to use.
241
+ # @!attribute [rw] connection_action_id
242
+ # @return [::String]
243
+ # ID of a Connection action for the tool to use.
244
+ #
245
+ # Note: The following fields are mutually exclusive: `connection_action_id`, `entity_operation`. If a field in that set is populated, all other fields in the set will automatically be cleared.
246
+ # @!attribute [rw] entity_operation
247
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ConnectorTool::Action::EntityOperation]
248
+ # Entity operation configuration for the tool to use.
249
+ #
250
+ # Note: The following fields are mutually exclusive: `entity_operation`, `connection_action_id`. If a field in that set is populated, all other fields in the set will automatically be cleared.
251
+ # @!attribute [rw] input_fields
252
+ # @return [::Array<::String>]
253
+ # Optional. Entity fields to use as inputs for the operation.
254
+ # If no fields are specified, all fields of the Entity will be used.
255
+ # @!attribute [rw] output_fields
256
+ # @return [::Array<::String>]
257
+ # Optional. Entity fields to return from the operation.
258
+ # If no fields are specified, all fields of the Entity will be returned.
259
+ class Action
260
+ include ::Google::Protobuf::MessageExts
261
+ extend ::Google::Protobuf::MessageExts::ClassMethods
262
+
263
+ # Entity CRUD operation specification.
264
+ # @!attribute [rw] entity_id
265
+ # @return [::String]
266
+ # Required. ID of the entity.
267
+ # @!attribute [rw] operation
268
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ConnectorTool::Action::EntityOperation::OperationType]
269
+ # Required. Operation to perform on the entity.
270
+ class EntityOperation
271
+ include ::Google::Protobuf::MessageExts
272
+ extend ::Google::Protobuf::MessageExts::ClassMethods
273
+
274
+ # The operation to perform on the entity.
275
+ module OperationType
276
+ # Operation type unspecified. Invalid, ConnectorTool create/update
277
+ # will fail.
278
+ OPERATION_TYPE_UNSPECIFIED = 0
279
+
280
+ # List operation.
281
+ LIST = 1
282
+
283
+ # Get operation.
284
+ GET = 2
285
+
286
+ # Create operation.
287
+ CREATE = 3
288
+
289
+ # Update operation.
290
+ UPDATE = 4
291
+
292
+ # Delete operation.
293
+ DELETE = 5
294
+ end
295
+ end
296
+ end
297
+ end
298
+
299
+ # Authentication information required for API calls
300
+ # @!attribute [rw] api_key_config
301
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::ApiKeyConfig]
302
+ # Config for API key auth.
303
+ #
304
+ # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
305
+ # @!attribute [rw] oauth_config
306
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::OAuthConfig]
307
+ # Config for OAuth.
308
+ #
309
+ # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
310
+ # @!attribute [rw] service_agent_auth_config
311
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::ServiceAgentAuthConfig]
312
+ # Config for [Diglogflow service
313
+ # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent)
314
+ # auth.
315
+ #
316
+ # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
317
+ # @!attribute [rw] bearer_token_config
318
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::BearerTokenConfig]
319
+ # Config for bearer token auth.
320
+ #
321
+ # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared.
322
+ class Authentication
323
+ include ::Google::Protobuf::MessageExts
324
+ extend ::Google::Protobuf::MessageExts::ClassMethods
325
+
326
+ # Config for authentication with API key.
327
+ # @!attribute [rw] key_name
328
+ # @return [::String]
329
+ # Required. The parameter name or the header name of the API key.
330
+ # E.g., If the API request is "https://example.com/act?X-Api-Key=<API
331
+ # KEY>", "X-Api-Key" would be the parameter name.
332
+ # @!attribute [rw] api_key
333
+ # @return [::String]
334
+ # Optional. The API key. If the `secret_version_for_api_key` field is
335
+ # set, this field will be ignored.
336
+ # @!attribute [rw] secret_version_for_api_key
337
+ # @return [::String]
338
+ # Optional. The name of the SecretManager secret version resource storing
339
+ # the API key. If this field is set, the `api_key` field will be ignored.
340
+ # Format: `projects/{project}/secrets/{secret}/versions/{version}`
341
+ # @!attribute [rw] request_location
342
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::RequestLocation]
343
+ # Required. Key location in the request.
344
+ class ApiKeyConfig
345
+ include ::Google::Protobuf::MessageExts
346
+ extend ::Google::Protobuf::MessageExts::ClassMethods
347
+ end
348
+
349
+ # Config for authentication with OAuth.
350
+ # @!attribute [rw] oauth_grant_type
351
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::OAuthConfig::OauthGrantType]
352
+ # Required. OAuth grant types.
353
+ # @!attribute [rw] client_id
354
+ # @return [::String]
355
+ # Required. The client ID from the OAuth provider.
356
+ # @!attribute [rw] client_secret
357
+ # @return [::String]
358
+ # Optional. The client secret from the OAuth provider. If the
359
+ # `secret_version_for_client_secret` field is set, this field will be
360
+ # ignored.
361
+ # @!attribute [rw] secret_version_for_client_secret
362
+ # @return [::String]
363
+ # Optional. The name of the SecretManager secret version resource storing
364
+ # the client secret. If this field is set, the `client_secret` field will
365
+ # be ignored. Format:
366
+ # `projects/{project}/secrets/{secret}/versions/{version}`
367
+ # @!attribute [rw] token_endpoint
368
+ # @return [::String]
369
+ # Required. The token endpoint in the OAuth provider to exchange for an
370
+ # access token.
371
+ # @!attribute [rw] scopes
372
+ # @return [::Array<::String>]
373
+ # Optional. The OAuth scopes to grant.
374
+ class OAuthConfig
375
+ include ::Google::Protobuf::MessageExts
376
+ extend ::Google::Protobuf::MessageExts::ClassMethods
377
+
378
+ # OAuth grant types. Only [client credential
379
+ # grant](https://oauth.net/2/grant-types/client-credentials) is
380
+ # supported.
381
+ module OauthGrantType
382
+ # Default value. This value is unused.
383
+ OAUTH_GRANT_TYPE_UNSPECIFIED = 0
384
+
385
+ # Represents the [client credential
386
+ # flow](https://oauth.net/2/grant-types/client-credentials).
387
+ CLIENT_CREDENTIAL = 1
388
+ end
389
+ end
390
+
391
+ # Config for auth using [Dialogflow service
392
+ # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
393
+ # @!attribute [rw] service_agent_auth
394
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth]
395
+ # Optional. Indicate the auth token type generated from the [Diglogflow
396
+ # service
397
+ # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
398
+ # The generated token is sent in the Authorization header.
399
+ class ServiceAgentAuthConfig
400
+ include ::Google::Protobuf::MessageExts
401
+ extend ::Google::Protobuf::MessageExts::ClassMethods
402
+
403
+ # Indicate the auth token type generated from the [Diaglogflow service
404
+ # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent).
405
+ module ServiceAgentAuth
406
+ # Service agent auth type unspecified. Default to ID_TOKEN.
407
+ SERVICE_AGENT_AUTH_UNSPECIFIED = 0
408
+
409
+ # Use [ID
410
+ # token](https://cloud.google.com/docs/authentication/token-types#id)
411
+ # generated from service agent. This can be used to access Cloud
412
+ # Function and Cloud Run after you grant Invoker role to
413
+ # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
414
+ ID_TOKEN = 1
415
+
416
+ # Use [access
417
+ # token](https://cloud.google.com/docs/authentication/token-types#access)
418
+ # generated from service agent. This can be used to access other Google
419
+ # Cloud APIs after you grant required roles to
420
+ # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`.
421
+ ACCESS_TOKEN = 2
422
+ end
423
+ end
424
+
425
+ # Config for authentication using bearer token.
426
+ # @!attribute [rw] token
427
+ # @return [::String]
428
+ # Optional. The text token appended to the text `Bearer` to the request
429
+ # Authorization header.
430
+ # [Session parameters
431
+ # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref)
432
+ # can be used to pass the token dynamically, e.g.
433
+ # `$session.params.parameter-id`.
434
+ # @!attribute [rw] secret_version_for_token
435
+ # @return [::String]
436
+ # Optional. The name of the SecretManager secret version resource storing
437
+ # the Bearer token. If this field is set, the `token` field will be
438
+ # ignored. Format:
439
+ # `projects/{project}/secrets/{secret}/versions/{version}`
440
+ class BearerTokenConfig
441
+ include ::Google::Protobuf::MessageExts
442
+ extend ::Google::Protobuf::MessageExts::ClassMethods
443
+ end
444
+
445
+ # The location of the API key in the request.
446
+ module RequestLocation
447
+ # Default value. This value is unused.
448
+ REQUEST_LOCATION_UNSPECIFIED = 0
449
+
450
+ # Represents the key in http header.
451
+ HEADER = 1
452
+
453
+ # Represents the key in query string.
454
+ QUERY_STRING = 2
455
+ end
456
+ end
457
+
458
+ # The TLS configuration.
459
+ # @!attribute [rw] ca_certs
460
+ # @return [::Array<::Google::Cloud::Dialogflow::V2::Tool::TLSConfig::CACert>]
461
+ # Required. Specifies a list of allowed custom CA certificates for HTTPS
462
+ # verification.
463
+ class TLSConfig
464
+ include ::Google::Protobuf::MessageExts
465
+ extend ::Google::Protobuf::MessageExts::ClassMethods
466
+
467
+ # The CA certificate.
468
+ # @!attribute [rw] display_name
469
+ # @return [::String]
470
+ # Required. The name of the allowed custom CA certificates. This
471
+ # can be used to disambiguate the custom CA certificates.
472
+ # @!attribute [rw] cert
473
+ # @return [::String]
474
+ # Required. The allowed custom CA certificates (in DER format) for
475
+ # HTTPS verification. This overrides the default SSL trust store. If this
476
+ # is empty or unspecified, Dialogflow will use Google's default trust
477
+ # store to verify certificates. N.B. Make sure the HTTPS server
478
+ # certificates are signed with "subject alt name". For instance a
479
+ # certificate can be self-signed using the following command,
480
+ # ```
481
+ # openssl x509 -req -days 200 -in example.com.csr \
482
+ # -signkey example.com.key \
483
+ # -out example.com.crt \
484
+ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'")
485
+ # ```
486
+ class CACert
487
+ include ::Google::Protobuf::MessageExts
488
+ extend ::Google::Protobuf::MessageExts::ClassMethods
489
+ end
490
+ end
491
+
492
+ # Configuration for tools using Service Directory.
493
+ # @!attribute [rw] service
494
+ # @return [::String]
495
+ # Required. The name of [Service
496
+ # Directory](https://cloud.google.com/service-directory) service.
497
+ # Format:
498
+ # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`.
499
+ # `LocationID` of the service directory must be the same as the location
500
+ # of the tool.
501
+ class ServiceDirectoryConfig
502
+ include ::Google::Protobuf::MessageExts
503
+ extend ::Google::Protobuf::MessageExts::ClassMethods
504
+ end
505
+
506
+ # @!attribute [rw] key
507
+ # @return [::String]
508
+ # @!attribute [rw] value
509
+ # @return [::Google::Cloud::Dialogflow::V2::Tool::ConfirmationRequirement]
510
+ class ActionConfirmationRequirementEntry
511
+ include ::Google::Protobuf::MessageExts
512
+ extend ::Google::Protobuf::MessageExts::ClassMethods
513
+ end
514
+
515
+ # Types of confirmation requirement.
516
+ module ConfirmationRequirement
517
+ # Unspecified. Whether the action requires confirmation is inferred from
518
+ # method_type.
519
+ CONFIRMATION_REQUIREMENT_UNSPECIFIED = 0
520
+
521
+ # Conformation is required.
522
+ REQUIRED = 1
523
+
524
+ # Conformation is not required.
525
+ NOT_REQUIRED = 2
526
+ end
527
+
528
+ # The method type of the tool.
529
+ module MethodType
530
+ # Unspecified.
531
+ METHOD_TYPE_UNSPECIFIED = 0
532
+
533
+ # GET method.
534
+ GET = 1
535
+
536
+ # POST method.
537
+ POST = 2
538
+
539
+ # PUT method.
540
+ PUT = 3
541
+
542
+ # DELETE method.
543
+ DELETE = 4
544
+
545
+ # PATCH method.
546
+ PATCH = 5
547
+ end
548
+ end
549
+ end
550
+ end
551
+ end
552
+ end
@@ -0,0 +1,115 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Copyright 2025 Google LLC
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # https://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+ # Auto-generated by gapic-generator-ruby. DO NOT EDIT!
18
+
19
+
20
+ module Google
21
+ module Cloud
22
+ module Dialogflow
23
+ module V2
24
+ # Represents a call of a specific tool's action with the specified inputs.
25
+ # @!attribute [rw] tool
26
+ # @return [::String]
27
+ # Optional. The {::Google::Cloud::Dialogflow::V2::Tool tool} associated with
28
+ # this call. Format:
29
+ # `projects/<ProjectID>/locations/<LocationID>/tools/<ToolID>`.
30
+ # @!attribute [rw] tool_display_name
31
+ # @return [::String]
32
+ # Optional. A human readable short name of the tool, to be shown on the UI.
33
+ # @!attribute [rw] tool_display_details
34
+ # @return [::String]
35
+ # Optional. A human readable description of the tool.
36
+ # @!attribute [rw] action
37
+ # @return [::String]
38
+ # Optional. The name of the tool's action associated with this call.
39
+ # @!attribute [rw] input_parameters
40
+ # @return [::Google::Protobuf::Struct]
41
+ # Optional. The action's input parameters.
42
+ # @!attribute [r] create_time
43
+ # @return [::Google::Protobuf::Timestamp]
44
+ # Output only. Create time of the tool call.
45
+ # @!attribute [rw] answer_record
46
+ # @return [::String]
47
+ # Optional. The answer record associated with this tool call.
48
+ # @!attribute [r] state
49
+ # @return [::Google::Cloud::Dialogflow::V2::ToolCall::State]
50
+ # Output only. State of the tool call.
51
+ class ToolCall
52
+ include ::Google::Protobuf::MessageExts
53
+ extend ::Google::Protobuf::MessageExts::ClassMethods
54
+
55
+ # Tool call states.
56
+ module State
57
+ # Default value.
58
+ STATE_UNSPECIFIED = 0
59
+
60
+ # The tool call has been triggered.
61
+ TRIGGERED = 1
62
+
63
+ # The tool call requires confirmation from a human.
64
+ NEEDS_CONFIRMATION = 2
65
+ end
66
+ end
67
+
68
+ # The result of calling a tool's action.
69
+ # @!attribute [rw] tool
70
+ # @return [::String]
71
+ # Optional. The {::Google::Cloud::Dialogflow::V2::Tool tool} associated with
72
+ # this call. Format:
73
+ # `projects/<ProjectID>/locations/<LocationID>/tools/<ToolID>`.
74
+ # @!attribute [rw] action
75
+ # @return [::String]
76
+ # Optional. The name of the tool's action associated with this call.
77
+ # @!attribute [rw] error
78
+ # @return [::Google::Cloud::Dialogflow::V2::ToolCallResult::Error]
79
+ # The tool call's error.
80
+ #
81
+ # Note: The following fields are mutually exclusive: `error`, `raw_content`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
82
+ # @!attribute [rw] raw_content
83
+ # @return [::String]
84
+ # Only populated if the response content is not utf-8 encoded.
85
+ # (by definition byte fields are base64 encoded).
86
+ #
87
+ # Note: The following fields are mutually exclusive: `raw_content`, `error`, `content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
88
+ # @!attribute [rw] content
89
+ # @return [::String]
90
+ # Only populated if the response content is utf-8 encoded.
91
+ #
92
+ # Note: The following fields are mutually exclusive: `content`, `error`, `raw_content`. If a field in that set is populated, all other fields in the set will automatically be cleared.
93
+ # @!attribute [r] create_time
94
+ # @return [::Google::Protobuf::Timestamp]
95
+ # Output only. Create time of the tool call result.
96
+ # @!attribute [rw] answer_record
97
+ # @return [::String]
98
+ # Optional. The answer record associated with this tool call result.
99
+ class ToolCallResult
100
+ include ::Google::Protobuf::MessageExts
101
+ extend ::Google::Protobuf::MessageExts::ClassMethods
102
+
103
+ # An error produced by the tool call.
104
+ # @!attribute [rw] message
105
+ # @return [::String]
106
+ # Optional. The error message of the function.
107
+ class Error
108
+ include ::Google::Protobuf::MessageExts
109
+ extend ::Google::Protobuf::MessageExts::ClassMethods
110
+ end
111
+ end
112
+ end
113
+ end
114
+ end
115
+ end