Skip to content
This repository has been archived by the owner on Dec 17, 2023. It is now read-only.

Commit

Permalink
docs: Add documentation for enums (#611)
Browse files Browse the repository at this point in the history
* 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: googleapis/googleapis@a391fd1

Source-Link: googleapis/googleapis-gen@0080f83
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 <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Jan 20, 2023
1 parent 160e6e9 commit c5272ff
Show file tree
Hide file tree
Showing 67 changed files with 1,437 additions and 93 deletions.
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/agents/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/contexts/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/documents/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/entity_types/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/environments/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/fulfillments/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/intents/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/participants/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/sessions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/dialogflow_v2/services/versions/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
42 changes: 40 additions & 2 deletions google/cloud/dialogflow_v2/types/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
46 changes: 42 additions & 4 deletions google/cloud/dialogflow_v2/types/answer_record.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading

0 comments on commit c5272ff

Please sign in to comment.