Skip to content

Commit

Permalink
docs: Add documentation for enums (#250)
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] authored Jan 20, 2023
1 parent c2c248b commit 8e9a62b
Show file tree
Hide file tree
Showing 8 changed files with 419 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -906,7 +906,7 @@ def sample_update_dashboard():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,23 @@ class DashboardFilter(proto.Message):
"""

class FilterType(proto.Enum):
r"""The type for the dashboard filter"""
r"""The type for the dashboard filter
Values:
FILTER_TYPE_UNSPECIFIED (0):
Filter type is unspecified. This is not valid
in a well-formed request.
RESOURCE_LABEL (1):
Filter on a resource label value
METRIC_LABEL (2):
Filter on a metrics label value
USER_METADATA_LABEL (3):
Filter on a user metadata label value
SYSTEM_METADATA_LABEL (4):
Filter on a system metadata label value
GROUP (5):
Filter on a group id
"""
FILTER_TYPE_UNSPECIFIED = 0
RESOURCE_LABEL = 1
METRIC_LABEL = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,16 @@
class SparkChartType(proto.Enum):
r"""Defines the possible types of spark chart supported by the
``Scorecard``.
Values:
SPARK_CHART_TYPE_UNSPECIFIED (0):
Not allowed in well-formed requests.
SPARK_LINE (1):
The sparkline will be rendered as a small
line chart.
SPARK_BAR (2):
The sparkbar will be rendered as a small bar
chart.
"""
SPARK_CHART_TYPE_UNSPECIFIED = 0
SPARK_LINE = 1
Expand Down Expand Up @@ -286,6 +296,17 @@ class Color(proto.Enum):
actual values cross the threshold. Comments on each color
provide UX guidance on how users can be expected to interpret a
given state color.
Values:
COLOR_UNSPECIFIED (0):
Color is unspecified. Not allowed in
well-formed requests.
YELLOW (4):
Crossing the threshold is "concerning"
behavior.
RED (6):
Crossing the threshold is "emergency"
behavior.
"""
COLOR_UNSPECIFIED = 0
YELLOW = 4
Expand All @@ -294,13 +315,33 @@ class Color(proto.Enum):
class Direction(proto.Enum):
r"""Whether the threshold is considered crossed by an actual
value above or below its threshold value.
Values:
DIRECTION_UNSPECIFIED (0):
Not allowed in well-formed requests.
ABOVE (1):
The threshold will be considered crossed if
the actual value is above the threshold value.
BELOW (2):
The threshold will be considered crossed if
the actual value is below the threshold value.
"""
DIRECTION_UNSPECIFIED = 0
ABOVE = 1
BELOW = 2

class TargetAxis(proto.Enum):
r"""An axis identifier."""
r"""An axis identifier.
Values:
TARGET_AXIS_UNSPECIFIED (0):
The target axis was not specified. Defaults
to Y1.
Y1 (1):
The y_axis (the right axis of chart).
Y2 (2):
The y2_axis (the left axis of chart).
"""
TARGET_AXIS_UNSPECIFIED = 0
Y1 = 1
Y2 = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,16 @@ class TimeSeriesTable(proto.Message):
"""

class MetricVisualization(proto.Enum):
r"""Enum for metric metric_visualization"""
r"""Enum for metric metric_visualization
Values:
METRIC_VISUALIZATION_UNSPECIFIED (0):
Unspecified state
NUMBER (1):
Default text rendering
BAR (2):
Horizontal bar rendering
"""
METRIC_VISUALIZATION_UNSPECIFIED = 0
NUMBER = 1
BAR = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,16 @@ class Text(proto.Message):
"""

class Format(proto.Enum):
r"""The format type of the text content."""
r"""The format type of the text content.
Values:
FORMAT_UNSPECIFIED (0):
Format is unspecified. Defaults to MARKDOWN.
MARKDOWN (1):
The text contains Markdown formatting.
RAW (2):
The text contains no special formatting.
"""
FORMAT_UNSPECIFIED = 0
MARKDOWN = 1
RAW = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,15 +85,54 @@ class DataSet(proto.Message):
"""

class PlotType(proto.Enum):
r"""The types of plotting strategies for data sets."""
r"""The types of plotting strategies for data sets.
Values:
PLOT_TYPE_UNSPECIFIED (0):
Plot type is unspecified. The view will default to ``LINE``.
LINE (1):
The data is plotted as a set of lines (one
line per series).
STACKED_AREA (2):
The data is plotted as a set of filled areas
(one area per series), with the areas stacked
vertically (the base of each area is the top of
its predecessor, and the base of the first area
is the X axis). Since the areas do not overlap,
each is filled with a different opaque color.
STACKED_BAR (3):
The data is plotted as a set of rectangular
boxes (one box per series), with the boxes
stacked vertically (the base of each box is the
top of its predecessor, and the base of the
first box is the X axis). Since the boxes do not
overlap, each is filled with a different opaque
color.
HEATMAP (4):
The data is plotted as a heatmap. The series being plotted
must have a ``DISTRIBUTION`` value type. The value of each
bucket in the distribution is displayed as a color. This
type is not currently available in the Stackdriver
Monitoring application.
"""
PLOT_TYPE_UNSPECIFIED = 0
LINE = 1
STACKED_AREA = 2
STACKED_BAR = 3
HEATMAP = 4

class TargetAxis(proto.Enum):
r"""An axis identifier."""
r"""An axis identifier.
Values:
TARGET_AXIS_UNSPECIFIED (0):
The target axis was not specified. Defaults
to Y1.
Y1 (1):
The y_axis (the right axis of chart).
Y2 (2):
The y2_axis (the left axis of chart).
"""
TARGET_AXIS_UNSPECIFIED = 0
Y1 = 1
Y2 = 2
Expand Down Expand Up @@ -135,7 +174,16 @@ class Axis(proto.Message):
"""

class Scale(proto.Enum):
r"""Types of scales used in axes."""
r"""Types of scales used in axes.
Values:
SCALE_UNSPECIFIED (0):
Scale is unspecified. The view will default to ``LINEAR``.
LINEAR (1):
Linear scale.
LOG10 (2):
Logarithmic scale (base 10).
"""
SCALE_UNSPECIFIED = 0
LINEAR = 1
LOG10 = 2
Expand Down Expand Up @@ -196,7 +244,23 @@ class ChartOptions(proto.Message):
"""

class Mode(proto.Enum):
r"""Chart mode options."""
r"""Chart mode options.
Values:
MODE_UNSPECIFIED (0):
Mode is unspecified. The view will default to ``COLOR``.
COLOR (1):
The chart distinguishes data series using
different color. Line colors may get reused when
there are many lines in the chart.
X_RAY (2):
The chart uses the Stackdriver x-ray mode, in
which each data set is plotted using the same
semi-transparent color.
STATS (3):
The chart displays statistics such as
average, median, 95th percentile, and more.
"""
MODE_UNSPECIFIED = 0
COLOR = 1
X_RAY = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-monitoring-dashboards",
"version": "2.11.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 8e9a62b

Please sign in to comment.