feat: Add new gcloud commands, API clients, and third-party libraries across various services.

This commit is contained in:
2026-01-01 20:26:35 +01:00
parent 5e23cbece0
commit a19e592eb7
25221 changed files with 8324611 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
# -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""The gcloud dialogflow intents command group."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from googlecloudsdk.calliope import base
@base.ReleaseTracks(base.ReleaseTrack.ALPHA)
class Intents(base.Group):
"""Create, list, describe, and delete Dialogflow intents.
Intents convert a number of user expressions or patterns into an action. An
action is an extraction of a user command or sentence semantics.
"""

View File

@@ -0,0 +1,56 @@
flags:
priority:
arg_name: priority
api_field: googleCloudDialogflowV2Intent.priority
help_text: |
Priority of the intent.
Higher numbers represent higher priorities. Zero or negative numbers mean that the intent is
disabled. Default priority is 500000.
is_fallback:
arg_name: is-fallback
help_text: If true, set this intent as a fallback intent.
api_field: googleCloudDialogflowV2Intent.isFallback
type: bool
action: store_true
training_phrases:
arg_name: training-phrases
api_field: googleCloudDialogflowV2Intent.trainingPhrases
type: googlecloudsdk.command_lib.dialogflow.intents.hooks:TrainingPhrasesType
help_text: |
List of examples or templates.
Can be provided as comma separated unannotated examples or as a list training phrase objects.
To provide training phrase objects, specify the flag with `--flags-file`.
For example, use `--flags-file=flags.yaml`, where `flags.yaml` contains:
```
--training-phrases:
- type: TEMPLATE
parts:
- text: I love the color
- text: red
entityType: <entity_type_id>
alias: color
```
For more information on training phrases, see:
https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/Shared.Types/Intent#TrainingPhrase
For more information on `--flags-file`, see `gcloud topics flags-file`.
responses:
arg_name: responses
api_field: googleCloudDialogflowV2Intent.messages
type: googlecloudsdk.command_lib.dialogflow.intents.hooks:ResponseToMessage
help_text: |
Comma separated list of simple text responses to send to the user.
ml_enabled:
arg_name: ml-enabled
api_field: googleCloudDialogflowV2Intent.mlDisabled
type: bool
default: true
action: store_true
help_text: |
If true, enable machine learning for the intent.

View File

@@ -0,0 +1,45 @@
release_tracks: [ALPHA]
help_text:
brief: Create a Dialogflow entity type for the agent of the current project.
description: |
Create a Dialogflow intent for the agent of the current project.
examples: |
To create an intent with a training phrase and a response:
$ {command} --display-name="test-intent" --priority=1 --training-phrases="example query"
--responses="example response"
arguments:
resource:
help_text: The agent to create the entity type under.
spec: !REF googlecloudsdk.command_lib.dialogflow.resources:agent
is_parent_resource: true
params:
- arg_name: display-name
api_field: googleCloudDialogflowV2Intent.displayName
required: true
help_text: Human-readable name for the intent.
- _COMMON_: flags.priority
- _COMMON_: flags.is_fallback
- _COMMON_: flags.training_phrases
- _COMMON_: flags.responses
- _COMMON_: flags.ml_enabled
- arg_name: other-properties
type: "googlecloudsdk.calliope.arg_parsers:ArgDict:"
metavar: KEY=VALUE
help_text: |
Map containing other properties to set on the intent.
For more information on available properties, see:
https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/v2/projects.agent.intents
To set complex types, specify this flag with `--flags-file`. For more information, see
`gcloud topics flags-file`.
Other flags take precedence over properties specified here.
request:
collection: dialogflow.projects.agent.intents
display_resource_type: intent
modify_request_hooks:
- googlecloudsdk.command_lib.dialogflow.intents.hooks:AddOtherPropertiesToRequest

View File

@@ -0,0 +1,17 @@
release_tracks: [ALPHA]
help_text:
brief: Delete a Dialogflow intent.
description: Delete a Dialogflow intent.
examples: |
To delete an intent:
$ {command} 12345678-1234-1234-1234-1234567890ab
arguments:
resource:
help_text: Intent to delete.
spec: !REF googlecloudsdk.command_lib.dialogflow.resources:intent
request:
collection: dialogflow.projects.agent.intents

View File

@@ -0,0 +1,17 @@
release_tracks: [ALPHA]
help_text:
brief: Describe a Dialogflow intent.
description: Describe a Dialogflow intent.
examples: |
To describe an intent:
$ {command} 12345678-1234-1234-1234-1234567890ab
arguments:
resource:
help_text: Intent to describe.
spec: !REF googlecloudsdk.command_lib.dialogflow.resources:intent
request:
collection: dialogflow.projects.agent.intents

View File

@@ -0,0 +1,27 @@
release_tracks: [ALPHA]
help_text:
brief: |
List all Dialogflow intents for the agent of the current project.
description: |
List all Dialogflow intents for the agent of the current project.
examples: |
To list all intents for the current project:
$ {command}
arguments:
resource:
help_text: The agent to list the intents under.
spec: !REF googlecloudsdk.command_lib.dialogflow.resources:agent
override_resource_collection: true
request:
collection: dialogflow.projects.agent.intents
response:
id_field: name
output:
format: |
table(name.basename(), displayName, priority)

View File

@@ -0,0 +1,40 @@
release_tracks: [ALPHA]
help_text:
brief: Update a Dialogflow entity type for the agent of the current project.
description: |
Update a Dialogflow intent for the agent of the current project.
examples: |
To update the training phrases of an intent:
$ {command} 12345678-1234-1234-1234-1234567890ab --training-phrases="example query"
arguments:
resource:
help_text: Intent to update.
spec: !REF googlecloudsdk.command_lib.dialogflow.resources:intent
params:
- _COMMON_: flags.priority
- _COMMON_: flags.is_fallback
- _COMMON_: flags.training_phrases
- _COMMON_: flags.responses
- _COMMON_: flags.ml_enabled
- arg_name: other-properties
metavar: KEY=VALUE
type: "googlecloudsdk.calliope.arg_parsers:ArgDict:"
help_text: |
Map containing other properties to set on the intent.
Only the properties specified will be updated.
For more information on available properties, see:
https://cloud.google.com/dialogflow-enterprise/docs/reference/rest/Shared.Types/Intent
To set complex types, specify this flag with `--flags-file`. For more information, see
`gcloud topics flags-file`.
Other flags take precedence over properties specified here.
request:
collection: dialogflow.projects.agent.intents
modify_request_hooks:
- googlecloudsdk.command_lib.dialogflow.intents.hooks:AddOtherPropertiesToRequest