Skip to content

Commit 4b55f23

Browse files
docs: Add documentation for enums (#186)
* 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>
1 parent b16b81f commit 4b55f23

File tree

4 files changed

+92
-6
lines changed

4 files changed

+92
-6
lines changed

packages/google-cloud-service-management/google/cloud/servicemanagement_v1/services/service_manager/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,7 @@ def sample_generate_config_report():
21922192
# Done; return the response.
21932193
return response
21942194

2195-
def __enter__(self):
2195+
def __enter__(self) -> "ServiceManagerClient":
21962196
return self
21972197

21982198
def __exit__(self, type, value, traceback):

packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/resources.py

Lines changed: 77 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,24 @@ class OperationMetadata(proto.Message):
7979
class Status(proto.Enum):
8080
r"""Code describes the status of the operation (or one of its
8181
steps).
82+
83+
Values:
84+
STATUS_UNSPECIFIED (0):
85+
Unspecifed code.
86+
DONE (1):
87+
The operation or step has completed without
88+
errors.
89+
NOT_STARTED (2):
90+
The operation or step has not started yet.
91+
IN_PROGRESS (3):
92+
The operation or step is in progress.
93+
FAILED (4):
94+
The operation or step has completed with
95+
errors. If the operation is rollbackable, the
96+
rollback completed with errors too.
97+
CANCELLED (5):
98+
The operation or step has completed with
99+
cancellation.
82100
"""
83101
STATUS_UNSPECIFIED = 0
84102
DONE = 1
@@ -141,7 +159,14 @@ class Diagnostic(proto.Message):
141159
"""
142160

143161
class Kind(proto.Enum):
144-
r"""The kind of diagnostic information possible."""
162+
r"""The kind of diagnostic information possible.
163+
164+
Values:
165+
WARNING (0):
166+
Warnings and errors
167+
ERROR (1):
168+
Only errors
169+
"""
145170
WARNING = 0
146171
ERROR = 1
147172

@@ -201,7 +226,34 @@ class ConfigFile(proto.Message):
201226
"""
202227

203228
class FileType(proto.Enum):
204-
r""""""
229+
r"""
230+
231+
Values:
232+
FILE_TYPE_UNSPECIFIED (0):
233+
Unknown file type.
234+
SERVICE_CONFIG_YAML (1):
235+
YAML-specification of service.
236+
OPEN_API_JSON (2):
237+
OpenAPI specification, serialized in JSON.
238+
OPEN_API_YAML (3):
239+
OpenAPI specification, serialized in YAML.
240+
FILE_DESCRIPTOR_SET_PROTO (4):
241+
FileDescriptorSet, generated by protoc.
242+
243+
To generate, use protoc with imports and source info
244+
included. For an example test.proto file, the following
245+
command would put the value in a new file named out.pb.
246+
247+
$protoc --include_imports --include_source_info test.proto
248+
-o out.pb
249+
PROTO_FILE (6):
250+
Uncompiled Proto file. Used for storage and display purposes
251+
only, currently server-side compilation is not supported.
252+
Should match the inputs to 'protoc' command used to
253+
generated FILE_DESCRIPTOR_SET_PROTO. A file of this type can
254+
only be included if at least one file of type
255+
FILE_DESCRIPTOR_SET_PROTO is included.
256+
"""
205257
FILE_TYPE_UNSPECIFIED = 0
206258
SERVICE_CONFIG_YAML = 1
207259
OPEN_API_JSON = 2
@@ -314,7 +366,29 @@ class Rollout(proto.Message):
314366
"""
315367

316368
class RolloutStatus(proto.Enum):
317-
r"""Status of a Rollout."""
369+
r"""Status of a Rollout.
370+
371+
Values:
372+
ROLLOUT_STATUS_UNSPECIFIED (0):
373+
No status specified.
374+
IN_PROGRESS (1):
375+
The Rollout is in progress.
376+
SUCCESS (2):
377+
The Rollout has completed successfully.
378+
CANCELLED (3):
379+
The Rollout has been cancelled. This can
380+
happen if you have overlapping Rollout pushes,
381+
and the previous ones will be cancelled.
382+
FAILED (4):
383+
The Rollout has failed and the rollback
384+
attempt has failed too.
385+
PENDING (5):
386+
The Rollout has not started yet and is
387+
pending for execution.
388+
FAILED_ROLLED_BACK (6):
389+
The Rollout has failed and rolled back to the
390+
previous successful Rollout.
391+
"""
318392
ROLLOUT_STATUS_UNSPECIFIED = 0
319393
IN_PROGRESS = 1
320394
SUCCESS = 2

packages/google-cloud-service-management/google/cloud/servicemanagement_v1/types/servicemanager.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,19 @@ class GetServiceConfigRequest(proto.Message):
216216
"""
217217

218218
class ConfigView(proto.Enum):
219-
r""""""
219+
r"""
220+
221+
Values:
222+
BASIC (0):
223+
Server response includes all fields except
224+
SourceInfo.
225+
FULL (1):
226+
Server response includes all fields including
227+
SourceInfo. SourceFiles are of type
228+
'google.api.servicemanagement.v1.ConfigFile' and
229+
are only available for configs created using the
230+
SubmitConfigSource method.
231+
"""
220232
BASIC = 0
221233
FULL = 1
222234

packages/google-cloud-service-management/samples/generated_samples/snippet_metadata_google.api.servicemanagement.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-service-management",
11-
"version": "1.5.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)