Skip to content

Commit 9eff813

Browse files
Integrate Python GAPIC Microgenerator in googleapis. This PR uses using 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
1 parent 251ac93 commit 9eff813

23 files changed

+2778
-1524
lines changed

google/cloud/logging_v2/gapic/config_service_v2_client.py

Lines changed: 446 additions & 122 deletions
Large diffs are not rendered by default.

google/cloud/logging_v2/gapic/config_service_v2_client_config.py

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
"interfaces": {
33
"google.logging.v2.ConfigServiceV2": {
44
"retry_codes": {
5-
"idempotent": ["DEADLINE_EXCEEDED", "INTERNAL", "UNAVAILABLE"],
5+
"idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
66
"non_idempotent": [],
7-
"idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"],
87
},
98
"retry_params": {
109
"default": {
@@ -15,18 +14,24 @@
1514
"rpc_timeout_multiplier": 1.0,
1615
"max_rpc_timeout_millis": 20000,
1716
"total_timeout_millis": 600000,
18-
},
19-
"write_sink": {
20-
"initial_retry_delay_millis": 100,
21-
"retry_delay_multiplier": 1.3,
22-
"max_retry_delay_millis": 60000,
23-
"initial_rpc_timeout_millis": 20000,
24-
"rpc_timeout_multiplier": 1.0,
25-
"max_rpc_timeout_millis": 20000,
26-
"total_timeout_millis": 600000,
27-
},
17+
}
2818
},
2919
"methods": {
20+
"ListBuckets": {
21+
"timeout_millis": 60000,
22+
"retry_codes_name": "idempotent",
23+
"retry_params_name": "default",
24+
},
25+
"GetBucket": {
26+
"timeout_millis": 60000,
27+
"retry_codes_name": "idempotent",
28+
"retry_params_name": "default",
29+
},
30+
"UpdateBucket": {
31+
"timeout_millis": 60000,
32+
"retry_codes_name": "non_idempotent",
33+
"retry_params_name": "default",
34+
},
3035
"ListSinks": {
3136
"timeout_millis": 60000,
3237
"retry_codes_name": "idempotent",
@@ -38,18 +43,18 @@
3843
"retry_params_name": "default",
3944
},
4045
"CreateSink": {
41-
"timeout_millis": 120000,
46+
"timeout_millis": 60000,
4247
"retry_codes_name": "non_idempotent",
4348
"retry_params_name": "default",
4449
},
4550
"UpdateSink": {
46-
"timeout_millis": 120000,
47-
"retry_codes_name": "idempotent",
51+
"timeout_millis": 60000,
52+
"retry_codes_name": "non_idempotent",
4853
"retry_params_name": "default",
4954
},
5055
"DeleteSink": {
5156
"timeout_millis": 60000,
52-
"retry_codes_name": "idempotent",
57+
"retry_codes_name": "non_idempotent",
5358
"retry_params_name": "default",
5459
},
5560
"ListExclusions": {
@@ -74,12 +79,12 @@
7479
},
7580
"DeleteExclusion": {
7681
"timeout_millis": 60000,
77-
"retry_codes_name": "idempotent",
82+
"retry_codes_name": "non_idempotent",
7883
"retry_params_name": "default",
7984
},
8085
"GetCmekSettings": {
8186
"timeout_millis": 60000,
82-
"retry_codes_name": "idempotent2",
87+
"retry_codes_name": "idempotent",
8388
"retry_params_name": "default",
8489
},
8590
"UpdateCmekSettings": {

google/cloud/logging_v2/gapic/enums.py

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ class LaunchStage(enum.IntEnum):
4747
limited production use cases.
4848
GA (int): GA features are open to all developers and are considered stable and
4949
fully qualified for production use.
50-
DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more
51-
information, see the “Deprecation Policy” section of our `Terms of
50+
DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For
51+
more information, see the “Deprecation Policy” section of our `Terms of
5252
Service <https://cloud.google.com/terms/>`__ and the `Google Cloud
5353
Platform Subject to the Deprecation
5454
Policy <https://cloud.google.com/terms/deprecation>`__ documentation.
@@ -62,10 +62,26 @@ class LaunchStage(enum.IntEnum):
6262
DEPRECATED = 5
6363

6464

65+
class LifecycleState(enum.IntEnum):
66+
"""
67+
LogBucket lifecycle states (Beta).
68+
69+
Attributes:
70+
LIFECYCLE_STATE_UNSPECIFIED (int): Unspecified state. This is only used/useful for distinguishing
71+
unset values.
72+
ACTIVE (int): The normal and active state.
73+
DELETE_REQUESTED (int): The bucket has been marked for deletion by the user.
74+
"""
75+
76+
LIFECYCLE_STATE_UNSPECIFIED = 0
77+
ACTIVE = 1
78+
DELETE_REQUESTED = 2
79+
80+
6581
class LogSeverity(enum.IntEnum):
6682
"""
67-
The severity of the event described in a log entry, expressed as one of
68-
the standard severity levels listed below. For your reference, the
83+
The severity of the event described in a log entry, expressed as one
84+
of the standard severity levels listed below. For your reference, the
6985
levels are assigned the listed numeric values. The effect of using
7086
numeric values other than those listed is undefined.
7187
@@ -75,7 +91,7 @@ class LogSeverity(enum.IntEnum):
7591
7692
::
7793
78-
severity > DEBUG AND severity <= WARNING
94+
severity > DEBUG AND severity <= WARNING
7995
8096
If you are writing log entries, you should map other severity encodings
8197
to one of these standard levels. For example, you might map all of
@@ -109,8 +125,8 @@ class LogSeverity(enum.IntEnum):
109125

110126
class NullValue(enum.IntEnum):
111127
"""
112-
``NullValue`` is a singleton enumeration to represent the null value for
113-
the ``Value`` type union.
128+
``NullValue`` is a singleton enumeration to represent the null value
129+
for the ``Value`` type union.
114130
115131
The JSON representation for ``NullValue`` is JSON ``null``.
116132
@@ -196,8 +212,8 @@ class ValueType(enum.IntEnum):
196212
197213
Attributes:
198214
VALUE_TYPE_UNSPECIFIED (int): Do not use this default value.
199-
BOOL (int): The value is a boolean. This value type can be used only if the metric
200-
kind is ``GAUGE``.
215+
BOOL (int): The value is a boolean. This value type can be used only if the
216+
metric kind is ``GAUGE``.
201217
INT64 (int): The value is a signed 64-bit integer.
202218
DOUBLE (int): The value is a double precision floating point number.
203219
STRING (int): The value is a text string. This value type can be used only if the

0 commit comments

Comments
 (0)