Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 693d570

Browse files
docs: Add documentation for enums (#156)
* 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: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDA4MGY4MzBkZWMzN2MzMzg0MTU3MDgyYmNlMjc5ZTM3MDc5ZWE1OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * work around docs issue Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 885f728 commit 693d570

File tree

10 files changed

+186
-14
lines changed

10 files changed

+186
-14
lines changed

google/cloud/orchestration/airflow/service_v1/services/environments/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1424,7 +1424,7 @@ def sample_load_snapshot():
14241424
# Done; return the response.
14251425
return response
14261426

1427-
def __enter__(self):
1427+
def __enter__(self) -> "EnvironmentsClient":
14281428
return self
14291429

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

google/cloud/orchestration/airflow/service_v1/services/image_versions/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ def sample_list_image_versions():
534534
# Done; return the response.
535535
return response
536536

537-
def __enter__(self):
537+
def __enter__(self) -> "ImageVersionsClient":
538538
return self
539539

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

google/cloud/orchestration/airflow/service_v1/types/environments.py

+55-2
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,18 @@ class EnvironmentConfig(proto.Message):
558558
"""
559559

560560
class EnvironmentSize(proto.Enum):
561-
r"""The size of the Cloud Composer environment."""
561+
r"""The size of the Cloud Composer environment.
562+
563+
Values:
564+
ENVIRONMENT_SIZE_UNSPECIFIED (0):
565+
The size of the environment is unspecified.
566+
ENVIRONMENT_SIZE_SMALL (1):
567+
The environment size is small.
568+
ENVIRONMENT_SIZE_MEDIUM (2):
569+
The environment size is medium.
570+
ENVIRONMENT_SIZE_LARGE (3):
571+
The environment size is large.
572+
"""
562573
ENVIRONMENT_SIZE_UNSPECIFIED = 0
563574
ENVIRONMENT_SIZE_SMALL = 1
564575
ENVIRONMENT_SIZE_MEDIUM = 2
@@ -1252,6 +1263,18 @@ class ConnectionType(proto.Enum):
12521263
r"""Represents connection type between Composer environment in
12531264
Customer Project and the corresponding Tenant project, from a
12541265
predefined list of available connection modes.
1266+
1267+
Values:
1268+
CONNECTION_TYPE_UNSPECIFIED (0):
1269+
No specific connection type was requested, so
1270+
the environment uses the default value
1271+
corresponding to the rest of its configuration.
1272+
VPC_PEERING (1):
1273+
Requests the use of VPC peerings for
1274+
connecting the Customer and Tenant projects.
1275+
PRIVATE_SERVICE_CONNECT (2):
1276+
Requests the use of Private Service Connect
1277+
for connecting the Customer and Tenant projects.
12551278
"""
12561279
CONNECTION_TYPE_UNSPECIFIED = 0
12571280
VPC_PEERING = 1
@@ -1654,7 +1677,28 @@ class Environment(proto.Message):
16541677
"""
16551678

16561679
class State(proto.Enum):
1657-
r"""State of the environment."""
1680+
r"""State of the environment.
1681+
1682+
Values:
1683+
STATE_UNSPECIFIED (0):
1684+
The state of the environment is unknown.
1685+
CREATING (1):
1686+
The environment is in the process of being
1687+
created.
1688+
RUNNING (2):
1689+
The environment is currently running and
1690+
healthy. It is ready for use.
1691+
UPDATING (3):
1692+
The environment is being updated. It remains
1693+
usable but cannot receive additional update
1694+
requests or be deleted at this time.
1695+
DELETING (4):
1696+
The environment is undergoing deletion. It
1697+
cannot be used.
1698+
ERROR (5):
1699+
The environment has encountered an error and
1700+
cannot be used.
1701+
"""
16581702
STATE_UNSPECIFIED = 0
16591703
CREATING = 1
16601704
RUNNING = 2
@@ -1724,6 +1768,15 @@ class CheckUpgradeResponse(proto.Message):
17241768
class ConflictResult(proto.Enum):
17251769
r"""Whether there were python modules conflict during image
17261770
build.
1771+
1772+
Values:
1773+
CONFLICT_RESULT_UNSPECIFIED (0):
1774+
It is unknown whether build had conflicts or
1775+
not.
1776+
CONFLICT (1):
1777+
There were python packages conflicts.
1778+
NO_CONFLICT (2):
1779+
There were no python packages conflicts.
17271780
"""
17281781
CONFLICT_RESULT_UNSPECIFIED = 0
17291782
CONFLICT = 1

google/cloud/orchestration/airflow/service_v1/types/operations.py

+36-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,24 @@ class OperationMetadata(proto.Message):
5353
"""
5454

5555
class State(proto.Enum):
56-
r"""An enum describing the overall state of an operation."""
56+
r"""An enum describing the overall state of an operation.
57+
58+
Values:
59+
STATE_UNSPECIFIED (0):
60+
Unused.
61+
PENDING (1):
62+
The operation has been created but is not yet
63+
started.
64+
RUNNING (2):
65+
The operation is underway.
66+
SUCCEEDED (3):
67+
The operation completed successfully.
68+
SUCCESSFUL (3):
69+
No description available.
70+
FAILED (4):
71+
The operation is no longer running but did
72+
not succeed.
73+
"""
5774
_pb_options = {"allow_alias": True}
5875
STATE_UNSPECIFIED = 0
5976
PENDING = 1
@@ -63,7 +80,24 @@ class State(proto.Enum):
6380
FAILED = 4
6481

6582
class Type(proto.Enum):
66-
r"""Type of longrunning operation."""
83+
r"""Type of longrunning operation.
84+
85+
Values:
86+
TYPE_UNSPECIFIED (0):
87+
Unused.
88+
CREATE (1):
89+
A resource creation operation.
90+
DELETE (2):
91+
A resource deletion operation.
92+
UPDATE (3):
93+
A resource update operation.
94+
CHECK (4):
95+
A resource check operation.
96+
SAVE_SNAPSHOT (5):
97+
Saves snapshot of the resource operation.
98+
LOAD_SNAPSHOT (6):
99+
Loads snapshot of the resource operation.
100+
"""
67101
TYPE_UNSPECIFIED = 0
68102
CREATE = 1
69103
DELETE = 2

google/cloud/orchestration/airflow/service_v1beta1/services/environments/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ def sample_load_snapshot():
16591659
# Done; return the response.
16601660
return response
16611661

1662-
def __enter__(self):
1662+
def __enter__(self) -> "EnvironmentsClient":
16631663
return self
16641664

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

google/cloud/orchestration/airflow/service_v1beta1/services/image_versions/client.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ def sample_list_image_versions():
536536
# Done; return the response.
537537
return response
538538

539-
def __enter__(self):
539+
def __enter__(self) -> "ImageVersionsClient":
540540
return self
541541

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

google/cloud/orchestration/airflow/service_v1beta1/types/environments.py

+55-2
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,18 @@ class EnvironmentConfig(proto.Message):
720720
"""
721721

722722
class EnvironmentSize(proto.Enum):
723-
r"""The size of the Cloud Composer environment."""
723+
r"""The size of the Cloud Composer environment.
724+
725+
Values:
726+
ENVIRONMENT_SIZE_UNSPECIFIED (0):
727+
The size of the environment is unspecified.
728+
ENVIRONMENT_SIZE_SMALL (1):
729+
The environment size is small.
730+
ENVIRONMENT_SIZE_MEDIUM (2):
731+
The environment size is medium.
732+
ENVIRONMENT_SIZE_LARGE (3):
733+
The environment size is large.
734+
"""
724735
ENVIRONMENT_SIZE_UNSPECIFIED = 0
725736
ENVIRONMENT_SIZE_SMALL = 1
726737
ENVIRONMENT_SIZE_MEDIUM = 2
@@ -1321,6 +1332,18 @@ class ConnectionType(proto.Enum):
13211332
r"""Represents connection type between Composer environment in
13221333
Customer Project and the corresponding Tenant project, from a
13231334
predefined list of available connection modes.
1335+
1336+
Values:
1337+
CONNECTION_TYPE_UNSPECIFIED (0):
1338+
No specific connection type was requested, so
1339+
the environment uses the default value
1340+
corresponding to the rest of its configuration.
1341+
VPC_PEERING (1):
1342+
Requests the use of VPC peerings for
1343+
connecting the Customer and Tenant projects.
1344+
PRIVATE_SERVICE_CONNECT (2):
1345+
Requests the use of Private Service Connect
1346+
for connecting the Customer and Tenant projects.
13241347
"""
13251348
CONNECTION_TYPE_UNSPECIFIED = 0
13261349
VPC_PEERING = 1
@@ -1882,7 +1905,28 @@ class Environment(proto.Message):
18821905
"""
18831906

18841907
class State(proto.Enum):
1885-
r"""State of the environment."""
1908+
r"""State of the environment.
1909+
1910+
Values:
1911+
STATE_UNSPECIFIED (0):
1912+
The state of the environment is unknown.
1913+
CREATING (1):
1914+
The environment is in the process of being
1915+
created.
1916+
RUNNING (2):
1917+
The environment is currently running and
1918+
healthy. It is ready for use.
1919+
UPDATING (3):
1920+
The environment is being updated. It remains
1921+
usable but cannot receive additional update
1922+
requests or be deleted at this time.
1923+
DELETING (4):
1924+
The environment is undergoing deletion. It
1925+
cannot be used.
1926+
ERROR (5):
1927+
The environment has encountered an error and
1928+
cannot be used.
1929+
"""
18861930
STATE_UNSPECIFIED = 0
18871931
CREATING = 1
18881932
RUNNING = 2
@@ -2003,6 +2047,15 @@ class CheckUpgradeResponse(proto.Message):
20032047
class ConflictResult(proto.Enum):
20042048
r"""Whether there were python modules conflict during image
20052049
build.
2050+
2051+
Values:
2052+
CONFLICT_RESULT_UNSPECIFIED (0):
2053+
It is unknown whether build had conflicts or
2054+
not.
2055+
CONFLICT (1):
2056+
There were python packages conflicts.
2057+
NO_CONFLICT (2):
2058+
There were no python packages conflicts.
20062059
"""
20072060
CONFLICT_RESULT_UNSPECIFIED = 0
20082061
CONFLICT = 1

google/cloud/orchestration/airflow/service_v1beta1/types/operations.py

+34-2
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,47 @@ class OperationMetadata(proto.Message):
5353
"""
5454

5555
class State(proto.Enum):
56-
r"""An enum describing the overall state of an operation."""
56+
r"""An enum describing the overall state of an operation.
57+
58+
Values:
59+
STATE_UNSPECIFIED (0):
60+
Unused.
61+
PENDING (1):
62+
The operation has been created but is not yet
63+
started.
64+
RUNNING (2):
65+
The operation is underway.
66+
SUCCESSFUL (3):
67+
The operation completed successfully.
68+
FAILED (4):
69+
The operation is no longer running but did
70+
not succeed.
71+
"""
5772
STATE_UNSPECIFIED = 0
5873
PENDING = 1
5974
RUNNING = 2
6075
SUCCESSFUL = 3
6176
FAILED = 4
6277

6378
class Type(proto.Enum):
64-
r"""Type of longrunning operation."""
79+
r"""Type of longrunning operation.
80+
81+
Values:
82+
TYPE_UNSPECIFIED (0):
83+
Unused.
84+
CREATE (1):
85+
A resource creation operation.
86+
DELETE (2):
87+
A resource deletion operation.
88+
UPDATE (3):
89+
A resource update operation.
90+
CHECK (4):
91+
A resource check operation.
92+
SAVE_SNAPSHOT (5):
93+
Saves snapshot of the resource operation.
94+
LOAD_SNAPSHOT (6):
95+
Loads snapshot of the resource operation.
96+
"""
6597
TYPE_UNSPECIFIED = 0
6698
CREATE = 1
6799
DELETE = 2

samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-orchestration-airflow",
11-
"version": "1.6.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.orchestration.airflow.service.v1beta1.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-orchestration-airflow-service",
11-
"version": "1.6.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)