From c5272ffd954eb42e6ed78cb17300737c36d1e9b1 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Fri, 20 Jan 2023 13:27:24 -0500 Subject: [PATCH] docs: Add documentation for enums (#611) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: Add documentation for enums fix: Add context manager return types chore: Update gapic-generator-python to v1.8.1 PiperOrigin-RevId: 503210727 Source-Link: https://github.com/googleapis/googleapis/commit/a391fd1dac18dfdfa00c18c8404f2c3a6ff8e98e Source-Link: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot --- .../dialogflow_v2/services/agents/client.py | 2 +- .../services/answer_records/client.py | 2 +- .../dialogflow_v2/services/contexts/client.py | 2 +- .../services/conversation_datasets/client.py | 2 +- .../services/conversation_models/client.py | 2 +- .../services/conversation_profiles/client.py | 2 +- .../services/conversations/client.py | 2 +- .../services/documents/client.py | 2 +- .../services/entity_types/client.py | 2 +- .../services/environments/client.py | 2 +- .../services/fulfillments/client.py | 2 +- .../dialogflow_v2/services/intents/client.py | 2 +- .../services/knowledge_bases/client.py | 2 +- .../services/participants/client.py | 2 +- .../services/session_entity_types/client.py | 2 +- .../dialogflow_v2/services/sessions/client.py | 2 +- .../dialogflow_v2/services/versions/client.py | 2 +- google/cloud/dialogflow_v2/types/agent.py | 42 ++++- .../dialogflow_v2/types/answer_record.py | 46 ++++- .../cloud/dialogflow_v2/types/audio_config.py | 153 ++++++++++++++- .../cloud/dialogflow_v2/types/conversation.py | 23 ++- .../dialogflow_v2/types/conversation_event.py | 36 +++- .../dialogflow_v2/types/conversation_model.py | 78 +++++++- .../types/conversation_profile.py | 24 ++- google/cloud/dialogflow_v2/types/document.py | 58 +++++- .../cloud/dialogflow_v2/types/entity_type.py | 26 ++- .../cloud/dialogflow_v2/types/environment.py | 10 + .../cloud/dialogflow_v2/types/fulfillment.py | 9 +- google/cloud/dialogflow_v2/types/intent.py | 127 ++++++++++++- .../cloud/dialogflow_v2/types/participant.py | 26 ++- google/cloud/dialogflow_v2/types/session.py | 20 +- .../types/session_entity_type.py | 24 ++- .../dialogflow_v2/types/validation_result.py | 17 +- google/cloud/dialogflow_v2/types/version.py | 14 +- .../services/agents/client.py | 2 +- .../services/answer_records/client.py | 2 +- .../services/contexts/client.py | 2 +- .../services/conversation_profiles/client.py | 2 +- .../services/conversations/client.py | 2 +- .../services/documents/client.py | 2 +- .../services/entity_types/client.py | 2 +- .../services/environments/client.py | 2 +- .../services/fulfillments/client.py | 2 +- .../services/intents/client.py | 2 +- .../services/knowledge_bases/client.py | 2 +- .../services/participants/client.py | 2 +- .../services/session_entity_types/client.py | 2 +- .../services/sessions/client.py | 2 +- .../services/versions/client.py | 2 +- .../cloud/dialogflow_v2beta1/types/agent.py | 42 ++++- .../dialogflow_v2beta1/types/answer_record.py | 46 ++++- .../dialogflow_v2beta1/types/audio_config.py | 153 ++++++++++++++- .../dialogflow_v2beta1/types/conversation.py | 23 ++- .../types/conversation_event.py | 36 +++- .../types/conversation_profile.py | 11 +- .../dialogflow_v2beta1/types/document.py | 61 +++++- .../dialogflow_v2beta1/types/entity_type.py | 26 ++- .../dialogflow_v2beta1/types/environment.py | 10 + .../dialogflow_v2beta1/types/fulfillment.py | 9 +- .../cloud/dialogflow_v2beta1/types/intent.py | 174 +++++++++++++++++- .../dialogflow_v2beta1/types/participant.py | 42 ++++- .../cloud/dialogflow_v2beta1/types/session.py | 41 ++++- .../types/session_entity_type.py | 24 ++- .../types/validation_result.py | 17 +- .../cloud/dialogflow_v2beta1/types/version.py | 14 +- ...t_metadata_google.cloud.dialogflow.v2.json | 2 +- ...adata_google.cloud.dialogflow.v2beta1.json | 2 +- 67 files changed, 1437 insertions(+), 93 deletions(-) diff --git a/google/cloud/dialogflow_v2/services/agents/client.py b/google/cloud/dialogflow_v2/services/agents/client.py index c02659b9e..6b774db6e 100644 --- a/google/cloud/dialogflow_v2/services/agents/client.py +++ b/google/cloud/dialogflow_v2/services/agents/client.py @@ -1494,7 +1494,7 @@ def sample_get_validation_result(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "AgentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/answer_records/client.py b/google/cloud/dialogflow_v2/services/answer_records/client.py index 70990681c..639cafa98 100644 --- a/google/cloud/dialogflow_v2/services/answer_records/client.py +++ b/google/cloud/dialogflow_v2/services/answer_records/client.py @@ -705,7 +705,7 @@ def sample_update_answer_record(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "AnswerRecordsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/contexts/client.py b/google/cloud/dialogflow_v2/services/contexts/client.py index 4e0f7bd8e..69c106a92 100644 --- a/google/cloud/dialogflow_v2/services/contexts/client.py +++ b/google/cloud/dialogflow_v2/services/contexts/client.py @@ -1148,7 +1148,7 @@ def sample_delete_all_contexts(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "ContextsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/conversation_datasets/client.py b/google/cloud/dialogflow_v2/services/conversation_datasets/client.py index c3b1f8427..6b009b27e 100644 --- a/google/cloud/dialogflow_v2/services/conversation_datasets/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_datasets/client.py @@ -1092,7 +1092,7 @@ def sample_import_conversation_data(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationDatasetsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/conversation_models/client.py b/google/cloud/dialogflow_v2/services/conversation_models/client.py index d4b65fd81..a3d37fb80 100644 --- a/google/cloud/dialogflow_v2/services/conversation_models/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_models/client.py @@ -1631,7 +1631,7 @@ def sample_create_conversation_model_evaluation(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationModelsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/conversation_profiles/client.py b/google/cloud/dialogflow_v2/services/conversation_profiles/client.py index b57c14313..a84f272ad 100644 --- a/google/cloud/dialogflow_v2/services/conversation_profiles/client.py +++ b/google/cloud/dialogflow_v2/services/conversation_profiles/client.py @@ -1432,7 +1432,7 @@ def sample_clear_suggestion_feature_config(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationProfilesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/conversations/client.py b/google/cloud/dialogflow_v2/services/conversations/client.py index 66b87db5b..854cc7f52 100644 --- a/google/cloud/dialogflow_v2/services/conversations/client.py +++ b/google/cloud/dialogflow_v2/services/conversations/client.py @@ -1214,7 +1214,7 @@ def sample_suggest_conversation_summary(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/documents/client.py b/google/cloud/dialogflow_v2/services/documents/client.py index 270dc1c6b..9f6e8a1b9 100644 --- a/google/cloud/dialogflow_v2/services/documents/client.py +++ b/google/cloud/dialogflow_v2/services/documents/client.py @@ -1487,7 +1487,7 @@ def sample_export_document(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "DocumentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/entity_types/client.py b/google/cloud/dialogflow_v2/services/entity_types/client.py index c63f4ffe8..79dd9ed19 100644 --- a/google/cloud/dialogflow_v2/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/entity_types/client.py @@ -1843,7 +1843,7 @@ def sample_batch_delete_entities(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EntityTypesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/environments/client.py b/google/cloud/dialogflow_v2/services/environments/client.py index 9d6d328b0..602be93f6 100644 --- a/google/cloud/dialogflow_v2/services/environments/client.py +++ b/google/cloud/dialogflow_v2/services/environments/client.py @@ -1073,7 +1073,7 @@ def sample_get_environment_history(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EnvironmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/fulfillments/client.py b/google/cloud/dialogflow_v2/services/fulfillments/client.py index bbbb221d0..06663489f 100644 --- a/google/cloud/dialogflow_v2/services/fulfillments/client.py +++ b/google/cloud/dialogflow_v2/services/fulfillments/client.py @@ -677,7 +677,7 @@ def sample_update_fulfillment(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "FulfillmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/intents/client.py b/google/cloud/dialogflow_v2/services/intents/client.py index 6c89fb837..d7138d3ac 100644 --- a/google/cloud/dialogflow_v2/services/intents/client.py +++ b/google/cloud/dialogflow_v2/services/intents/client.py @@ -1412,7 +1412,7 @@ def sample_batch_delete_intents(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "IntentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/knowledge_bases/client.py b/google/cloud/dialogflow_v2/services/knowledge_bases/client.py index bdcbf0bfb..f25b807d7 100644 --- a/google/cloud/dialogflow_v2/services/knowledge_bases/client.py +++ b/google/cloud/dialogflow_v2/services/knowledge_bases/client.py @@ -1027,7 +1027,7 @@ def sample_update_knowledge_base(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "KnowledgeBasesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/participants/client.py b/google/cloud/dialogflow_v2/services/participants/client.py index a04af4abb..d266a992a 100644 --- a/google/cloud/dialogflow_v2/services/participants/client.py +++ b/google/cloud/dialogflow_v2/services/participants/client.py @@ -1597,7 +1597,7 @@ def sample_suggest_smart_replies(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ParticipantsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/session_entity_types/client.py b/google/cloud/dialogflow_v2/services/session_entity_types/client.py index de976fc10..f012f1f61 100644 --- a/google/cloud/dialogflow_v2/services/session_entity_types/client.py +++ b/google/cloud/dialogflow_v2/services/session_entity_types/client.py @@ -1082,7 +1082,7 @@ def sample_delete_session_entity_type(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "SessionEntityTypesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/sessions/client.py b/google/cloud/dialogflow_v2/services/sessions/client.py index 0167ef18e..ad1c918ad 100644 --- a/google/cloud/dialogflow_v2/services/sessions/client.py +++ b/google/cloud/dialogflow_v2/services/sessions/client.py @@ -801,7 +801,7 @@ def request_generator(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "SessionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/services/versions/client.py b/google/cloud/dialogflow_v2/services/versions/client.py index f6f0f7368..ccdd50d0e 100644 --- a/google/cloud/dialogflow_v2/services/versions/client.py +++ b/google/cloud/dialogflow_v2/services/versions/client.py @@ -1049,7 +1049,7 @@ def sample_delete_version(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "VersionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2/types/agent.py b/google/cloud/dialogflow_v2/types/agent.py index fcf039f91..e6cd85a35 100644 --- a/google/cloud/dialogflow_v2/types/agent.py +++ b/google/cloud/dialogflow_v2/types/agent.py @@ -111,20 +111,58 @@ class Agent(proto.Message): class MatchMode(proto.Enum): r"""Match mode determines how intents are detected from user queries. + + Values: + MATCH_MODE_UNSPECIFIED (0): + Not specified. + MATCH_MODE_HYBRID (1): + Best for agents with a small number of + examples in intents and/or wide use of templates + syntax and composite entities. + MATCH_MODE_ML_ONLY (2): + Can be used for agents with a large number of + examples in intents, especially the ones using + @sys.any or very large custom entities. """ MATCH_MODE_UNSPECIFIED = 0 MATCH_MODE_HYBRID = 1 MATCH_MODE_ML_ONLY = 2 class ApiVersion(proto.Enum): - r"""API version for the agent.""" + r"""API version for the agent. + + Values: + API_VERSION_UNSPECIFIED (0): + Not specified. + API_VERSION_V1 (1): + Legacy V1 API. + API_VERSION_V2 (2): + V2 API. + API_VERSION_V2_BETA_1 (3): + V2beta1 API. + """ API_VERSION_UNSPECIFIED = 0 API_VERSION_V1 = 1 API_VERSION_V2 = 2 API_VERSION_V2_BETA_1 = 3 class Tier(proto.Enum): - r"""Represents the agent tier.""" + r"""Represents the agent tier. + + Values: + TIER_UNSPECIFIED (0): + Not specified. This value should never be + used. + TIER_STANDARD (1): + Trial Edition, previously known as Standard + Edition. + TIER_ENTERPRISE (2): + Essentials Edition, previously known as + Enterprise Essential Edition. + TIER_ENTERPRISE_PLUS (3): + Essentials Edition (same as TIER_ENTERPRISE), previously + known as Enterprise Plus Edition. + """ TIER_UNSPECIFIED = 0 TIER_STANDARD = 1 TIER_ENTERPRISE = 2 diff --git a/google/cloud/dialogflow_v2/types/answer_record.py b/google/cloud/dialogflow_v2/types/answer_record.py index 91c82cdbe..f8b9fd7b7 100644 --- a/google/cloud/dialogflow_v2/types/answer_record.py +++ b/google/cloud/dialogflow_v2/types/answer_record.py @@ -231,7 +231,18 @@ class AnswerFeedback(proto.Message): """ class CorrectnessLevel(proto.Enum): - r"""The correctness level of an answer.""" + r"""The correctness level of an answer. + + Values: + CORRECTNESS_LEVEL_UNSPECIFIED (0): + Correctness level unspecified. + NOT_CORRECT (1): + Answer is totally wrong. + PARTIALLY_CORRECT (2): + Answer is partially correct. + FULLY_CORRECT (3): + Answer is fully correct. + """ CORRECTNESS_LEVEL_UNSPECIFIED = 0 NOT_CORRECT = 1 PARTIALLY_CORRECT = 2 @@ -308,19 +319,46 @@ class AgentAssistantFeedback(proto.Message): """ class AnswerRelevance(proto.Enum): - r"""Relevance of an answer.""" + r"""Relevance of an answer. + + Values: + ANSWER_RELEVANCE_UNSPECIFIED (0): + Answer relevance unspecified. + IRRELEVANT (1): + Answer is irrelevant to query. + RELEVANT (2): + Answer is relevant to query. + """ ANSWER_RELEVANCE_UNSPECIFIED = 0 IRRELEVANT = 1 RELEVANT = 2 class DocumentCorrectness(proto.Enum): - r"""Correctness of document.""" + r"""Correctness of document. + + Values: + DOCUMENT_CORRECTNESS_UNSPECIFIED (0): + Document correctness unspecified. + INCORRECT (1): + Information in document is incorrect. + CORRECT (2): + Information in document is correct. + """ DOCUMENT_CORRECTNESS_UNSPECIFIED = 0 INCORRECT = 1 CORRECT = 2 class DocumentEfficiency(proto.Enum): - r"""Efficiency of document.""" + r"""Efficiency of document. + + Values: + DOCUMENT_EFFICIENCY_UNSPECIFIED (0): + Document efficiency unspecified. + INEFFICIENT (1): + Document is inefficient. + EFFICIENT (2): + Document is efficient. + """ DOCUMENT_EFFICIENCY_UNSPECIFIED = 0 INEFFICIENT = 1 EFFICIENT = 2 diff --git a/google/cloud/dialogflow_v2/types/audio_config.py b/google/cloud/dialogflow_v2/types/audio_config.py index 09f6129ca..704ff8b9a 100644 --- a/google/cloud/dialogflow_v2/types/audio_config.py +++ b/google/cloud/dialogflow_v2/types/audio_config.py @@ -43,6 +43,50 @@ class AudioEncoding(proto.Enum): request. Refer to the `Cloud Speech API documentation `__ for more details. + + Values: + AUDIO_ENCODING_UNSPECIFIED (0): + Not specified. + AUDIO_ENCODING_LINEAR_16 (1): + Uncompressed 16-bit signed little-endian + samples (Linear PCM). + AUDIO_ENCODING_FLAC (2): + ```FLAC`` `__ + (Free Lossless Audio Codec) is the recommended encoding + because it is lossless (therefore recognition is not + compromised) and requires only about half the bandwidth of + ``LINEAR16``. ``FLAC`` stream encoding supports 16-bit and + 24-bit samples, however, not all fields in ``STREAMINFO`` + are supported. + AUDIO_ENCODING_MULAW (3): + 8-bit samples that compand 14-bit audio + samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_AMR (4): + Adaptive Multi-Rate Narrowband codec. ``sample_rate_hertz`` + must be 8000. + AUDIO_ENCODING_AMR_WB (5): + Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` + must be 16000. + AUDIO_ENCODING_OGG_OPUS (6): + Opus encoded audio frames in Ogg container + (`OggOpus `__). + ``sample_rate_hertz`` must be 16000. + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (7): + Although the use of lossy encodings is not recommended, if a + very low bitrate encoding is required, ``OGG_OPUS`` is + highly preferred over Speex encoding. The + `Speex `__ encoding supported by + Dialogflow API has a header byte in each block, as in MIME + type ``audio/x-speex-with-header-byte``. It is a variant of + the RTP Speex encoding defined in `RFC + 5574 `__. The stream is + a sequence of blocks, one block per RTP packet. Each block + starts with a byte containing the length of the block, in + bytes, followed by one or more frames of Speex data, padded + to an integral number of bytes (octets) as specified in RFC + 5574. In other words, each RTP header is replaced with a + single byte containing the block length. Only Speex wideband + is supported. ``sample_rate_hertz`` must be 16000. """ AUDIO_ENCODING_UNSPECIFIED = 0 AUDIO_ENCODING_LINEAR_16 = 1 @@ -64,6 +108,40 @@ class SpeechModelVariant(proto.Enum): "phone_call" model has both a standard and an enhanced variant. When you use an enhanced model, you will generally receive higher quality results than for a standard model. + + Values: + SPEECH_MODEL_VARIANT_UNSPECIFIED (0): + No model variant specified. In this case Dialogflow defaults + to USE_BEST_AVAILABLE. + USE_BEST_AVAILABLE (1): + Use the best available variant of the [Speech + model][InputAudioConfig.model] that the caller is eligible + for. + + Please see the `Dialogflow + docs `__ + for how to make your project eligible for enhanced models. + USE_STANDARD (2): + Use standard model variant even if an enhanced model is + available. See the `Cloud Speech + documentation `__ + for details about enhanced models. + USE_ENHANCED (3): + Use an enhanced model variant: + + - If an enhanced variant does not exist for the given + [model][google.cloud.dialogflow.v2.InputAudioConfig.model] + and request language, Dialogflow falls back to the + standard variant. + + The `Cloud Speech + documentation `__ + describes which models have enhanced variants. + + - If the API caller isn't eligible for enhanced models, + Dialogflow returns an error. Please see the `Dialogflow + docs `__ + for how to make your project eligible. """ SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 USE_BEST_AVAILABLE = 1 @@ -74,6 +152,18 @@ class SpeechModelVariant(proto.Enum): class SsmlVoiceGender(proto.Enum): r"""Gender of the voice as described in `SSML voice element `__. + + Values: + SSML_VOICE_GENDER_UNSPECIFIED (0): + An unspecified gender, which means that the + client doesn't care which gender the selected + voice will have. + SSML_VOICE_GENDER_MALE (1): + A male voice. + SSML_VOICE_GENDER_FEMALE (2): + A female voice. + SSML_VOICE_GENDER_NEUTRAL (3): + A gender-neutral voice. """ SSML_VOICE_GENDER_UNSPECIFIED = 0 SSML_VOICE_GENDER_MALE = 1 @@ -82,7 +172,30 @@ class SsmlVoiceGender(proto.Enum): class OutputAudioEncoding(proto.Enum): - r"""Audio encoding of the output audio format in Text-To-Speech.""" + r"""Audio encoding of the output audio format in Text-To-Speech. + + Values: + OUTPUT_AUDIO_ENCODING_UNSPECIFIED (0): + Not specified. + OUTPUT_AUDIO_ENCODING_LINEAR_16 (1): + Uncompressed 16-bit signed little-endian + samples (Linear PCM). Audio content returned as + LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_MP3 (2): + MP3 audio at 32kbps. + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS (4): + MP3 audio at 64kbps. + OUTPUT_AUDIO_ENCODING_OGG_OPUS (3): + Opus encoded audio wrapped in an ogg + container. The result will be a file which can + be played natively on Android, and in browsers + (at least Chrome and Firefox). The quality of + the encoding is considerably higher than MP3 + while using approximately the same bitrate. + OUTPUT_AUDIO_ENCODING_MULAW (5): + 8-bit samples that compand 14-bit audio + samples using G.711 PCMU/mu-law. + """ OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0 OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1 OUTPUT_AUDIO_ENCODING_MP3 = 2 @@ -94,6 +207,44 @@ class OutputAudioEncoding(proto.Enum): class TelephonyDtmf(proto.Enum): r"""`DTMF `__ digit in Telephony Gateway. + + Values: + TELEPHONY_DTMF_UNSPECIFIED (0): + Not specified. This value may be used to + indicate an absent digit. + DTMF_ONE (1): + Number: '1'. + DTMF_TWO (2): + Number: '2'. + DTMF_THREE (3): + Number: '3'. + DTMF_FOUR (4): + Number: '4'. + DTMF_FIVE (5): + Number: '5'. + DTMF_SIX (6): + Number: '6'. + DTMF_SEVEN (7): + Number: '7'. + DTMF_EIGHT (8): + Number: '8'. + DTMF_NINE (9): + Number: '9'. + DTMF_ZERO (10): + Number: '0'. + DTMF_A (11): + Letter: 'A'. + DTMF_B (12): + Letter: 'B'. + DTMF_C (13): + Letter: 'C'. + DTMF_D (14): + Letter: 'D'. + DTMF_STAR (15): + Asterisk/star: '*'. + DTMF_POUND (16): + Pound/diamond/hash/square/gate/octothorpe: + '#'. """ TELEPHONY_DTMF_UNSPECIFIED = 0 DTMF_ONE = 1 diff --git a/google/cloud/dialogflow_v2/types/conversation.py b/google/cloud/dialogflow_v2/types/conversation.py index 849082d51..6831167fe 100644 --- a/google/cloud/dialogflow_v2/types/conversation.py +++ b/google/cloud/dialogflow_v2/types/conversation.py @@ -87,7 +87,17 @@ class Conversation(proto.Message): """ class LifecycleState(proto.Enum): - r"""Enumeration of the completion status of the conversation.""" + r"""Enumeration of the completion status of the conversation. + + Values: + LIFECYCLE_STATE_UNSPECIFIED (0): + Unknown. + IN_PROGRESS (1): + Conversation is currently open for media + analysis. + COMPLETED (2): + Conversation has been completed. + """ LIFECYCLE_STATE_UNSPECIFIED = 0 IN_PROGRESS = 1 COMPLETED = 2 @@ -96,6 +106,17 @@ class ConversationStage(proto.Enum): r"""Enumeration of the different conversation stages a conversation can be in. Reference: https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages + + Values: + CONVERSATION_STAGE_UNSPECIFIED (0): + Unknown. Should never be used after a + conversation is successfully created. + VIRTUAL_AGENT_STAGE (1): + The conversation should return virtual agent + responses into the conversation. + HUMAN_ASSIST_STAGE (2): + The conversation should not provide + responses, just listen and provide suggestions. """ CONVERSATION_STAGE_UNSPECIFIED = 0 VIRTUAL_AGENT_STAGE = 1 diff --git a/google/cloud/dialogflow_v2/types/conversation_event.py b/google/cloud/dialogflow_v2/types/conversation_event.py index 0b27bfc8c..d553db4dd 100644 --- a/google/cloud/dialogflow_v2/types/conversation_event.py +++ b/google/cloud/dialogflow_v2/types/conversation_event.py @@ -53,7 +53,41 @@ class ConversationEvent(proto.Message): """ class Type(proto.Enum): - r"""Enumeration of the types of events available.""" + r"""Enumeration of the types of events available. + + Values: + TYPE_UNSPECIFIED (0): + Type not set. + CONVERSATION_STARTED (1): + A new conversation has been opened. This is + fired when a telephone call is answered, or a + conversation is created via the API. + CONVERSATION_FINISHED (2): + An existing conversation has closed. This is + fired when a telephone call is terminated, or a + conversation is closed via the API. + HUMAN_INTERVENTION_NEEDED (3): + An existing conversation has received + notification from Dialogflow that human + intervention is required. + NEW_MESSAGE (5): + An existing conversation has received a new message, either + from API or telephony. It is configured in + [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2.ConversationProfile.new_message_event_notification_config] + UNRECOVERABLE_ERROR (4): + Unrecoverable error during a telephone call. + + In general non-recoverable errors only occur if something + was misconfigured in the ConversationProfile corresponding + to the call. After a non-recoverable error, Dialogflow may + stop responding. + + We don't fire this event: + + - in an API call because we can directly return the error, + or, + - when we can recover from an error. + """ TYPE_UNSPECIFIED = 0 CONVERSATION_STARTED = 1 CONVERSATION_FINISHED = 2 diff --git a/google/cloud/dialogflow_v2/types/conversation_model.py b/google/cloud/dialogflow_v2/types/conversation_model.py index 268b50889..a1a3d6126 100644 --- a/google/cloud/dialogflow_v2/types/conversation_model.py +++ b/google/cloud/dialogflow_v2/types/conversation_model.py @@ -90,7 +90,33 @@ class ConversationModel(proto.Message): """ class State(proto.Enum): - r"""State of the model.""" + r"""State of the model. + + Values: + STATE_UNSPECIFIED (0): + Should not be used, an un-set enum has this + value by default. + CREATING (1): + Model being created. + UNDEPLOYED (2): + Model is not deployed but ready to deploy. + DEPLOYING (3): + Model is deploying. + DEPLOYED (4): + Model is deployed and ready to use. + UNDEPLOYING (5): + Model is undeploying. + DELETING (6): + Model is deleting. + FAILED (7): + Model is in error state. Not ready to deploy + and use. + PENDING (8): + Model is being created but the training has + not started, The model may remain in this state + until there is enough capacity to start + training. + """ STATE_UNSPECIFIED = 0 CREATING = 1 UNDEPLOYED = 2 @@ -102,7 +128,16 @@ class State(proto.Enum): PENDING = 8 class ModelType(proto.Enum): - r"""Model type.""" + r"""Model type. + + Values: + MODEL_TYPE_UNSPECIFIED (0): + ModelType unspecified. + SMART_REPLY_DUAL_ENCODER_MODEL (2): + ModelType smart reply dual encoder model. + SMART_REPLY_BERT_MODEL (6): + ModelType smart reply bert model. + """ MODEL_TYPE_UNSPECIFIED = 0 SMART_REPLY_DUAL_ENCODER_MODEL = 2 SMART_REPLY_BERT_MODEL = 6 @@ -682,7 +717,27 @@ class CreateConversationModelOperationMetadata(proto.Message): """ class State(proto.Enum): - r"""State of CreateConversationModel operation.""" + r"""State of CreateConversationModel operation. + + Values: + STATE_UNSPECIFIED (0): + Invalid. + PENDING (1): + Request is submitted, but training has not + started yet. The model may remain in this state + until there is enough capacity to start + training. + SUCCEEDED (2): + The training has succeeded. + FAILED (3): + The training has succeeded. + CANCELLED (4): + The training has been cancelled. + CANCELLING (5): + The training is in cancelling state. + TRAINING (6): + Custom model is training. + """ STATE_UNSPECIFIED = 0 PENDING = 1 SUCCEEDED = 2 @@ -806,7 +861,22 @@ class CreateConversationModelEvaluationOperationMetadata(proto.Message): """ class State(proto.Enum): - r"""State of CreateConversationModel operation.""" + r"""State of CreateConversationModel operation. + + Values: + STATE_UNSPECIFIED (0): + Operation status not specified. + INITIALIZING (1): + The operation is being prepared. + RUNNING (2): + The operation is running. + CANCELLED (3): + The operation is cancelled. + SUCCEEDED (4): + The operation has succeeded. + FAILED (5): + The operation has failed. + """ STATE_UNSPECIFIED = 0 INITIALIZING = 1 RUNNING = 2 diff --git a/google/cloud/dialogflow_v2/types/conversation_profile.py b/google/cloud/dialogflow_v2/types/conversation_profile.py index f0d623bfc..88d84b2b9 100644 --- a/google/cloud/dialogflow_v2/types/conversation_profile.py +++ b/google/cloud/dialogflow_v2/types/conversation_profile.py @@ -866,7 +866,16 @@ class NotificationConfig(proto.Message): """ class MessageFormat(proto.Enum): - r"""Format of cloud pub/sub message.""" + r"""Format of cloud pub/sub message. + + Values: + MESSAGE_FORMAT_UNSPECIFIED (0): + If it is unspecified, PROTO will be used. + PROTO (1): + Pub/Sub message will be serialized proto. + JSON (2): + Pub/Sub message will be json. + """ MESSAGE_FORMAT_UNSPECIFIED = 0 PROTO = 1 JSON = 2 @@ -912,7 +921,18 @@ class SuggestionFeature(proto.Message): """ class Type(proto.Enum): - r"""Defines the type of Human Agent Assistant feature.""" + r"""Defines the type of Human Agent Assistant feature. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + ARTICLE_SUGGESTION (1): + Run article suggestion model for chat. + FAQ (2): + Run FAQ model for chat. + SMART_REPLY (3): + Run smart reply model for chat. + """ TYPE_UNSPECIFIED = 0 ARTICLE_SUGGESTION = 1 FAQ = 2 diff --git a/google/cloud/dialogflow_v2/types/document.py b/google/cloud/dialogflow_v2/types/document.py index 0226e9bbe..b6112fd8f 100644 --- a/google/cloud/dialogflow_v2/types/document.py +++ b/google/cloud/dialogflow_v2/types/document.py @@ -128,7 +128,32 @@ class Document(proto.Message): """ class KnowledgeType(proto.Enum): - r"""The knowledge type of document content.""" + r"""The knowledge type of document content. + + Values: + KNOWLEDGE_TYPE_UNSPECIFIED (0): + The type is unspecified or arbitrary. + FAQ (1): + The document content contains question and + answer pairs as either HTML or CSV. Typical FAQ + HTML formats are parsed accurately, but unusual + formats may fail to be parsed. + + CSV must have questions in the first column and + answers in the second, with no header. Because + of this explicit format, they are always parsed + accurately. + EXTRACTIVE_QA (2): + Documents for which unstructured text is + extracted and used for question answering. + ARTICLE_SUGGESTION (3): + The entire document content as a whole can be + used for query results. Only for Contact Center + Solutions on Dialogflow. + AGENT_FACING_SMART_REPLY (4): + The document contains agent-facing Smart + Reply entries. + """ KNOWLEDGE_TYPE_UNSPECIFIED = 0 FAQ = 1 EXTRACTIVE_QA = 2 @@ -136,7 +161,22 @@ class KnowledgeType(proto.Enum): AGENT_FACING_SMART_REPLY = 4 class State(proto.Enum): - r"""Possible states of the document""" + r"""Possible states of the document + + Values: + STATE_UNSPECIFIED (0): + The document state is unspecified. + CREATING (1): + The document creation is in progress. + ACTIVE (2): + The document is active and ready to use. + UPDATING (3): + The document updation is in progress. + RELOADING (4): + The document is reloading. + DELETING (5): + The document deletion is in progress. + """ STATE_UNSPECIFIED = 0 CREATING = 1 ACTIVE = 2 @@ -616,7 +656,19 @@ class KnowledgeOperationMetadata(proto.Message): """ class State(proto.Enum): - r"""States of the operation.""" + r"""States of the operation. + + Values: + STATE_UNSPECIFIED (0): + State unspecified. + PENDING (1): + The operation has been created. + RUNNING (2): + The operation is currently running. + DONE (3): + The operation is done, either cancelled or + completed. + """ STATE_UNSPECIFIED = 0 PENDING = 1 RUNNING = 2 diff --git a/google/cloud/dialogflow_v2/types/entity_type.py b/google/cloud/dialogflow_v2/types/entity_type.py index 8d4412d58..2e6d723e3 100644 --- a/google/cloud/dialogflow_v2/types/entity_type.py +++ b/google/cloud/dialogflow_v2/types/entity_type.py @@ -78,7 +78,24 @@ class EntityType(proto.Message): """ class Kind(proto.Enum): - r"""Represents kinds of entities.""" + r"""Represents kinds of entities. + + Values: + KIND_UNSPECIFIED (0): + Not specified. This value should be never + used. + KIND_MAP (1): + Map entity types allow mapping of a group of + synonyms to a reference value. + KIND_LIST (2): + List entity types contain a set of entries + that do not map to reference values. However, + list entity types can contain references to + other entity types (with or without aliases). + KIND_REGEXP (3): + Regexp entity types allow to specify regular + expressions in entries values. + """ KIND_UNSPECIFIED = 0 KIND_MAP = 1 KIND_LIST = 2 @@ -89,6 +106,13 @@ class AutoExpansionMode(proto.Enum): expansion allows an agent to recognize values that have not been explicitly listed in the entity (for example, new kinds of shopping list items). + + Values: + AUTO_EXPANSION_MODE_UNSPECIFIED (0): + Auto expansion disabled for the entity. + AUTO_EXPANSION_MODE_DEFAULT (1): + Allows an agent to recognize values that have + not been explicitly listed in the entity. """ AUTO_EXPANSION_MODE_UNSPECIFIED = 0 AUTO_EXPANSION_MODE_DEFAULT = 1 diff --git a/google/cloud/dialogflow_v2/types/environment.py b/google/cloud/dialogflow_v2/types/environment.py index 16e8403ca..63c856a86 100644 --- a/google/cloud/dialogflow_v2/types/environment.py +++ b/google/cloud/dialogflow_v2/types/environment.py @@ -103,6 +103,16 @@ class State(proto.Enum): serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the ``RUNNING`` state. + + Values: + STATE_UNSPECIFIED (0): + Not specified. This value is not used. + STOPPED (1): + Stopped. + LOADING (2): + Loading. + RUNNING (3): + Running. """ STATE_UNSPECIFIED = 0 STOPPED = 1 diff --git a/google/cloud/dialogflow_v2/types/fulfillment.py b/google/cloud/dialogflow_v2/types/fulfillment.py index 6643c85b9..9f397663c 100644 --- a/google/cloud/dialogflow_v2/types/fulfillment.py +++ b/google/cloud/dialogflow_v2/types/fulfillment.py @@ -130,7 +130,14 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""The type of the feature.""" + r"""The type of the feature. + + Values: + TYPE_UNSPECIFIED (0): + Feature type not specified. + SMALLTALK (1): + Fulfillment is enabled for SmallTalk. + """ TYPE_UNSPECIFIED = 0 SMALLTALK = 1 diff --git a/google/cloud/dialogflow_v2/types/intent.py b/google/cloud/dialogflow_v2/types/intent.py index a8a7b4fa0..416edbd5f 100644 --- a/google/cloud/dialogflow_v2/types/intent.py +++ b/google/cloud/dialogflow_v2/types/intent.py @@ -45,6 +45,13 @@ class IntentView(proto.Enum): An intent can be a sizable object. Therefore, we provide a resource view that does not return training phrases in the response by default. + + Values: + INTENT_VIEW_UNSPECIFIED (0): + Training phrases field is not populated in + the response. + INTENT_VIEW_FULL (1): + All fields are populated. """ INTENT_VIEW_UNSPECIFIED = 0 INTENT_VIEW_FULL = 1 @@ -169,7 +176,20 @@ class Intent(proto.Message): """ class WebhookState(proto.Enum): - r"""Represents the different states that webhooks can be in.""" + r"""Represents the different states that webhooks can be in. + + Values: + WEBHOOK_STATE_UNSPECIFIED (0): + Webhook is disabled in the agent and in the + intent. + WEBHOOK_STATE_ENABLED (1): + Webhook is enabled in the agent and in the + intent. + WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING (2): + Webhook is enabled in the agent and in the + intent. Also, each slot filling prompt is + forwarded to the webhook. + """ WEBHOOK_STATE_UNSPECIFIED = 0 WEBHOOK_STATE_ENABLED = 1 WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 @@ -216,7 +236,25 @@ class TrainingPhrase(proto.Message): """ class Type(proto.Enum): - r"""Represents different types of training phrases.""" + r"""Represents different types of training phrases. + + Values: + TYPE_UNSPECIFIED (0): + Not specified. This value should never be + used. + EXAMPLE (1): + Examples do not contain @-prefixed entity + type names, but example parts can be annotated + with entity types. + TEMPLATE (2): + Templates are not annotated with entity + types, but they can contain @-prefixed entity + type names as substrings. Template mode has been + deprecated. Example mode is the only supported + way to create new training phrases. If you have + existing training phrases that you've created in + template mode, those will continue to work. + """ TYPE_UNSPECIFIED = 0 EXAMPLE = 1 TEMPLATE = 2 @@ -435,6 +473,29 @@ class Message(proto.Message): class Platform(proto.Enum): r"""The rich response message integration platform. See `Integrations `__. + + Values: + PLATFORM_UNSPECIFIED (0): + Default platform. + FACEBOOK (1): + Facebook. + SLACK (2): + Slack. + TELEGRAM (3): + Telegram. + KIK (4): + Kik. + SKYPE (5): + Skype. + LINE (6): + Line. + VIBER (7): + Viber. + ACTIONS_ON_GOOGLE (8): + Google Assistant See `Dialogflow webhook + format `__ + GOOGLE_HANGOUTS (11): + Google Hangouts. """ PLATFORM_UNSPECIFIED = 0 FACEBOOK = 1 @@ -880,7 +941,14 @@ class MediaContent(proto.Message): """ class ResponseMediaType(proto.Enum): - r"""Format of response media type.""" + r"""Format of response media type. + + Values: + RESPONSE_MEDIA_TYPE_UNSPECIFIED (0): + Unspecified. + AUDIO (1): + Response media type is audio. + """ RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0 AUDIO = 1 @@ -970,6 +1038,30 @@ class ImageDisplayOptions(proto.Enum): r"""Image display options for Actions on Google. This should be used for when the image's aspect ratio does not match the image container's aspect ratio. + + Values: + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED (0): + Fill the gaps between the image and the image + container with gray bars. + GRAY (1): + Fill the gaps between the image and the image + container with gray bars. + WHITE (2): + Fill the gaps between the image and the image + container with white bars. + CROPPED (3): + Image is scaled such that the image width and + height match or exceed the container dimensions. + This may crop the top and bottom of the image if + the scaled image height is greater than the + container height, or crop the left and right of + the image if the scaled image width is greater + than the container width. This is similar to + "Zoom Mode" on a widescreen TV when playing a + 4:3 video. + BLURRED_BACKGROUND (4): + Pad the gaps between image and image frame + with a blurred copy of the same image. """ IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0 GRAY = 1 @@ -1010,7 +1102,18 @@ class OpenUrlAction(proto.Message): """ class UrlTypeHint(proto.Enum): - r"""Type of the URI.""" + r"""Type of the URI. + + Values: + URL_TYPE_HINT_UNSPECIFIED (0): + Unspecified + AMP_ACTION (1): + Url would be an amp action + AMP_CONTENT (2): + URL that points directly to AMP content, or + to a canonical URL which refers to AMP content + via . + """ URL_TYPE_HINT_UNSPECIFIED = 0 AMP_ACTION = 1 AMP_CONTENT = 2 @@ -1127,7 +1230,21 @@ class ColumnProperties(proto.Message): """ class HorizontalAlignment(proto.Enum): - r"""Text alignments within a cell.""" + r"""Text alignments within a cell. + + Values: + HORIZONTAL_ALIGNMENT_UNSPECIFIED (0): + Text is aligned to the leading edge of the + column. + LEADING (1): + Text is aligned to the leading edge of the + column. + CENTER (2): + Text is centered in the column. + TRAILING (3): + Text is aligned to the trailing edge of the + column. + """ HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0 LEADING = 1 CENTER = 2 diff --git a/google/cloud/dialogflow_v2/types/participant.py b/google/cloud/dialogflow_v2/types/participant.py index 56932ae30..be37bb846 100644 --- a/google/cloud/dialogflow_v2/types/participant.py +++ b/google/cloud/dialogflow_v2/types/participant.py @@ -139,6 +139,18 @@ class Participant(proto.Message): class Role(proto.Enum): r"""Enumeration of the roles a participant can play in a conversation. + + Values: + ROLE_UNSPECIFIED (0): + Participant role not set. + HUMAN_AGENT (1): + Participant is a human agent. + AUTOMATED_AGENT (2): + Participant is an automated agent, such as a + Dialogflow agent. + END_USER (3): + Participant is an end user that has called or + chatted with Dialogflow services. """ ROLE_UNSPECIFIED = 0 HUMAN_AGENT = 1 @@ -1155,7 +1167,19 @@ class AutomatedAgentReply(proto.Message): """ class AutomatedAgentReplyType(proto.Enum): - r"""Represents different automated agent reply types.""" + r"""Represents different automated agent reply types. + + Values: + AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED (0): + Not specified. This should never happen. + PARTIAL (1): + Partial reply. e.g. Aggregated responses in a + ``Fulfillment`` that enables ``return_partial_response`` can + be returned as partial reply. WARNING: partial reply is not + eligible for barge-in. + FINAL (2): + Final reply. + """ AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0 PARTIAL = 1 FINAL = 2 diff --git a/google/cloud/dialogflow_v2/types/session.py b/google/cloud/dialogflow_v2/types/session.py index 6741cb9ef..df31e528f 100644 --- a/google/cloud/dialogflow_v2/types/session.py +++ b/google/cloud/dialogflow_v2/types/session.py @@ -825,7 +825,25 @@ class StreamingRecognitionResult(proto.Message): """ class MessageType(proto.Enum): - r"""Type of the response message.""" + r"""Type of the response message. + + Values: + MESSAGE_TYPE_UNSPECIFIED (0): + Not specified. Should never be used. + TRANSCRIPT (1): + Message contains a (possibly partial) + transcript. + END_OF_SINGLE_UTTERANCE (2): + Event indicates that the server has detected the end of the + user's speech utterance and expects no additional inputs. + Therefore, the server will not process additional audio + (although it may subsequently return additional results). + The client should stop sending additional audio data, + half-close the gRPC connection, and wait for any additional + results until the server closes the gRPC connection. This + message is only sent if ``single_utterance`` was set to + ``true``, and is not used otherwise. + """ MESSAGE_TYPE_UNSPECIFIED = 0 TRANSCRIPT = 1 END_OF_SINGLE_UTTERANCE = 2 diff --git a/google/cloud/dialogflow_v2/types/session_entity_type.py b/google/cloud/dialogflow_v2/types/session_entity_type.py index a0a20586c..f6aaa021d 100644 --- a/google/cloud/dialogflow_v2/types/session_entity_type.py +++ b/google/cloud/dialogflow_v2/types/session_entity_type.py @@ -69,7 +69,29 @@ class SessionEntityType(proto.Message): """ class EntityOverrideMode(proto.Enum): - r"""The types of modifications for a session entity type.""" + r"""The types of modifications for a session entity type. + + Values: + ENTITY_OVERRIDE_MODE_UNSPECIFIED (0): + Not specified. This value should be never + used. + ENTITY_OVERRIDE_MODE_OVERRIDE (1): + The collection of session entities overrides + the collection of entities in the corresponding + custom entity type. + ENTITY_OVERRIDE_MODE_SUPPLEMENT (2): + The collection of session entities extends the collection of + entities in the corresponding custom entity type. + + Note: Even in this override mode calls to + ``ListSessionEntityTypes``, ``GetSessionEntityType``, + ``CreateSessionEntityType`` and ``UpdateSessionEntityType`` + only return the additional entities added in this session + entity type. If you want to get the supplemented list, + please call + [EntityTypes.GetEntityType][google.cloud.dialogflow.v2.EntityTypes.GetEntityType] + on the custom entity type and merge. + """ ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0 ENTITY_OVERRIDE_MODE_OVERRIDE = 1 ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 diff --git a/google/cloud/dialogflow_v2/types/validation_result.py b/google/cloud/dialogflow_v2/types/validation_result.py index e1c11c812..a7ef97838 100644 --- a/google/cloud/dialogflow_v2/types/validation_result.py +++ b/google/cloud/dialogflow_v2/types/validation_result.py @@ -57,7 +57,22 @@ class ValidationError(proto.Message): """ class Severity(proto.Enum): - r"""Represents a level of severity.""" + r"""Represents a level of severity. + + Values: + SEVERITY_UNSPECIFIED (0): + Not specified. This value should never be + used. + INFO (1): + The agent doesn't follow Dialogflow best + practices. + WARNING (2): + The agent may not behave as expected. + ERROR (3): + The agent may experience partial failures. + CRITICAL (4): + The agent may completely fail. + """ SEVERITY_UNSPECIFIED = 0 INFO = 1 WARNING = 2 diff --git a/google/cloud/dialogflow_v2/types/version.py b/google/cloud/dialogflow_v2/types/version.py index 3de7cbc6a..9d6e97751 100644 --- a/google/cloud/dialogflow_v2/types/version.py +++ b/google/cloud/dialogflow_v2/types/version.py @@ -79,7 +79,19 @@ class Version(proto.Message): """ class VersionStatus(proto.Enum): - r"""The status of a version.""" + r"""The status of a version. + + Values: + VERSION_STATUS_UNSPECIFIED (0): + Not specified. This value is not used. + IN_PROGRESS (1): + Version is not ready to serve (e.g. training + is in progress). + READY (2): + Version is ready to serve. + FAILED (3): + Version training failed. + """ VERSION_STATUS_UNSPECIFIED = 0 IN_PROGRESS = 1 READY = 2 diff --git a/google/cloud/dialogflow_v2beta1/services/agents/client.py b/google/cloud/dialogflow_v2beta1/services/agents/client.py index 78dab0f84..de07c20fe 100644 --- a/google/cloud/dialogflow_v2beta1/services/agents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/agents/client.py @@ -1500,7 +1500,7 @@ def sample_get_validation_result(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "AgentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/answer_records/client.py b/google/cloud/dialogflow_v2beta1/services/answer_records/client.py index 702f88be3..6c95cf460 100644 --- a/google/cloud/dialogflow_v2beta1/services/answer_records/client.py +++ b/google/cloud/dialogflow_v2beta1/services/answer_records/client.py @@ -820,7 +820,7 @@ def sample_update_answer_record(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "AnswerRecordsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/contexts/client.py b/google/cloud/dialogflow_v2beta1/services/contexts/client.py index 5627ce88b..18f57988d 100644 --- a/google/cloud/dialogflow_v2beta1/services/contexts/client.py +++ b/google/cloud/dialogflow_v2beta1/services/contexts/client.py @@ -1168,7 +1168,7 @@ def sample_delete_all_contexts(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "ContextsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py index cc19d0061..2abeeb029 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py +++ b/google/cloud/dialogflow_v2beta1/services/conversation_profiles/client.py @@ -1432,7 +1432,7 @@ def sample_clear_suggestion_feature_config(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationProfilesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/conversations/client.py b/google/cloud/dialogflow_v2beta1/services/conversations/client.py index 5a6f78c4c..48f23c7e2 100644 --- a/google/cloud/dialogflow_v2beta1/services/conversations/client.py +++ b/google/cloud/dialogflow_v2beta1/services/conversations/client.py @@ -1324,7 +1324,7 @@ def sample_suggest_conversation_summary(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ConversationsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/documents/client.py b/google/cloud/dialogflow_v2beta1/services/documents/client.py index b8e0126ba..f766b842c 100644 --- a/google/cloud/dialogflow_v2beta1/services/documents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/documents/client.py @@ -1403,7 +1403,7 @@ def sample_reload_document(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "DocumentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py index 390b45711..358f513df 100644 --- a/google/cloud/dialogflow_v2beta1/services/entity_types/client.py +++ b/google/cloud/dialogflow_v2beta1/services/entity_types/client.py @@ -1875,7 +1875,7 @@ def sample_batch_delete_entities(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EntityTypesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/environments/client.py b/google/cloud/dialogflow_v2beta1/services/environments/client.py index 8dd9ddcdc..4494729ca 100644 --- a/google/cloud/dialogflow_v2beta1/services/environments/client.py +++ b/google/cloud/dialogflow_v2beta1/services/environments/client.py @@ -1072,7 +1072,7 @@ def sample_get_environment_history(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "EnvironmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py b/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py index dec89a29e..bd4f297bc 100644 --- a/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py +++ b/google/cloud/dialogflow_v2beta1/services/fulfillments/client.py @@ -680,7 +680,7 @@ def sample_update_fulfillment(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "FulfillmentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/intents/client.py b/google/cloud/dialogflow_v2beta1/services/intents/client.py index ebc56caf7..b981ccf71 100644 --- a/google/cloud/dialogflow_v2beta1/services/intents/client.py +++ b/google/cloud/dialogflow_v2beta1/services/intents/client.py @@ -1432,7 +1432,7 @@ def sample_batch_delete_intents(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "IntentsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py index b0f8fea2b..2125807b2 100644 --- a/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py +++ b/google/cloud/dialogflow_v2beta1/services/knowledge_bases/client.py @@ -1041,7 +1041,7 @@ def sample_update_knowledge_base(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "KnowledgeBasesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/participants/client.py b/google/cloud/dialogflow_v2beta1/services/participants/client.py index 08929c7a2..8702009fb 100644 --- a/google/cloud/dialogflow_v2beta1/services/participants/client.py +++ b/google/cloud/dialogflow_v2beta1/services/participants/client.py @@ -1848,7 +1848,7 @@ def sample_compile_suggestion(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "ParticipantsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py b/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py index ead90113d..95e3b53f0 100644 --- a/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py +++ b/google/cloud/dialogflow_v2beta1/services/session_entity_types/client.py @@ -1088,7 +1088,7 @@ def sample_delete_session_entity_type(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "SessionEntityTypesClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/sessions/client.py b/google/cloud/dialogflow_v2beta1/services/sessions/client.py index 255063ebb..7d62ff21f 100644 --- a/google/cloud/dialogflow_v2beta1/services/sessions/client.py +++ b/google/cloud/dialogflow_v2beta1/services/sessions/client.py @@ -830,7 +830,7 @@ def request_generator(): # Done; return the response. return response - def __enter__(self): + def __enter__(self) -> "SessionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/services/versions/client.py b/google/cloud/dialogflow_v2beta1/services/versions/client.py index 4825fc5ff..8c2816ada 100644 --- a/google/cloud/dialogflow_v2beta1/services/versions/client.py +++ b/google/cloud/dialogflow_v2beta1/services/versions/client.py @@ -1051,7 +1051,7 @@ def sample_delete_version(): metadata=metadata, ) - def __enter__(self): + def __enter__(self) -> "VersionsClient": return self def __exit__(self, type, value, traceback): diff --git a/google/cloud/dialogflow_v2beta1/types/agent.py b/google/cloud/dialogflow_v2beta1/types/agent.py index 508d95e09..f8ea586b8 100644 --- a/google/cloud/dialogflow_v2beta1/types/agent.py +++ b/google/cloud/dialogflow_v2beta1/types/agent.py @@ -113,20 +113,58 @@ class Agent(proto.Message): class MatchMode(proto.Enum): r"""Match mode determines how intents are detected from user queries. + + Values: + MATCH_MODE_UNSPECIFIED (0): + Not specified. + MATCH_MODE_HYBRID (1): + Best for agents with a small number of + examples in intents and/or wide use of templates + syntax and composite entities. + MATCH_MODE_ML_ONLY (2): + Can be used for agents with a large number of + examples in intents, especially the ones using + @sys.any or very large custom entities. """ MATCH_MODE_UNSPECIFIED = 0 MATCH_MODE_HYBRID = 1 MATCH_MODE_ML_ONLY = 2 class ApiVersion(proto.Enum): - r"""API version for the agent.""" + r"""API version for the agent. + + Values: + API_VERSION_UNSPECIFIED (0): + Not specified. + API_VERSION_V1 (1): + Legacy V1 API. + API_VERSION_V2 (2): + V2 API. + API_VERSION_V2_BETA_1 (3): + V2beta1 API. + """ API_VERSION_UNSPECIFIED = 0 API_VERSION_V1 = 1 API_VERSION_V2 = 2 API_VERSION_V2_BETA_1 = 3 class Tier(proto.Enum): - r"""Represents the agent tier.""" + r"""Represents the agent tier. + + Values: + TIER_UNSPECIFIED (0): + Not specified. This value should never be + used. + TIER_STANDARD (1): + Trial Edition, previously known as Standard + Edition. + TIER_ENTERPRISE (2): + Essentials Edition, previously known as + Enterprise Essential Edition. + TIER_ENTERPRISE_PLUS (3): + Essentials Edition (same as TIER_ENTERPRISE), previously + known as Enterprise Plus Edition. + """ TIER_UNSPECIFIED = 0 TIER_STANDARD = 1 TIER_ENTERPRISE = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/answer_record.py b/google/cloud/dialogflow_v2beta1/types/answer_record.py index 9fe33cde0..7c2e93e37 100644 --- a/google/cloud/dialogflow_v2beta1/types/answer_record.py +++ b/google/cloud/dialogflow_v2beta1/types/answer_record.py @@ -168,7 +168,18 @@ class AnswerFeedback(proto.Message): """ class CorrectnessLevel(proto.Enum): - r"""The correctness level of an answer.""" + r"""The correctness level of an answer. + + Values: + CORRECTNESS_LEVEL_UNSPECIFIED (0): + Correctness level unspecified. + NOT_CORRECT (1): + Answer is totally wrong. + PARTIALLY_CORRECT (2): + Answer is partially correct. + FULLY_CORRECT (3): + Answer is fully correct. + """ CORRECTNESS_LEVEL_UNSPECIFIED = 0 NOT_CORRECT = 1 PARTIALLY_CORRECT = 2 @@ -244,19 +255,46 @@ class AgentAssistantFeedback(proto.Message): """ class AnswerRelevance(proto.Enum): - r"""Relevance of an answer.""" + r"""Relevance of an answer. + + Values: + ANSWER_RELEVANCE_UNSPECIFIED (0): + Answer relevance unspecified. + IRRELEVANT (1): + Answer is irrelevant to query. + RELEVANT (2): + Answer is relevant to query. + """ ANSWER_RELEVANCE_UNSPECIFIED = 0 IRRELEVANT = 1 RELEVANT = 2 class DocumentCorrectness(proto.Enum): - r"""Correctness of document.""" + r"""Correctness of document. + + Values: + DOCUMENT_CORRECTNESS_UNSPECIFIED (0): + Document correctness unspecified. + INCORRECT (1): + Information in document is incorrect. + CORRECT (2): + Information in document is correct. + """ DOCUMENT_CORRECTNESS_UNSPECIFIED = 0 INCORRECT = 1 CORRECT = 2 class DocumentEfficiency(proto.Enum): - r"""Efficiency of document.""" + r"""Efficiency of document. + + Values: + DOCUMENT_EFFICIENCY_UNSPECIFIED (0): + Document efficiency unspecified. + INEFFICIENT (1): + Document is inefficient. + EFFICIENT (2): + Document is efficient. + """ DOCUMENT_EFFICIENCY_UNSPECIFIED = 0 INEFFICIENT = 1 EFFICIENT = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/audio_config.py b/google/cloud/dialogflow_v2beta1/types/audio_config.py index dd706c786..13167694e 100644 --- a/google/cloud/dialogflow_v2beta1/types/audio_config.py +++ b/google/cloud/dialogflow_v2beta1/types/audio_config.py @@ -43,6 +43,50 @@ class AudioEncoding(proto.Enum): request. Refer to the `Cloud Speech API documentation `__ for more details. + + Values: + AUDIO_ENCODING_UNSPECIFIED (0): + Not specified. + AUDIO_ENCODING_LINEAR_16 (1): + Uncompressed 16-bit signed little-endian + samples (Linear PCM). + AUDIO_ENCODING_FLAC (2): + ```FLAC`` `__ + (Free Lossless Audio Codec) is the recommended encoding + because it is lossless (therefore recognition is not + compromised) and requires only about half the bandwidth of + ``LINEAR16``. ``FLAC`` stream encoding supports 16-bit and + 24-bit samples, however, not all fields in ``STREAMINFO`` + are supported. + AUDIO_ENCODING_MULAW (3): + 8-bit samples that compand 14-bit audio + samples using G.711 PCMU/mu-law. + AUDIO_ENCODING_AMR (4): + Adaptive Multi-Rate Narrowband codec. ``sample_rate_hertz`` + must be 8000. + AUDIO_ENCODING_AMR_WB (5): + Adaptive Multi-Rate Wideband codec. ``sample_rate_hertz`` + must be 16000. + AUDIO_ENCODING_OGG_OPUS (6): + Opus encoded audio frames in Ogg container + (`OggOpus `__). + ``sample_rate_hertz`` must be 16000. + AUDIO_ENCODING_SPEEX_WITH_HEADER_BYTE (7): + Although the use of lossy encodings is not recommended, if a + very low bitrate encoding is required, ``OGG_OPUS`` is + highly preferred over Speex encoding. The + `Speex `__ encoding supported by + Dialogflow API has a header byte in each block, as in MIME + type ``audio/x-speex-with-header-byte``. It is a variant of + the RTP Speex encoding defined in `RFC + 5574 `__. The stream is + a sequence of blocks, one block per RTP packet. Each block + starts with a byte containing the length of the block, in + bytes, followed by one or more frames of Speex data, padded + to an integral number of bytes (octets) as specified in RFC + 5574. In other words, each RTP header is replaced with a + single byte containing the block length. Only Speex wideband + is supported. ``sample_rate_hertz`` must be 16000. """ AUDIO_ENCODING_UNSPECIFIED = 0 AUDIO_ENCODING_LINEAR_16 = 1 @@ -65,6 +109,40 @@ class SpeechModelVariant(proto.Enum): "phone_call" model has both a standard and an enhanced variant. When you use an enhanced model, you will generally receive higher quality results than for a standard model. + + Values: + SPEECH_MODEL_VARIANT_UNSPECIFIED (0): + No model variant specified. In this case Dialogflow defaults + to USE_BEST_AVAILABLE. + USE_BEST_AVAILABLE (1): + Use the best available variant of the [Speech + model][InputAudioConfig.model] that the caller is eligible + for. + + Please see the `Dialogflow + docs `__ + for how to make your project eligible for enhanced models. + USE_STANDARD (2): + Use standard model variant even if an enhanced model is + available. See the `Cloud Speech + documentation `__ + for details about enhanced models. + USE_ENHANCED (3): + Use an enhanced model variant: + + - If an enhanced variant does not exist for the given + [model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] + and request language, Dialogflow falls back to the + standard variant. + + The `Cloud Speech + documentation `__ + describes which models have enhanced variants. + + - If the API caller isn't eligible for enhanced models, + Dialogflow returns an error. Please see the `Dialogflow + docs `__ + for how to make your project eligible. """ SPEECH_MODEL_VARIANT_UNSPECIFIED = 0 USE_BEST_AVAILABLE = 1 @@ -75,6 +153,18 @@ class SpeechModelVariant(proto.Enum): class SsmlVoiceGender(proto.Enum): r"""Gender of the voice as described in `SSML voice element `__. + + Values: + SSML_VOICE_GENDER_UNSPECIFIED (0): + An unspecified gender, which means that the + client doesn't care which gender the selected + voice will have. + SSML_VOICE_GENDER_MALE (1): + A male voice. + SSML_VOICE_GENDER_FEMALE (2): + A female voice. + SSML_VOICE_GENDER_NEUTRAL (3): + A gender-neutral voice. """ SSML_VOICE_GENDER_UNSPECIFIED = 0 SSML_VOICE_GENDER_MALE = 1 @@ -83,7 +173,30 @@ class SsmlVoiceGender(proto.Enum): class OutputAudioEncoding(proto.Enum): - r"""Audio encoding of the output audio format in Text-To-Speech.""" + r"""Audio encoding of the output audio format in Text-To-Speech. + + Values: + OUTPUT_AUDIO_ENCODING_UNSPECIFIED (0): + Not specified. + OUTPUT_AUDIO_ENCODING_LINEAR_16 (1): + Uncompressed 16-bit signed little-endian + samples (Linear PCM). Audio content returned as + LINEAR16 also contains a WAV header. + OUTPUT_AUDIO_ENCODING_MP3 (2): + MP3 audio at 32kbps. + OUTPUT_AUDIO_ENCODING_MP3_64_KBPS (4): + MP3 audio at 64kbps. + OUTPUT_AUDIO_ENCODING_OGG_OPUS (3): + Opus encoded audio wrapped in an ogg + container. The result will be a file which can + be played natively on Android, and in browsers + (at least Chrome and Firefox). The quality of + the encoding is considerably higher than MP3 + while using approximately the same bitrate. + OUTPUT_AUDIO_ENCODING_MULAW (5): + 8-bit samples that compand 14-bit audio + samples using G.711 PCMU/mu-law. + """ OUTPUT_AUDIO_ENCODING_UNSPECIFIED = 0 OUTPUT_AUDIO_ENCODING_LINEAR_16 = 1 OUTPUT_AUDIO_ENCODING_MP3 = 2 @@ -95,6 +208,44 @@ class OutputAudioEncoding(proto.Enum): class TelephonyDtmf(proto.Enum): r"""`DTMF `__ digit in Telephony Gateway. + + Values: + TELEPHONY_DTMF_UNSPECIFIED (0): + Not specified. This value may be used to + indicate an absent digit. + DTMF_ONE (1): + Number: '1'. + DTMF_TWO (2): + Number: '2'. + DTMF_THREE (3): + Number: '3'. + DTMF_FOUR (4): + Number: '4'. + DTMF_FIVE (5): + Number: '5'. + DTMF_SIX (6): + Number: '6'. + DTMF_SEVEN (7): + Number: '7'. + DTMF_EIGHT (8): + Number: '8'. + DTMF_NINE (9): + Number: '9'. + DTMF_ZERO (10): + Number: '0'. + DTMF_A (11): + Letter: 'A'. + DTMF_B (12): + Letter: 'B'. + DTMF_C (13): + Letter: 'C'. + DTMF_D (14): + Letter: 'D'. + DTMF_STAR (15): + Asterisk/star: '*'. + DTMF_POUND (16): + Pound/diamond/hash/square/gate/octothorpe: + '#'. """ TELEPHONY_DTMF_UNSPECIFIED = 0 DTMF_ONE = 1 diff --git a/google/cloud/dialogflow_v2beta1/types/conversation.py b/google/cloud/dialogflow_v2beta1/types/conversation.py index 010ddb8e8..7d5436026 100644 --- a/google/cloud/dialogflow_v2beta1/types/conversation.py +++ b/google/cloud/dialogflow_v2beta1/types/conversation.py @@ -90,7 +90,17 @@ class Conversation(proto.Message): """ class LifecycleState(proto.Enum): - r"""Enumeration of the completion status of the conversation.""" + r"""Enumeration of the completion status of the conversation. + + Values: + LIFECYCLE_STATE_UNSPECIFIED (0): + Unknown. + IN_PROGRESS (1): + Conversation is currently open for media + analysis. + COMPLETED (2): + Conversation has been completed. + """ LIFECYCLE_STATE_UNSPECIFIED = 0 IN_PROGRESS = 1 COMPLETED = 2 @@ -99,6 +109,17 @@ class ConversationStage(proto.Enum): r"""Enumeration of the different conversation stages a conversation can be in. Reference: https://cloud.google.com/dialogflow/priv/docs/contact-center/basics#stages + + Values: + CONVERSATION_STAGE_UNSPECIFIED (0): + Unknown. Should never be used after a + conversation is successfully created. + VIRTUAL_AGENT_STAGE (1): + The conversation should return virtual agent + responses into the conversation. + HUMAN_ASSIST_STAGE (2): + The conversation should not provide + responses, just listen and provide suggestions. """ CONVERSATION_STAGE_UNSPECIFIED = 0 VIRTUAL_AGENT_STAGE = 1 diff --git a/google/cloud/dialogflow_v2beta1/types/conversation_event.py b/google/cloud/dialogflow_v2beta1/types/conversation_event.py index 640db1194..31a658ceb 100644 --- a/google/cloud/dialogflow_v2beta1/types/conversation_event.py +++ b/google/cloud/dialogflow_v2beta1/types/conversation_event.py @@ -53,7 +53,41 @@ class ConversationEvent(proto.Message): """ class Type(proto.Enum): - r"""Enumeration of the types of events available.""" + r"""Enumeration of the types of events available. + + Values: + TYPE_UNSPECIFIED (0): + Type not set. + CONVERSATION_STARTED (1): + A new conversation has been opened. This is + fired when a telephone call is answered, or a + conversation is created via the API. + CONVERSATION_FINISHED (2): + An existing conversation has closed. This is + fired when a telephone call is terminated, or a + conversation is closed via the API. + HUMAN_INTERVENTION_NEEDED (3): + An existing conversation has received + notification from Dialogflow that human + intervention is required. + NEW_MESSAGE (5): + An existing conversation has received a new message, either + from API or telephony. It is configured in + [ConversationProfile.new_message_event_notification_config][google.cloud.dialogflow.v2beta1.ConversationProfile.new_message_event_notification_config] + UNRECOVERABLE_ERROR (4): + Unrecoverable error during a telephone call. + + In general non-recoverable errors only occur if something + was misconfigured in the ConversationProfile corresponding + to the call. After a non-recoverable error, Dialogflow may + stop responding. + + We don't fire this event: + + - in an API call because we can directly return the error, + or, + - when we can recover from an error. + """ TYPE_UNSPECIFIED = 0 CONVERSATION_STARTED = 1 CONVERSATION_FINISHED = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/conversation_profile.py b/google/cloud/dialogflow_v2beta1/types/conversation_profile.py index bbe636e4c..abe41d346 100644 --- a/google/cloud/dialogflow_v2beta1/types/conversation_profile.py +++ b/google/cloud/dialogflow_v2beta1/types/conversation_profile.py @@ -721,7 +721,16 @@ class NotificationConfig(proto.Message): """ class MessageFormat(proto.Enum): - r"""Format of cloud pub/sub message.""" + r"""Format of cloud pub/sub message. + + Values: + MESSAGE_FORMAT_UNSPECIFIED (0): + If it is unspecified, PROTO will be used. + PROTO (1): + Pubsub message will be serialized proto. + JSON (2): + Pubsub message will be json. + """ MESSAGE_FORMAT_UNSPECIFIED = 0 PROTO = 1 JSON = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/document.py b/google/cloud/dialogflow_v2beta1/types/document.py index 21e7122d3..41112e1e5 100644 --- a/google/cloud/dialogflow_v2beta1/types/document.py +++ b/google/cloud/dialogflow_v2beta1/types/document.py @@ -134,7 +134,35 @@ class Document(proto.Message): """ class KnowledgeType(proto.Enum): - r"""The knowledge type of document content.""" + r"""The knowledge type of document content. + + Values: + KNOWLEDGE_TYPE_UNSPECIFIED (0): + The type is unspecified or arbitrary. + FAQ (1): + The document content contains question and + answer pairs as either HTML or CSV. Typical FAQ + HTML formats are parsed accurately, but unusual + formats may fail to be parsed. + + CSV must have questions in the first column and + answers in the second, with no header. Because + of this explicit format, they are always parsed + accurately. + EXTRACTIVE_QA (2): + Documents for which unstructured text is + extracted and used for question answering. + ARTICLE_SUGGESTION (3): + The entire document content as a whole can be + used for query results. Only for Contact Center + Solutions on Dialogflow. + AGENT_FACING_SMART_REPLY (4): + The document contains agent-facing Smart + Reply entries. + SMART_REPLY (4): + The legacy enum for agent-facing smart reply + feature. + """ _pb_options = {"allow_alias": True} KNOWLEDGE_TYPE_UNSPECIFIED = 0 FAQ = 1 @@ -144,7 +172,22 @@ class KnowledgeType(proto.Enum): SMART_REPLY = 4 class State(proto.Enum): - r"""Possible states of the document""" + r"""Possible states of the document + + Values: + STATE_UNSPECIFIED (0): + The document state is unspecified. + CREATING (1): + The document creation is in progress. + ACTIVE (2): + The document is active and ready to use. + UPDATING (3): + The document updation is in progress. + RELOADING (4): + The document is reloading. + DELETING (5): + The document deletion is in progress. + """ STATE_UNSPECIFIED = 0 CREATING = 1 ACTIVE = 2 @@ -545,7 +588,19 @@ class KnowledgeOperationMetadata(proto.Message): """ class State(proto.Enum): - r"""States of the operation.""" + r"""States of the operation. + + Values: + STATE_UNSPECIFIED (0): + State unspecified. + PENDING (1): + The operation has been created. + RUNNING (2): + The operation is currently running. + DONE (3): + The operation is done, either cancelled or + completed. + """ STATE_UNSPECIFIED = 0 PENDING = 1 RUNNING = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/entity_type.py b/google/cloud/dialogflow_v2beta1/types/entity_type.py index db7d1cd21..0b4b28b47 100644 --- a/google/cloud/dialogflow_v2beta1/types/entity_type.py +++ b/google/cloud/dialogflow_v2beta1/types/entity_type.py @@ -80,7 +80,24 @@ class EntityType(proto.Message): """ class Kind(proto.Enum): - r"""Represents kinds of entities.""" + r"""Represents kinds of entities. + + Values: + KIND_UNSPECIFIED (0): + Not specified. This value should be never + used. + KIND_MAP (1): + Map entity types allow mapping of a group of + synonyms to a reference value. + KIND_LIST (2): + List entity types contain a set of entries + that do not map to reference values. However, + list entity types can contain references to + other entity types (with or without aliases). + KIND_REGEXP (3): + Regexp entity types allow to specify regular + expressions in entries values. + """ KIND_UNSPECIFIED = 0 KIND_MAP = 1 KIND_LIST = 2 @@ -91,6 +108,13 @@ class AutoExpansionMode(proto.Enum): expansion allows an agent to recognize values that have not been explicitly listed in the entity (for example, new kinds of shopping list items). + + Values: + AUTO_EXPANSION_MODE_UNSPECIFIED (0): + Auto expansion disabled for the entity. + AUTO_EXPANSION_MODE_DEFAULT (1): + Allows an agent to recognize values that have + not been explicitly listed in the entity. """ AUTO_EXPANSION_MODE_UNSPECIFIED = 0 AUTO_EXPANSION_MODE_DEFAULT = 1 diff --git a/google/cloud/dialogflow_v2beta1/types/environment.py b/google/cloud/dialogflow_v2beta1/types/environment.py index 373e64198..1d75e958b 100644 --- a/google/cloud/dialogflow_v2beta1/types/environment.py +++ b/google/cloud/dialogflow_v2beta1/types/environment.py @@ -101,6 +101,16 @@ class State(proto.Enum): serving the previous version of the agent. After the new agent version is done loading, the environment is set back to the ``RUNNING`` state. + + Values: + STATE_UNSPECIFIED (0): + Not specified. This value is not used. + STOPPED (1): + Stopped. + LOADING (2): + Loading. + RUNNING (3): + Running. """ STATE_UNSPECIFIED = 0 STOPPED = 1 diff --git a/google/cloud/dialogflow_v2beta1/types/fulfillment.py b/google/cloud/dialogflow_v2beta1/types/fulfillment.py index 0d90853ab..63f32ab5a 100644 --- a/google/cloud/dialogflow_v2beta1/types/fulfillment.py +++ b/google/cloud/dialogflow_v2beta1/types/fulfillment.py @@ -127,7 +127,14 @@ class Feature(proto.Message): """ class Type(proto.Enum): - r"""The type of the feature.""" + r"""The type of the feature. + + Values: + TYPE_UNSPECIFIED (0): + Feature type not specified. + SMALLTALK (1): + Fulfillment is enabled for SmallTalk. + """ TYPE_UNSPECIFIED = 0 SMALLTALK = 1 diff --git a/google/cloud/dialogflow_v2beta1/types/intent.py b/google/cloud/dialogflow_v2beta1/types/intent.py index 8181aa09f..27ce52376 100644 --- a/google/cloud/dialogflow_v2beta1/types/intent.py +++ b/google/cloud/dialogflow_v2beta1/types/intent.py @@ -45,6 +45,13 @@ class IntentView(proto.Enum): An intent can be a sizable object. Therefore, we provide a resource view that does not return training phrases in the response by default. + + Values: + INTENT_VIEW_UNSPECIFIED (0): + Training phrases field is not populated in + the response. + INTENT_VIEW_FULL (1): + All fields are populated. """ INTENT_VIEW_UNSPECIFIED = 0 INTENT_VIEW_FULL = 1 @@ -186,7 +193,20 @@ class Intent(proto.Message): """ class WebhookState(proto.Enum): - r"""Represents the different states that webhooks can be in.""" + r"""Represents the different states that webhooks can be in. + + Values: + WEBHOOK_STATE_UNSPECIFIED (0): + Webhook is disabled in the agent and in the + intent. + WEBHOOK_STATE_ENABLED (1): + Webhook is enabled in the agent and in the + intent. + WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING (2): + Webhook is enabled in the agent and in the + intent. Also, each slot filling prompt is + forwarded to the webhook. + """ WEBHOOK_STATE_UNSPECIFIED = 0 WEBHOOK_STATE_ENABLED = 1 WEBHOOK_STATE_ENABLED_FOR_SLOT_FILLING = 2 @@ -233,7 +253,26 @@ class TrainingPhrase(proto.Message): """ class Type(proto.Enum): - r"""Represents different types of training phrases.""" + r"""Represents different types of training phrases. + + Values: + TYPE_UNSPECIFIED (0): + Not specified. This value should never be + used. + EXAMPLE (1): + Examples do not contain @-prefixed entity + type names, but example parts can be annotated + with entity types. + TEMPLATE (2): + Templates are not annotated with entity + types, but they can contain @-prefixed entity + type names as substrings. Note: Template mode + has been deprecated. Example mode is the only + supported way to create new training phrases. If + you have existing training phrases in template + mode, they will be removed during training and + it can cause a drop in agent performance. + """ TYPE_UNSPECIFIED = 0 EXAMPLE = 1 TEMPLATE = 2 @@ -478,6 +517,31 @@ class Message(proto.Message): class Platform(proto.Enum): r"""Represents different platforms that a rich message can be intended for. + + Values: + PLATFORM_UNSPECIFIED (0): + Not specified. + FACEBOOK (1): + Facebook. + SLACK (2): + Slack. + TELEGRAM (3): + Telegram. + KIK (4): + Kik. + SKYPE (5): + Skype. + LINE (6): + Line. + VIBER (7): + Viber. + ACTIONS_ON_GOOGLE (8): + Google Assistant See `Dialogflow webhook + format `__ + TELEPHONY (10): + Telephony Gateway. + GOOGLE_HANGOUTS (11): + Google Hangouts. """ PLATFORM_UNSPECIFIED = 0 FACEBOOK = 1 @@ -1042,7 +1106,16 @@ class RbmCarouselCard(proto.Message): """ class CardWidth(proto.Enum): - r"""The width of the cards in the carousel.""" + r"""The width of the cards in the carousel. + + Values: + CARD_WIDTH_UNSPECIFIED (0): + Not specified. + SMALL (1): + 120 DP. Note that tall media cannot be used. + MEDIUM (2): + 232 DP. + """ CARD_WIDTH_UNSPECIFIED = 0 SMALL = 1 MEDIUM = 2 @@ -1082,7 +1155,16 @@ class RbmStandaloneCard(proto.Message): """ class CardOrientation(proto.Enum): - r"""Orientation of the card.""" + r"""Orientation of the card. + + Values: + CARD_ORIENTATION_UNSPECIFIED (0): + Not specified. + HORIZONTAL (1): + Horizontal layout. + VERTICAL (2): + Vertical layout. + """ CARD_ORIENTATION_UNSPECIFIED = 0 HORIZONTAL = 1 VERTICAL = 2 @@ -1090,6 +1172,14 @@ class CardOrientation(proto.Enum): class ThumbnailImageAlignment(proto.Enum): r"""Thumbnail preview alignment for standalone cards with horizontal layout. + + Values: + THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED (0): + Not specified. + LEFT (1): + Thumbnail preview is left-aligned. + RIGHT (2): + Thumbnail preview is right-aligned. """ THUMBNAIL_IMAGE_ALIGNMENT_UNSPECIFIED = 0 LEFT = 1 @@ -1181,7 +1271,19 @@ class RbmMedia(proto.Message): """ class Height(proto.Enum): - r"""Media height""" + r"""Media height + + Values: + HEIGHT_UNSPECIFIED (0): + Not specified. + SHORT (1): + 112 DP. + MEDIUM (2): + 168 DP. + TALL (3): + 264 DP. Not available for rich card carousels + when the card width is set to small. + """ HEIGHT_UNSPECIFIED = 0 SHORT = 1 MEDIUM = 2 @@ -1402,7 +1504,14 @@ class MediaContent(proto.Message): """ class ResponseMediaType(proto.Enum): - r"""Format of response media type.""" + r"""Format of response media type. + + Values: + RESPONSE_MEDIA_TYPE_UNSPECIFIED (0): + Unspecified. + AUDIO (1): + Response media type is audio. + """ RESPONSE_MEDIA_TYPE_UNSPECIFIED = 0 AUDIO = 1 @@ -1492,6 +1601,30 @@ class ImageDisplayOptions(proto.Enum): r"""Image display options for Actions on Google. This should be used for when the image's aspect ratio does not match the image container's aspect ratio. + + Values: + IMAGE_DISPLAY_OPTIONS_UNSPECIFIED (0): + Fill the gaps between the image and the image + container with gray bars. + GRAY (1): + Fill the gaps between the image and the image + container with gray bars. + WHITE (2): + Fill the gaps between the image and the image + container with white bars. + CROPPED (3): + Image is scaled such that the image width and + height match or exceed the container dimensions. + This may crop the top and bottom of the image if + the scaled image height is greater than the + container height, or crop the left and right of + the image if the scaled image width is greater + than the container width. This is similar to + "Zoom Mode" on a widescreen TV when playing a + 4:3 video. + BLURRED_BACKGROUND (4): + Pad the gaps between image and image frame + with a blurred copy of the same image. """ IMAGE_DISPLAY_OPTIONS_UNSPECIFIED = 0 GRAY = 1 @@ -1532,7 +1665,18 @@ class OpenUrlAction(proto.Message): """ class UrlTypeHint(proto.Enum): - r"""Type of the URI.""" + r"""Type of the URI. + + Values: + URL_TYPE_HINT_UNSPECIFIED (0): + Unspecified + AMP_ACTION (1): + Url would be an amp action + AMP_CONTENT (2): + URL that points directly to AMP content, or + to a canonical URL which refers to AMP content + via . + """ URL_TYPE_HINT_UNSPECIFIED = 0 AMP_ACTION = 1 AMP_CONTENT = 2 @@ -1649,7 +1793,21 @@ class ColumnProperties(proto.Message): """ class HorizontalAlignment(proto.Enum): - r"""Text alignments within a cell.""" + r"""Text alignments within a cell. + + Values: + HORIZONTAL_ALIGNMENT_UNSPECIFIED (0): + Text is aligned to the leading edge of the + column. + LEADING (1): + Text is aligned to the leading edge of the + column. + CENTER (2): + Text is centered in the column. + TRAILING (3): + Text is aligned to the trailing edge of the + column. + """ HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0 LEADING = 1 CENTER = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/participant.py b/google/cloud/dialogflow_v2beta1/types/participant.py index e7a18efd4..88d4b09cf 100644 --- a/google/cloud/dialogflow_v2beta1/types/participant.py +++ b/google/cloud/dialogflow_v2beta1/types/participant.py @@ -141,6 +141,18 @@ class Participant(proto.Message): class Role(proto.Enum): r"""Enumeration of the roles a participant can play in a conversation. + + Values: + ROLE_UNSPECIFIED (0): + Participant role not set. + HUMAN_AGENT (1): + Participant is a human agent. + AUTOMATED_AGENT (2): + Participant is an automated agent, such as a + Dialogflow agent. + END_USER (3): + Participant is an end user that has called or + chatted with Dialogflow services. """ ROLE_UNSPECIFIED = 0 HUMAN_AGENT = 1 @@ -477,7 +489,19 @@ class AutomatedAgentReply(proto.Message): """ class AutomatedAgentReplyType(proto.Enum): - r"""Represents different automated agent reply types.""" + r"""Represents different automated agent reply types. + + Values: + AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED (0): + Not specified. This should never happen. + PARTIAL (1): + Partial reply. e.g. Aggregated responses in a + ``Fulfillment`` that enables ``return_partial_response`` can + be returned as partial reply. WARNING: partial reply is not + eligible for barge-in. + FINAL (2): + Final reply. + """ AUTOMATED_AGENT_REPLY_TYPE_UNSPECIFIED = 0 PARTIAL = 1 FINAL = 2 @@ -544,7 +568,21 @@ class SuggestionFeature(proto.Message): """ class Type(proto.Enum): - r"""Defines the type of Human Agent Assistant feature.""" + r"""Defines the type of Human Agent Assistant feature. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified feature type. + ARTICLE_SUGGESTION (1): + Run article suggestion model for chat. + FAQ (2): + Run FAQ model. + SMART_REPLY (3): + Run smart reply model for chat. + CONVERSATION_SUMMARIZATION (8): + Run conversation summarization model for + chat. + """ TYPE_UNSPECIFIED = 0 ARTICLE_SUGGESTION = 1 FAQ = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/session.py b/google/cloud/dialogflow_v2beta1/types/session.py index 725d90f8f..d0818ba01 100644 --- a/google/cloud/dialogflow_v2beta1/types/session.py +++ b/google/cloud/dialogflow_v2beta1/types/session.py @@ -639,6 +639,16 @@ class Answer(proto.Message): class MatchConfidenceLevel(proto.Enum): r"""Represents the system's confidence that this knowledge answer is a good match for this conversational query. + + Values: + MATCH_CONFIDENCE_LEVEL_UNSPECIFIED (0): + Not specified. + LOW (1): + Indicates that the confidence is low. + MEDIUM (2): + Indicates our confidence is medium. + HIGH (3): + Indicates our confidence is high. """ MATCH_CONFIDENCE_LEVEL_UNSPECIFIED = 0 LOW = 1 @@ -1008,7 +1018,36 @@ class StreamingRecognitionResult(proto.Message): """ class MessageType(proto.Enum): - r"""Type of the response message.""" + r"""Type of the response message. + + Values: + MESSAGE_TYPE_UNSPECIFIED (0): + Not specified. Should never be used. + TRANSCRIPT (1): + Message contains a (possibly partial) + transcript. + DTMF_DIGITS (3): + Message contains DTMF digits. When the client + gets the message, it should stop sending + additional data, half-close the gRPC connection, + and wait for any additional results until the + server closes the gRPC. connection. + END_OF_SINGLE_UTTERANCE (2): + Event indicates that the server has detected the end of the + user's speech utterance and expects no additional speech. + Therefore, the server will not process additional audio + (although it may subsequently return additional results). + The client should stop sending additional audio data, + half-close the gRPC connection, and wait for any additional + results until the server closes the gRPC connection. This + message is only sent if ``single_utterance`` was set to + ``true``, and is not used otherwise. + PARTIAL_DTMF_DIGITS (4): + Message contains DTMF digits. Before a message with + DTMF_DIGITS is sent, a message with PARTIAL_DTMF_DIGITS may + be sent with DTMF digits collected up to the time of + sending, which represents an intermediate result. + """ MESSAGE_TYPE_UNSPECIFIED = 0 TRANSCRIPT = 1 DTMF_DIGITS = 3 diff --git a/google/cloud/dialogflow_v2beta1/types/session_entity_type.py b/google/cloud/dialogflow_v2beta1/types/session_entity_type.py index f0ce0f20a..72a569c75 100644 --- a/google/cloud/dialogflow_v2beta1/types/session_entity_type.py +++ b/google/cloud/dialogflow_v2beta1/types/session_entity_type.py @@ -72,7 +72,29 @@ class SessionEntityType(proto.Message): """ class EntityOverrideMode(proto.Enum): - r"""The types of modifications for a session entity type.""" + r"""The types of modifications for a session entity type. + + Values: + ENTITY_OVERRIDE_MODE_UNSPECIFIED (0): + Not specified. This value should be never + used. + ENTITY_OVERRIDE_MODE_OVERRIDE (1): + The collection of session entities overrides + the collection of entities in the corresponding + custom entity type. + ENTITY_OVERRIDE_MODE_SUPPLEMENT (2): + The collection of session entities extends the collection of + entities in the corresponding custom entity type. + + Note: Even in this override mode calls to + ``ListSessionEntityTypes``, ``GetSessionEntityType``, + ``CreateSessionEntityType`` and ``UpdateSessionEntityType`` + only return the additional entities added in this session + entity type. If you want to get the supplemented list, + please call + [EntityTypes.GetEntityType][google.cloud.dialogflow.v2beta1.EntityTypes.GetEntityType] + on the custom entity type and merge. + """ ENTITY_OVERRIDE_MODE_UNSPECIFIED = 0 ENTITY_OVERRIDE_MODE_OVERRIDE = 1 ENTITY_OVERRIDE_MODE_SUPPLEMENT = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/validation_result.py b/google/cloud/dialogflow_v2beta1/types/validation_result.py index 8d7211cc5..1f4fc3e98 100644 --- a/google/cloud/dialogflow_v2beta1/types/validation_result.py +++ b/google/cloud/dialogflow_v2beta1/types/validation_result.py @@ -57,7 +57,22 @@ class ValidationError(proto.Message): """ class Severity(proto.Enum): - r"""Represents a level of severity.""" + r"""Represents a level of severity. + + Values: + SEVERITY_UNSPECIFIED (0): + Not specified. This value should never be + used. + INFO (1): + The agent doesn't follow Dialogflow best + practices. + WARNING (2): + The agent may not behave as expected. + ERROR (3): + The agent may experience partial failures. + CRITICAL (4): + The agent may completely fail. + """ SEVERITY_UNSPECIFIED = 0 INFO = 1 WARNING = 2 diff --git a/google/cloud/dialogflow_v2beta1/types/version.py b/google/cloud/dialogflow_v2beta1/types/version.py index 0b02aba8e..17e90708c 100644 --- a/google/cloud/dialogflow_v2beta1/types/version.py +++ b/google/cloud/dialogflow_v2beta1/types/version.py @@ -79,7 +79,19 @@ class Version(proto.Message): """ class VersionStatus(proto.Enum): - r"""The status of a version.""" + r"""The status of a version. + + Values: + VERSION_STATUS_UNSPECIFIED (0): + Not specified. This value is not used. + IN_PROGRESS (1): + Version is not ready to serve (e.g. training + is in progress). + READY (2): + Version is ready to serve. + FAILED (3): + Version training failed. + """ VERSION_STATUS_UNSPECIFIED = 0 IN_PROGRESS = 1 READY = 2 diff --git a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json index efb05784e..43eb1e2b9 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow", - "version": "2.19.0" + "version": "0.1.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json index 9b8afc1c6..748920df0 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.dialogflow.v2beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-dialogflow", - "version": "2.19.0" + "version": "0.1.0" }, "snippets": [ {