Class: Google::Cloud::Dialogflow::CX::V3::Tool
- Inherits:
-
Object
- Object
- Google::Cloud::Dialogflow::CX::V3::Tool
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/dialogflow/cx/v3/tool.rb
Overview
A tool provides a list of actions which are available to the Playbook to attain its goal. A Tool consists of a description of the tool's usage and a specification of the tool which contains the schema and authentication information.
Defined Under Namespace
Modules: ToolType Classes: Authentication, DataStoreTool, FunctionTool, OpenApiTool, ServiceDirectoryConfig, TLSConfig
Instance Attribute Summary collapse
-
#data_store_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool
Data store search tool specification.
-
#description ⇒ ::String
Required.
-
#display_name ⇒ ::String
Required.
-
#function_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::FunctionTool
Client side executed function specification.
-
#name ⇒ ::String
The unique identifier of the Tool.
-
#open_api_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::OpenApiTool
OpenAPI specification of the Tool.
-
#tool_type ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::ToolType
readonly
Output only.
Instance Attribute Details
#data_store_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool
Returns Data store search tool specification.
Note: The following fields are mutually exclusive: data_store_spec, open_api_spec, function_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#description ⇒ ::String
Returns Required. High level description of the Tool and its usage.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#display_name ⇒ ::String
Returns Required. The human-readable name of the Tool, unique within an agent.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#function_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::FunctionTool
Returns Client side executed function specification.
Note: The following fields are mutually exclusive: function_spec, open_api_spec, data_store_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#name ⇒ ::String
Returns The unique identifier of the Tool.
Format:
projects/<ProjectID>/locations/<LocationID>/agents/<AgentID>/tools/<ToolID>.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#open_api_spec ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::OpenApiTool
Returns OpenAPI specification of the Tool.
Note: The following fields are mutually exclusive: open_api_spec, data_store_spec, function_spec. If a field in that set is populated, all other fields in the set will automatically be cleared.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |
#tool_type ⇒ ::Google::Cloud::Dialogflow::CX::V3::Tool::ToolType (readonly)
Returns Output only. The tool type.
152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 |
# File 'proto_docs/google/cloud/dialogflow/cx/v3/tool.rb', line 152 class Tool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An OpenAPI tool is a way to provide the Tool specifications in the Open API # schema format. # @!attribute [rw] text_schema # @return [::String] # Required. The OpenAPI schema specified as a text. # @!attribute [rw] authentication # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication] # Optional. Authentication information required by the API. # @!attribute [rw] tls_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig] # Optional. TLS configuration for the HTTPS verification. # @!attribute [rw] service_directory_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::ServiceDirectoryConfig] # Optional. Service Directory configuration. class OpenApiTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A DataStoreTool is a way to provide specifications needed to search a # list of data stores. # @!attribute [rw] data_store_connections # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::DataStoreConnection>] # Required. List of data stores to search. # @!attribute [rw] fallback_prompt # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::DataStoreTool::FallbackPrompt] # Required. Fallback prompt configurations to use. class DataStoreTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # A FallbackPrompt is a way to provide specifications for the Data Store # fallback prompt when generating responses. class FallbackPrompt include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # A Function tool describes the functions to be invoked on the client side. # @!attribute [rw] input_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the input of # the function. This input is a JSON object that contains the function's # parameters as properties of the object. # @!attribute [rw] output_schema # @return [::Google::Protobuf::Struct] # Optional. The JSON schema is encapsulated in a # {::Google::Protobuf::Struct google.protobuf.Struct} to describe the output # of the function. This output is a JSON object that contains the # function's parameters as properties of the object. class FunctionTool include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Authentication information required for API calls # @!attribute [rw] api_key_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ApiKeyConfig] # Config for API key auth. # # Note: The following fields are mutually exclusive: `api_key_config`, `oauth_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] oauth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig] # Config for OAuth. # # Note: The following fields are mutually exclusive: `oauth_config`, `api_key_config`, `service_agent_auth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_agent_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig] # Config for [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent) # auth. # # Note: The following fields are mutually exclusive: `service_agent_auth_config`, `api_key_config`, `oauth_config`, `bearer_token_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] bearer_token_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::BearerTokenConfig] # Config for bearer token auth. # # Note: The following fields are mutually exclusive: `bearer_token_config`, `api_key_config`, `oauth_config`, `service_agent_auth_config`, `service_account_auth_config`. If a field in that set is populated, all other fields in the set will automatically be cleared. # @!attribute [rw] service_account_auth_config # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAccountAuthConfig] # Configuration for service account authentication. # # Note: The following fields are mutually exclusive: `service_account_auth_config`, `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. class Authentication include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Config for authentication with API key. # @!attribute [rw] key_name # @return [::String] # Required. The parameter name or the header name of the API key. # E.g., If the API request is "https://example.com/act?X-Api-Key=<API # KEY>", "X-Api-Key" would be the parameter name. # @!attribute [rw] api_key # @return [::String] # Optional. The API key. If the `secret_version_for_api_key` field is # set, this field will be ignored. # @!attribute [rw] secret_version_for_api_key # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the API key. If this field is set, the `api_key` field will be ignored. # Format: `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] request_location # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::RequestLocation] # Required. Key location in the request. class ApiKeyConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Config for authentication with OAuth. # @!attribute [rw] oauth_grant_type # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::OAuthConfig::OauthGrantType] # Required. OAuth grant types. # @!attribute [rw] client_id # @return [::String] # Required. The client ID from the OAuth provider. # @!attribute [rw] client_secret # @return [::String] # Optional. The client secret from the OAuth provider. If the # `secret_version_for_client_secret` field is set, this field will be # ignored. # @!attribute [rw] secret_version_for_client_secret # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the client secret. If this field is set, the `client_secret` field will # be ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` # @!attribute [rw] token_endpoint # @return [::String] # Required. The token endpoint in the OAuth provider to exchange for an # access token. # @!attribute [rw] scopes # @return [::Array<::String>] # Optional. The OAuth scopes to grant. class OAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # OAuth grant types. Only [client credential # grant](https://oauth.net/2/grant-types/client-credentials) is # supported. module OauthGrantType # Default value. This value is unused. OAUTH_GRANT_TYPE_UNSPECIFIED = 0 # Represents the [client credential # flow](https://oauth.net/2/grant-types/client-credentials). CLIENT_CREDENTIAL = 1 end end # Config for auth using [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # @!attribute [rw] service_agent_auth # @return [::Google::Cloud::Dialogflow::CX::V3::Tool::Authentication::ServiceAgentAuthConfig::ServiceAgentAuth] # Optional. Indicate the auth token type generated from the [Diglogflow # service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). # The generated token is sent in the Authorization header. class ServiceAgentAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicate the auth token type generated from the [Diglogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). module ServiceAgentAuth # Service agent auth type unspecified. Default to ID_TOKEN. SERVICE_AGENT_AUTH_UNSPECIFIED = 0 # Use [ID # token](https://cloud.google.com/docs/authentication/token-types#id) # generated from service agent. This can be used to access Cloud # Function and Cloud Run after you grant Invoker role to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ID_TOKEN = 1 # Use [access # token](https://cloud.google.com/docs/authentication/token-types#access) # generated from service agent. This can be used to access other Google # Cloud APIs after you grant required roles to # `service-<PROJECT-NUMBER>@gcp-sa-dialogflow.iam.gserviceaccount.com`. ACCESS_TOKEN = 2 end end # Config for authentication using bearer token. # @!attribute [rw] token # @return [::String] # Optional. The text token appended to the text `Bearer` to the request # Authorization header. # [Session parameters # reference](https://cloud.google.com/dialogflow/cx/docs/concept/parameter#session-ref) # can be used to pass the token dynamically, e.g. # `$session.params.parameter-id`. # @!attribute [rw] secret_version_for_token # @return [::String] # Optional. The name of the SecretManager secret version resource storing # the Bearer token. If this field is set, the `token` field will be # ignored. Format: # `projects/{project}/secrets/{secret}/versions/{version}` class BearerTokenConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for authentication using a service account. # @!attribute [rw] service_account # @return [::String] # Required. The email address of the service account used to authenticate # the tool call. Dialogflow uses this service account to exchange an # access token and the access token is then sent in the `Authorization` # header of the tool request. # # The service account must have the # `roles/iam.serviceAccountTokenCreator` role granted to the # [Dialogflow service # agent](https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent). class ServiceAccountAuthConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The location of the API key in the request. module RequestLocation # Default value. This value is unused. REQUEST_LOCATION_UNSPECIFIED = 0 # Represents the key in http header. HEADER = 1 # Represents the key in query string. QUERY_STRING = 2 end end # The TLS configuration. # @!attribute [rw] ca_certs # @return [::Array<::Google::Cloud::Dialogflow::CX::V3::Tool::TLSConfig::CACert>] # Required. Specifies a list of allowed custom CA certificates for HTTPS # verification. class TLSConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # The CA certificate. # @!attribute [rw] display_name # @return [::String] # Required. The name of the allowed custom CA certificates. This # can be used to disambiguate the custom CA certificates. # @!attribute [rw] cert # @return [::String] # Required. The allowed custom CA certificates (in DER format) for # HTTPS 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 \ # -out example.com.crt \ # -extfile <(printf "\nsubjectAltName='DNS:www.example.com'") # ``` class CACert include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end end # Configuration for tools using Service Directory. # @!attribute [rw] service # @return [::String] # Required. The name of [Service # Directory](https://cloud.google.com/service-directory) service. # Format: # `projects/<ProjectID>/locations/<LocationID>/namespaces/<NamespaceID>/services/<ServiceID>`. # `LocationID` of the service directory must be the same as the location # of the agent. class ServiceDirectoryConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Represents the type of the tool. module ToolType # Default value. This value is unused. TOOL_TYPE_UNSPECIFIED = 0 # Customer provided tool. CUSTOMIZED_TOOL = 1 # First party built-in tool created by Dialogflow which cannot be modified. BUILTIN_TOOL = 2 end end |