Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample of enums.py regen after ordering (DO NOT MERGE) #6707

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 43 additions & 51 deletions logging/google/cloud/logging_v2/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class LaunchStage(enum.IntEnum):
Platform Subject to the Deprecation
Policy <https://cloud.google.com/terms/deprecation>`__ documentation.
"""

LAUNCH_STAGE_UNSPECIFIED = 0
EARLY_ACCESS = 1
ALPHA = 2
Expand All @@ -61,20 +60,6 @@ class LaunchStage(enum.IntEnum):
DEPRECATED = 5


class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value for
the ``Value`` type union.

The JSON representation for ``NullValue`` is JSON ``null``.

Attributes:
NULL_VALUE (int): Null value.
"""

NULL_VALUE = 0


class LogSeverity(enum.IntEnum):
"""
The severity of the event described in a log entry, expressed as one of
Expand Down Expand Up @@ -108,7 +93,6 @@ class LogSeverity(enum.IntEnum):
ALERT (int): (700) A person must take an action immediately.
EMERGENCY (int): (800) One or more systems are unusable.
"""

DEFAULT = 0
DEBUG = 100
INFO = 200
Expand All @@ -120,6 +104,19 @@ class LogSeverity(enum.IntEnum):
EMERGENCY = 800


class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value for
the ``Value`` type union.

The JSON representation for ``NullValue`` is JSON ``null``.

Attributes:
NULL_VALUE (int): Null value.
"""
NULL_VALUE = 0


class LabelDescriptor(object):
class ValueType(enum.IntEnum):
"""
Expand All @@ -130,12 +127,41 @@ class ValueType(enum.IntEnum):
BOOL (int): Boolean; true or false.
INT64 (int): A 64-bit signed integer.
"""

STRING = 0
BOOL = 1
INT64 = 2


class LogMetric(object):
class ApiVersion(enum.IntEnum):
"""
Logging API version.

Attributes:
V2 (int): Logging API v2.
V1 (int): Logging API v1.
"""
V2 = 0
V1 = 1


class LogSink(object):
class VersionFormat(enum.IntEnum):
"""
Available log entry formats. Log entries can be written to
Logging in either format and can be exported in either format.
Version 2 is the preferred format.

Attributes:
VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2.
V2 (int): ``LogEntry`` version 2 format.
V1 (int): ``LogEntry`` version 1 format.
"""
VERSION_FORMAT_UNSPECIFIED = 0
V2 = 1
V1 = 2


class MetricDescriptor(object):
class MetricKind(enum.IntEnum):
"""
Expand All @@ -151,7 +177,6 @@ class MetricKind(enum.IntEnum):
value to zero and sets a new start time for the following
points.
"""

METRIC_KIND_UNSPECIFIED = 0
GAUGE = 1
DELTA = 2
Expand All @@ -172,43 +197,10 @@ class ValueType(enum.IntEnum):
DISTRIBUTION (int): The value is a ``Distribution``.
MONEY (int): The value is money.
"""

VALUE_TYPE_UNSPECIFIED = 0
BOOL = 1
INT64 = 2
DOUBLE = 3
STRING = 4
DISTRIBUTION = 5
MONEY = 6


class LogMetric(object):
class ApiVersion(enum.IntEnum):
"""
Logging API version.

Attributes:
V2 (int): Logging API v2.
V1 (int): Logging API v1.
"""

V2 = 0
V1 = 1


class LogSink(object):
class VersionFormat(enum.IntEnum):
"""
Available log entry formats. Log entries can be written to
Logging in either format and can be exported in either format.
Version 2 is the preferred format.

Attributes:
VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2.
V2 (int): ``LogEntry`` version 2 format.
V1 (int): ``LogEntry`` version 1 format.
"""

VERSION_FORMAT_UNSPECIFIED = 0
V2 = 1
V1 = 2