Skip to content
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 8b4ecf0

Browse files
docs: Add documentation for enums (#205)
* 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: 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 * restore rest support Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 52db4af commit 8b4ecf0

File tree

7 files changed

+130
-8
lines changed

7 files changed

+130
-8
lines changed

google/cloud/dataqna_v1alpha/services/auto_suggestion_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ def sample_suggest_queries():
575575
# Done; return the response.
576576
return response
577577

578-
def __enter__(self):
578+
def __enter__(self) -> "AutoSuggestionServiceClient":
579579
return self
580580

581581
def __exit__(self, type, value, traceback):

google/cloud/dataqna_v1alpha/services/question_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ def sample_update_user_feedback():
10521052
# Done; return the response.
10531053
return response
10541054

1055-
def __enter__(self):
1055+
def __enter__(self) -> "QuestionServiceClient":
10561056
return self
10571057

10581058
def __exit__(self, type, value, traceback):

google/cloud/dataqna_v1alpha/types/annotated_string.py

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,26 @@ class AnnotatedString(proto.Message):
6767
"""
6868

6969
class SemanticMarkupType(proto.Enum):
70-
r"""Semantic markup types."""
70+
r"""Semantic markup types.
71+
72+
Values:
73+
MARKUP_TYPE_UNSPECIFIED (0):
74+
No markup type was specified.
75+
METRIC (1):
76+
Markup for a substring denoting a metric.
77+
DIMENSION (2):
78+
Markup for a substring denoting a dimension.
79+
FILTER (3):
80+
Markup for a substring denoting a filter.
81+
UNUSED (4):
82+
Markup for an unused substring.
83+
BLOCKED (5):
84+
Markup for a substring containing blocked
85+
phrases.
86+
ROW (6):
87+
Markup for a substring that contains terms
88+
for row.
89+
"""
7190
MARKUP_TYPE_UNSPECIFIED = 0
7291
METRIC = 1
7392
DIMENSION = 2

google/cloud/dataqna_v1alpha/types/auto_suggestion_service.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,18 @@
3232

3333

3434
class SuggestionType(proto.Enum):
35-
r"""The type of suggestion."""
35+
r"""The type of suggestion.
36+
37+
Values:
38+
SUGGESTION_TYPE_UNSPECIFIED (0):
39+
No suggestiont type is specified.
40+
ENTITY (1):
41+
Entity suggestion type. Suggestions are for
42+
single entities.
43+
TEMPLATE (2):
44+
Template suggestion type. Suggestions are for
45+
full sentences.
46+
"""
3647
SUGGESTION_TYPE_UNSPECIFIED = 0
3748
ENTITY = 1
3849
TEMPLATE = 2

google/cloud/dataqna_v1alpha/types/question.py

Lines changed: 85 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@
4040

4141

4242
class InterpretEntity(proto.Enum):
43-
r"""Query entities of an interpretation."""
43+
r"""Query entities of an interpretation.
44+
45+
Values:
46+
INTERPRET_ENTITY_UNSPECIFIED (0):
47+
No interpret entity was specified.
48+
DIMENSION (1):
49+
A dimenstion entity.
50+
METRIC (2):
51+
A metric entity.
52+
"""
4453
INTERPRET_ENTITY_UNSPECIFIED = 0
4554
DIMENSION = 1
4655
METRIC = 2
@@ -167,6 +176,21 @@ class InterpretError(proto.Message):
167176
class InterpretErrorCode(proto.Enum):
168177
r"""The interpret error code provides an error category why the
169178
interpretation failed.
179+
180+
Values:
181+
INTERPRET_ERROR_CODE_UNSPECIFIED (0):
182+
No interpret error code was specified.
183+
INVALID_QUERY (1):
184+
The query is not valid.
185+
FAILED_TO_UNDERSTAND (2):
186+
The interpreter failed to understand the
187+
question. For example, because it was too
188+
ambiguous.
189+
FAILED_TO_ANSWER (3):
190+
The interpreter could understand the
191+
question, but was not able to arrive at an
192+
answer. For example, because a requested
193+
operation is not supported.
170194
"""
171195
INTERPRET_ERROR_CODE_UNSPECIFIED = 0
172196
INVALID_QUERY = 1
@@ -280,7 +304,20 @@ class ExecutionInfo(proto.Message):
280304
"""
281305

282306
class JobExecutionState(proto.Enum):
283-
r"""Enum of possible job execution statuses."""
307+
r"""Enum of possible job execution statuses.
308+
309+
Values:
310+
JOB_EXECUTION_STATE_UNSPECIFIED (0):
311+
No job execution was specified.
312+
NOT_EXECUTED (1):
313+
No job execution was requested, yet.
314+
RUNNING (2):
315+
The job is running.
316+
SUCCEEDED (3):
317+
The job completed successfully.
318+
FAILED (4):
319+
The job completed unsuccessfully.
320+
"""
284321
JOB_EXECUTION_STATE_UNSPECIFIED = 0
285322
NOT_EXECUTED = 1
286323
RUNNING = 2
@@ -463,6 +500,52 @@ class InterpretationStructure(proto.Message):
463500
class VisualizationType(proto.Enum):
464501
r"""Enumeration of visualzation types to use for query response
465502
data.
503+
504+
Values:
505+
VISUALIZATION_TYPE_UNSPECIFIED (0):
506+
No visualization type was specified.
507+
TABLE (1):
508+
Show a table.
509+
BAR_CHART (2):
510+
Show a `bar
511+
chart <https://developers.google.com/chart/interactive/docs/gallery/barchart>`__.
512+
COLUMN_CHART (3):
513+
Show a `column
514+
chart <https://developers.google.com/chart/interactive/docs/gallery/columnchart>`__.
515+
TIMELINE (4):
516+
Show a
517+
`timeline <https://developers.google.com/chart/interactive/docs/gallery/timeline>`__.
518+
SCATTER_PLOT (5):
519+
Show a `scatter
520+
plot <https://developers.google.com/chart/interactive/docs/gallery/scatterchart>`__.
521+
PIE_CHART (6):
522+
Show a `pie
523+
chart <https://developers.google.com/chart/interactive/docs/gallery/piechart>`__.
524+
LINE_CHART (7):
525+
Show a `line
526+
chart <https://developers.google.com/chart/interactive/docs/gallery/linechart>`__.
527+
AREA_CHART (8):
528+
Show an `area
529+
chart <https://developers.google.com/chart/interactive/docs/gallery/areachart>`__.
530+
COMBO_CHART (9):
531+
Show a `combo
532+
chart <https://developers.google.com/chart/interactive/docs/gallery/combochart>`__.
533+
HISTOGRAM (10):
534+
Show a
535+
`histogram <https://developers.google.com/chart/interactive/docs/gallery/histogram>`__.
536+
GENERIC_CHART (11):
537+
This denotes queries when the user has not
538+
specified the particular type of chart and has
539+
mentioned only a generic chart name such as
540+
"Chart", "Plot", "Graph", etc. This will
541+
differentiate it from specific charting terms
542+
such as "Bar chart", "Pie chart", etc.
543+
CHART_NOT_UNDERSTOOD (12):
544+
The user tried to specify a chart type, but
545+
the interpreter could not understand the type.
546+
The client should display a generic chart and
547+
may give a hint to the user that the requested
548+
type was not understood.
466549
"""
467550
VISUALIZATION_TYPE_UNSPECIFIED = 0
468551
TABLE = 1

google/cloud/dataqna_v1alpha/types/user_feedback.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,16 @@ class UserFeedback(proto.Message):
4040
"""
4141

4242
class UserFeedbackRating(proto.Enum):
43-
r"""Enumeration of feedback ratings."""
43+
r"""Enumeration of feedback ratings.
44+
45+
Values:
46+
USER_FEEDBACK_RATING_UNSPECIFIED (0):
47+
No rating was specified.
48+
POSITIVE (1):
49+
The user provided positive feedback.
50+
NEGATIVE (2):
51+
The user provided negative feedback.
52+
"""
4453
USER_FEEDBACK_RATING_UNSPECIFIED = 0
4554
POSITIVE = 1
4655
NEGATIVE = 2

samples/generated_samples/snippet_metadata_google.cloud.dataqna.v1alpha.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-data-qna",
11-
"version": "0.10.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)