Skip to content

Commit ef5c838

Browse files
authored
Logging: add 'synth.py'. (#6081)
Closes #6073.
1 parent c657fce commit ef5c838

19 files changed

+1868
-1683
lines changed

google/cloud/logging_v2/gapic/config_service_v2_client.py

Lines changed: 224 additions & 145 deletions
Large diffs are not rendered by default.

google/cloud/logging_v2/gapic/config_service_v2_client_config.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@
88
"retry_params": {
99
"default": {
1010
"initial_retry_delay_millis": 100,
11-
"retry_delay_multiplier": 1.2,
12-
"max_retry_delay_millis": 1000,
13-
"initial_rpc_timeout_millis": 30000,
14-
"rpc_timeout_multiplier": 1.5,
15-
"max_rpc_timeout_millis": 60000,
16-
"total_timeout_millis": 90000
11+
"retry_delay_multiplier": 1.3,
12+
"max_retry_delay_millis": 60000,
13+
"initial_rpc_timeout_millis": 20000,
14+
"rpc_timeout_multiplier": 1.0,
15+
"max_rpc_timeout_millis": 20000,
16+
"total_timeout_millis": 600000
1717
},
1818
"write_sink": {
1919
"initial_retry_delay_millis": 100,
20-
"retry_delay_multiplier": 1.2,
21-
"max_retry_delay_millis": 1000,
22-
"initial_rpc_timeout_millis": 30000,
23-
"rpc_timeout_multiplier": 1.5,
24-
"max_rpc_timeout_millis": 60000,
25-
"total_timeout_millis": 120000
20+
"retry_delay_multiplier": 1.3,
21+
"max_retry_delay_millis": 60000,
22+
"initial_rpc_timeout_millis": 20000,
23+
"rpc_timeout_multiplier": 1.0,
24+
"max_rpc_timeout_millis": 20000,
25+
"total_timeout_millis": 600000
2626
}
2727
},
2828
"methods": {
@@ -43,7 +43,7 @@
4343
},
4444
"UpdateSink": {
4545
"timeout_millis": 120000,
46-
"retry_codes_name": "non_idempotent",
46+
"retry_codes_name": "idempotent",
4747
"retry_params_name": "default"
4848
},
4949
"DeleteSink": {

google/cloud/logging_v2/gapic/enums.py

Lines changed: 84 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# -*- coding: utf-8 -*-
2+
#
13
# Copyright 2018 Google LLC
24
#
35
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,8 +15,65 @@
1315
# limitations under the License.
1416
"""Wrappers for protocol buffer enum types."""
1517

18+
import enum
19+
20+
21+
class LaunchStage(enum.IntEnum):
22+
"""
23+
The launch stage as defined by [Google Cloud Platform
24+
Launch Stages](http://cloud.google.com/terms/launch-stages).
25+
26+
Attributes:
27+
LAUNCH_STAGE_UNSPECIFIED (int): Do not use this default value.
28+
EARLY_ACCESS (int): Early Access features are limited to a closed group of testers. To use
29+
these features, you must sign up in advance and sign a Trusted Tester
30+
agreement (which includes confidentiality provisions). These features may
31+
be unstable, changed in backward-incompatible ways, and are not
32+
guaranteed to be released.
33+
ALPHA (int): Alpha is a limited availability test for releases before they are cleared
34+
for widespread use. By Alpha, all significant design issues are resolved
35+
and we are in the process of verifying functionality. Alpha customers
36+
need to apply for access, agree to applicable terms, and have their
37+
projects whitelisted. Alpha releases don’t have to be feature complete,
38+
no SLAs are provided, and there are no technical support obligations, but
39+
they will be far enough along that customers can actually use them in
40+
test environments or for limited-use tests -- just like they would in
41+
normal production cases.
42+
BETA (int): Beta is the point at which we are ready to open a release for any
43+
customer to use. There are no SLA or technical support obligations in a
44+
Beta release. Products will be complete from a feature perspective, but
45+
may have some open outstanding issues. Beta releases are suitable for
46+
limited production use cases.
47+
GA (int): GA features are open to all developers and are considered stable and
48+
fully qualified for production use.
49+
DEPRECATED (int): Deprecated features are scheduled to be shut down and removed. For more
50+
information, see the “Deprecation Policy” section of our [Terms of
51+
Service](https://cloud.google.com/terms/)
52+
and the [Google Cloud Platform Subject to the Deprecation
53+
Policy](https://cloud.google.com/terms/deprecation) documentation.
54+
"""
55+
LAUNCH_STAGE_UNSPECIFIED = 0
56+
EARLY_ACCESS = 1
57+
ALPHA = 2
58+
BETA = 3
59+
GA = 4
60+
DEPRECATED = 5
61+
1662

17-
class LogSeverity(object):
63+
class NullValue(enum.IntEnum):
64+
"""
65+
``NullValue`` is a singleton enumeration to represent the null value for the
66+
``Value`` type union.
67+
68+
The JSON representation for ``NullValue`` is JSON ``null``.
69+
70+
Attributes:
71+
NULL_VALUE (int): Null value.
72+
"""
73+
NULL_VALUE = 0
74+
75+
76+
class LogSeverity(enum.IntEnum):
1877
"""
1978
The severity of the event described in a log entry, expressed as one of the
2079
standard severity levels listed below. For your reference, the levels are
@@ -57,21 +116,8 @@ class LogSeverity(object):
57116
EMERGENCY = 800
58117

59118

60-
class NullValue(object):
61-
"""
62-
``NullValue`` is a singleton enumeration to represent the null value for the
63-
``Value`` type union.
64-
65-
The JSON representation for ``NullValue`` is JSON ``null``.
66-
67-
Attributes:
68-
NULL_VALUE (int): Null value.
69-
"""
70-
NULL_VALUE = 0
71-
72-
73119
class LabelDescriptor(object):
74-
class ValueType(object):
120+
class ValueType(enum.IntEnum):
75121
"""
76122
Value types that can be used as label values.
77123
@@ -85,25 +131,8 @@ class ValueType(object):
85131
INT64 = 2
86132

87133

88-
class LogSink(object):
89-
class VersionFormat(object):
90-
"""
91-
Available log entry formats. Log entries can be written to Stackdriver
92-
Logging in either format and can be exported in either format.
93-
Version 2 is the preferred format.
94-
95-
Attributes:
96-
VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2.
97-
V2 (int): ``LogEntry`` version 2 format.
98-
V1 (int): ``LogEntry`` version 1 format.
99-
"""
100-
VERSION_FORMAT_UNSPECIFIED = 0
101-
V2 = 1
102-
V1 = 2
103-
104-
105134
class MetricDescriptor(object):
106-
class MetricKind(object):
135+
class MetricKind(enum.IntEnum):
107136
"""
108137
The kind of measurement. It describes how the data is reported.
109138
@@ -122,7 +151,7 @@ class MetricKind(object):
122151
DELTA = 2
123152
CUMULATIVE = 3
124153

125-
class ValueType(object):
154+
class ValueType(enum.IntEnum):
126155
"""
127156
The value type of a metric.
128157
@@ -147,13 +176,30 @@ class ValueType(object):
147176

148177

149178
class LogMetric(object):
150-
class ApiVersion(object):
179+
class ApiVersion(enum.IntEnum):
151180
"""
152-
Stackdriver Logging API version.
181+
Logging API version.
153182
154183
Attributes:
155-
V2 (int): Stackdriver Logging API v2.
156-
V1 (int): Stackdriver Logging API v1.
184+
V2 (int): Logging API v2.
185+
V1 (int): Logging API v1.
157186
"""
158187
V2 = 0
159188
V1 = 1
189+
190+
191+
class LogSink(object):
192+
class VersionFormat(enum.IntEnum):
193+
"""
194+
Available log entry formats. Log entries can be written to
195+
Logging in either format and can be exported in either format.
196+
Version 2 is the preferred format.
197+
198+
Attributes:
199+
VERSION_FORMAT_UNSPECIFIED (int): An unspecified format version that will default to V2.
200+
V2 (int): ``LogEntry`` version 2 format.
201+
V1 (int): ``LogEntry`` version 1 format.
202+
"""
203+
VERSION_FORMAT_UNSPECIFIED = 0
204+
V2 = 1
205+
V1 = 2

0 commit comments

Comments
 (0)