Skip to content

Commit

Permalink
Integrate Python GAPIC Microgenerator in googleapis. This PR uses usi…
Browse files Browse the repository at this point in the history
…ng documentai as an example. Depends on googleapis/gapic-generator-python#402

PiperOrigin-RevId: 309824146

Source-Author: Google APIs <[email protected]>
Source-Date: Mon May 4 15:06:44 2020 -0700
Source-Repo: googleapis/googleapis
Source-Sha: e0f9d9e1f9de890db765be46f45ca8490723e3eb
Source-Link: googleapis/googleapis@e0f9d9e
  • Loading branch information
yoshi-automation committed Aug 1, 2020
1 parent 251ac93 commit 74f6f48
Show file tree
Hide file tree
Showing 23 changed files with 2,779 additions and 1,525 deletions.
568 changes: 446 additions & 122 deletions google/cloud/logging_v2/gapic/config_service_v2_client.py

Large diffs are not rendered by default.

41 changes: 23 additions & 18 deletions google/cloud/logging_v2/gapic/config_service_v2_client_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
"interfaces": {
"google.logging.v2.ConfigServiceV2": {
"retry_codes": {
"idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"],
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
"non_idempotent": [],
"idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
},
"retry_params": {
"default": {
Expand All @@ -15,18 +14,24 @@
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"total_timeout_millis": 600000,
},
"write_sink": {
"initial_retry_delay_millis": 100,
"retry_delay_multiplier": 1.3,
"max_retry_delay_millis": 60000,
"initial_rpc_timeout_millis": 20000,
"rpc_timeout_multiplier": 1.0,
"max_rpc_timeout_millis": 20000,
"total_timeout_millis": 600000,
},
}
},
"methods": {
"ListBuckets": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"GetBucket": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"UpdateBucket": {
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ListSinks": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
Expand All @@ -38,18 +43,18 @@
"retry_params_name": "default",
},
"CreateSink": {
"timeout_millis": 120000,
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"UpdateSink": {
"timeout_millis": 120000,
"retry_codes_name": "idempotent",
"timeout_millis": 60000,
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"DeleteSink": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"ListExclusions": {
Expand All @@ -74,12 +79,12 @@
},
"DeleteExclusion": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent",
"retry_codes_name": "non_idempotent",
"retry_params_name": "default",
},
"GetCmekSettings": {
"timeout_millis": 60000,
"retry_codes_name": "idempotent2",
"retry_codes_name": "idempotent",
"retry_params_name": "default",
},
"UpdateCmekSettings": {
Expand Down
34 changes: 25 additions & 9 deletions google/cloud/logging_v2/gapic/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ class LaunchStage(enum.IntEnum):
limited production use cases.
GA (int): GA features are open to all developers and are considered stable and
fully qualified for production use.
DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more
information, see the “Deprecation Policy” section of our `Terms of
DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For
more information, see the “Deprecation Policy” section of our `Terms of
Service <https://cloud.google.com/terms/>`__ and the `Google Cloud
Platform Subject to the Deprecation
Policy <https://cloud.google.com/terms/deprecation>`__ documentation.
Expand All @@ -62,10 +62,26 @@ class LaunchStage(enum.IntEnum):
DEPRECATED = 5


class LifecycleState(enum.IntEnum):
"""
LogBucket lifecycle states (Beta).
Attributes:
LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing
unset values.
ACTIVE (int): The normal and active state.
DELETE_REQUESTED (int): The bucket has been marked for deletion by the user.
"""

LIFECYCLE_STATE_UNSPECIFIED = 0
ACTIVE = 1
DELETE_REQUESTED = 2


class LogSeverity(enum.IntEnum):
"""
The severity of the event described in a log entry, expressed as one of
the standard severity levels listed below. For your reference, the
The severity of the event described in a log entry, expressed as one
of the standard severity levels listed below. For your reference, the
levels are assigned the listed numeric values. The effect of using
numeric values other than those listed is undefined.
Expand All @@ -75,7 +91,7 @@ class LogSeverity(enum.IntEnum):
::
severity > DEBUG AND severity <= WARNING
severity > DEBUG AND severity <= WARNING
If you are writing log entries, you should map other severity encodings
to one of these standard levels. For example, you might map all of
Expand Down Expand Up @@ -109,8 +125,8 @@ class LogSeverity(enum.IntEnum):

class NullValue(enum.IntEnum):
"""
``NullValue`` is a singleton enumeration to represent the null value for
the ``Value`` type union.
``NullValue`` is a singleton enumeration to represent the null value
for the ``Value`` type union.
The JSON representation for ``NullValue`` is JSON ``null``.
Expand Down Expand Up @@ -196,8 +212,8 @@ class ValueType(enum.IntEnum):
Attributes:
VALUE_TYPE_UNSPECIFIED (int): Do not use this default value.
BOOL (int): The value is a boolean. This value type can be used only if the metric
kind is ``GAUGE``.
BOOL (int): The value is a boolean. This value type can be used only if the
metric kind is ``GAUGE``.
INT64 (int): The value is a signed 64-bit integer.
DOUBLE (int): The value is a double precision floating point number.
STRING (int): The value is a text string. This value type can be used only if the
Expand Down
Loading

0 comments on commit 74f6f48

Please sign in to comment.