Skip to content

Commit

Permalink
docs: Add documentation for enums (#205)
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

* restore rest support

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Jan 20, 2023
1 parent 72e3524 commit 740f3b1
Show file tree
Hide file tree
Showing 7 changed files with 130 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ def sample_suggest_queries():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "AutoSuggestionServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ def sample_update_user_feedback():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "QuestionServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,26 @@ class AnnotatedString(proto.Message):
"""

class SemanticMarkupType(proto.Enum):
r"""Semantic markup types."""
r"""Semantic markup types.
Values:
MARKUP_TYPE_UNSPECIFIED (0):
No markup type was specified.
METRIC (1):
Markup for a substring denoting a metric.
DIMENSION (2):
Markup for a substring denoting a dimension.
FILTER (3):
Markup for a substring denoting a filter.
UNUSED (4):
Markup for an unused substring.
BLOCKED (5):
Markup for a substring containing blocked
phrases.
ROW (6):
Markup for a substring that contains terms
for row.
"""
MARKUP_TYPE_UNSPECIFIED = 0
METRIC = 1
DIMENSION = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,18 @@


class SuggestionType(proto.Enum):
r"""The type of suggestion."""
r"""The type of suggestion.
Values:
SUGGESTION_TYPE_UNSPECIFIED (0):
No suggestiont type is specified.
ENTITY (1):
Entity suggestion type. Suggestions are for
single entities.
TEMPLATE (2):
Template suggestion type. Suggestions are for
full sentences.
"""
SUGGESTION_TYPE_UNSPECIFIED = 0
ENTITY = 1
TEMPLATE = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@


class InterpretEntity(proto.Enum):
r"""Query entities of an interpretation."""
r"""Query entities of an interpretation.
Values:
INTERPRET_ENTITY_UNSPECIFIED (0):
No interpret entity was specified.
DIMENSION (1):
A dimenstion entity.
METRIC (2):
A metric entity.
"""
INTERPRET_ENTITY_UNSPECIFIED = 0
DIMENSION = 1
METRIC = 2
Expand Down Expand Up @@ -167,6 +176,21 @@ class InterpretError(proto.Message):
class InterpretErrorCode(proto.Enum):
r"""The interpret error code provides an error category why the
interpretation failed.
Values:
INTERPRET_ERROR_CODE_UNSPECIFIED (0):
No interpret error code was specified.
INVALID_QUERY (1):
The query is not valid.
FAILED_TO_UNDERSTAND (2):
The interpreter failed to understand the
question. For example, because it was too
ambiguous.
FAILED_TO_ANSWER (3):
The interpreter could understand the
question, but was not able to arrive at an
answer. For example, because a requested
operation is not supported.
"""
INTERPRET_ERROR_CODE_UNSPECIFIED = 0
INVALID_QUERY = 1
Expand Down Expand Up @@ -280,7 +304,20 @@ class ExecutionInfo(proto.Message):
"""

class JobExecutionState(proto.Enum):
r"""Enum of possible job execution statuses."""
r"""Enum of possible job execution statuses.
Values:
JOB_EXECUTION_STATE_UNSPECIFIED (0):
No job execution was specified.
NOT_EXECUTED (1):
No job execution was requested, yet.
RUNNING (2):
The job is running.
SUCCEEDED (3):
The job completed successfully.
FAILED (4):
The job completed unsuccessfully.
"""
JOB_EXECUTION_STATE_UNSPECIFIED = 0
NOT_EXECUTED = 1
RUNNING = 2
Expand Down Expand Up @@ -463,6 +500,52 @@ class InterpretationStructure(proto.Message):
class VisualizationType(proto.Enum):
r"""Enumeration of visualzation types to use for query response
data.
Values:
VISUALIZATION_TYPE_UNSPECIFIED (0):
No visualization type was specified.
TABLE (1):
Show a table.
BAR_CHART (2):
Show a `bar
chart <https://developers.google.com/chart/interactive/docs/gallery/barchart>`__.
COLUMN_CHART (3):
Show a `column
chart <https://developers.google.com/chart/interactive/docs/gallery/columnchart>`__.
TIMELINE (4):
Show a
`timeline <https://developers.google.com/chart/interactive/docs/gallery/timeline>`__.
SCATTER_PLOT (5):
Show a `scatter
plot <https://developers.google.com/chart/interactive/docs/gallery/scatterchart>`__.
PIE_CHART (6):
Show a `pie
chart <https://developers.google.com/chart/interactive/docs/gallery/piechart>`__.
LINE_CHART (7):
Show a `line
chart <https://developers.google.com/chart/interactive/docs/gallery/linechart>`__.
AREA_CHART (8):
Show an `area
chart <https://developers.google.com/chart/interactive/docs/gallery/areachart>`__.
COMBO_CHART (9):
Show a `combo
chart <https://developers.google.com/chart/interactive/docs/gallery/combochart>`__.
HISTOGRAM (10):
Show a
`histogram <https://developers.google.com/chart/interactive/docs/gallery/histogram>`__.
GENERIC_CHART (11):
This denotes queries when the user has not
specified the particular type of chart and has
mentioned only a generic chart name such as
"Chart", "Plot", "Graph", etc. This will
differentiate it from specific charting terms
such as "Bar chart", "Pie chart", etc.
CHART_NOT_UNDERSTOOD (12):
The user tried to specify a chart type, but
the interpreter could not understand the type.
The client should display a generic chart and
may give a hint to the user that the requested
type was not understood.
"""
VISUALIZATION_TYPE_UNSPECIFIED = 0
TABLE = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,16 @@ class UserFeedback(proto.Message):
"""

class UserFeedbackRating(proto.Enum):
r"""Enumeration of feedback ratings."""
r"""Enumeration of feedback ratings.
Values:
USER_FEEDBACK_RATING_UNSPECIFIED (0):
No rating was specified.
POSITIVE (1):
The user provided positive feedback.
NEGATIVE (2):
The user provided negative feedback.
"""
USER_FEEDBACK_RATING_UNSPECIFIED = 0
POSITIVE = 1
NEGATIVE = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-data-qna",
"version": "0.10.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 740f3b1

Please sign in to comment.