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

Commit 970b8d3

Browse files
docs: Add documentation for enums (#52)
* 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 * restore rest support Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent f000153 commit 970b8d3

File tree

8 files changed

+185
-11
lines changed

8 files changed

+185
-11
lines changed

google/cloud/gke_multicloud_v1/services/attached_clusters/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1594,7 +1594,7 @@ def sample_generate_attached_cluster_install_manifest():
15941594
# Done; return the response.
15951595
return response
15961596

1597-
def __enter__(self):
1597+
def __enter__(self) -> "AttachedClustersClient":
15981598
return self
15991599

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

google/cloud/gke_multicloud_v1/services/aws_clusters/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,7 @@ def sample_get_aws_server_config():
21372137
# Done; return the response.
21382138
return response
21392139

2140-
def __enter__(self):
2140+
def __enter__(self) -> "AwsClustersClient":
21412141
return self
21422142

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

google/cloud/gke_multicloud_v1/services/azure_clusters/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2712,7 +2712,7 @@ def sample_get_azure_server_config():
27122712
# Done; return the response.
27132713
return response
27142714

2715-
def __enter__(self):
2715+
def __enter__(self) -> "AzureClustersClient":
27162716
return self
27172717

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

google/cloud/gke_multicloud_v1/types/attached_resources.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,32 @@ class AttachedCluster(proto.Message):
125125
"""
126126

127127
class State(proto.Enum):
128-
r"""The lifecycle state of the cluster."""
128+
r"""The lifecycle state of the cluster.
129+
130+
Values:
131+
STATE_UNSPECIFIED (0):
132+
Not set.
133+
PROVISIONING (1):
134+
The PROVISIONING state indicates the cluster
135+
is being registered.
136+
RUNNING (2):
137+
The RUNNING state indicates the cluster has
138+
been register and is fully usable.
139+
RECONCILING (3):
140+
The RECONCILING state indicates that some
141+
work is actively being done on the cluster, such
142+
as upgrading software components.
143+
STOPPING (4):
144+
The STOPPING state indicates the cluster is
145+
being de-registered.
146+
ERROR (5):
147+
The ERROR state indicates the cluster is in a
148+
broken unrecoverable state.
149+
DEGRADED (6):
150+
The DEGRADED state indicates the cluster
151+
requires user action to restore full
152+
functionality.
153+
"""
129154
STATE_UNSPECIFIED = 0
130155
PROVISIONING = 1
131156
RUNNING = 2

google/cloud/gke_multicloud_v1/types/aws_resources.py

Lines changed: 69 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,32 @@ class AwsCluster(proto.Message):
135135
"""
136136

137137
class State(proto.Enum):
138-
r"""The lifecycle state of the cluster."""
138+
r"""The lifecycle state of the cluster.
139+
140+
Values:
141+
STATE_UNSPECIFIED (0):
142+
Not set.
143+
PROVISIONING (1):
144+
The PROVISIONING state indicates the cluster
145+
is being created.
146+
RUNNING (2):
147+
The RUNNING state indicates the cluster has
148+
been created and is fully usable.
149+
RECONCILING (3):
150+
The RECONCILING state indicates that some
151+
work is actively being done on the cluster, such
152+
as upgrading the control plane replicas.
153+
STOPPING (4):
154+
The STOPPING state indicates the cluster is
155+
being deleted.
156+
ERROR (5):
157+
The ERROR state indicates the cluster is in a
158+
broken unrecoverable state.
159+
DEGRADED (6):
160+
The DEGRADED state indicates the cluster
161+
requires user action to restore full
162+
functionality.
163+
"""
139164
STATE_UNSPECIFIED = 0
140165
PROVISIONING = 1
141166
RUNNING = 2
@@ -493,6 +518,14 @@ class VolumeType(proto.Enum):
493518
See
494519
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSVolumeTypes.html
495520
for more information.
521+
522+
Values:
523+
VOLUME_TYPE_UNSPECIFIED (0):
524+
Not set.
525+
GP2 (1):
526+
GP2 (General Purpose SSD volume type).
527+
GP3 (2):
528+
GP3 (General Purpose SSD volume type).
496529
"""
497530
VOLUME_TYPE_UNSPECIFIED = 0
498531
GP2 = 1
@@ -625,7 +658,31 @@ class AwsNodePool(proto.Message):
625658
"""
626659

627660
class State(proto.Enum):
628-
r"""The lifecycle state of the node pool."""
661+
r"""The lifecycle state of the node pool.
662+
663+
Values:
664+
STATE_UNSPECIFIED (0):
665+
Not set.
666+
PROVISIONING (1):
667+
The PROVISIONING state indicates the node
668+
pool is being created.
669+
RUNNING (2):
670+
The RUNNING state indicates the node pool has
671+
been created and is fully usable.
672+
RECONCILING (3):
673+
The RECONCILING state indicates that the node
674+
pool is being reconciled.
675+
STOPPING (4):
676+
The STOPPING state indicates the node pool is
677+
being deleted.
678+
ERROR (5):
679+
The ERROR state indicates the node pool is in
680+
a broken unrecoverable state.
681+
DEGRADED (6):
682+
The DEGRADED state indicates the node pool
683+
requires user action to restore full
684+
functionality.
685+
"""
629686
STATE_UNSPECIFIED = 0
630687
PROVISIONING = 1
631688
RUNNING = 2
@@ -967,6 +1024,16 @@ class AwsInstancePlacement(proto.Message):
9671024
class Tenancy(proto.Enum):
9681025
r"""Tenancy defines how EC2 instances are distributed across
9691026
physical hardware.
1027+
1028+
Values:
1029+
TENANCY_UNSPECIFIED (0):
1030+
Not set.
1031+
DEFAULT (1):
1032+
Use default VPC tenancy.
1033+
DEDICATED (2):
1034+
Run a dedicated instance.
1035+
HOST (3):
1036+
Launch this instance to a dedicated host.
9701037
"""
9711038
TENANCY_UNSPECIFIED = 0
9721039
DEFAULT = 1

google/cloud/gke_multicloud_v1/types/azure_resources.py

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,32 @@ class AzureCluster(proto.Message):
157157
"""
158158

159159
class State(proto.Enum):
160-
r"""The lifecycle state of the cluster."""
160+
r"""The lifecycle state of the cluster.
161+
162+
Values:
163+
STATE_UNSPECIFIED (0):
164+
Not set.
165+
PROVISIONING (1):
166+
The PROVISIONING state indicates the cluster
167+
is being created.
168+
RUNNING (2):
169+
The RUNNING state indicates the cluster has
170+
been created and is fully usable.
171+
RECONCILING (3):
172+
The RECONCILING state indicates that some
173+
work is actively being done on the cluster, such
174+
as upgrading the control plane replicas.
175+
STOPPING (4):
176+
The STOPPING state indicates the cluster is
177+
being deleted.
178+
ERROR (5):
179+
The ERROR state indicates the cluster is in a
180+
broken unrecoverable state.
181+
DEGRADED (6):
182+
The DEGRADED state indicates the cluster
183+
requires user action to restore full
184+
functionality.
185+
"""
161186
STATE_UNSPECIFIED = 0
162187
PROVISIONING = 1
163188
RUNNING = 2
@@ -790,7 +815,31 @@ class AzureNodePool(proto.Message):
790815
"""
791816

792817
class State(proto.Enum):
793-
r"""The lifecycle state of the node pool."""
818+
r"""The lifecycle state of the node pool.
819+
820+
Values:
821+
STATE_UNSPECIFIED (0):
822+
Not set.
823+
PROVISIONING (1):
824+
The PROVISIONING state indicates the node
825+
pool is being created.
826+
RUNNING (2):
827+
The RUNNING state indicates the node pool has
828+
been created and is fully usable.
829+
RECONCILING (3):
830+
The RECONCILING state indicates that the node
831+
pool is being reconciled.
832+
STOPPING (4):
833+
The STOPPING state indicates the node pool is
834+
being deleted.
835+
ERROR (5):
836+
The ERROR state indicates the node pool is in
837+
a broken unrecoverable state.
838+
DEGRADED (6):
839+
The DEGRADED state indicates the node pool
840+
requires user action to restore full
841+
functionality.
842+
"""
794843
STATE_UNSPECIFIED = 0
795844
PROVISIONING = 1
796845
RUNNING = 2

google/cloud/gke_multicloud_v1/types/common_resources.py

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,29 @@ class NodeTaint(proto.Message):
154154
"""
155155

156156
class Effect(proto.Enum):
157-
r"""The taint effect."""
157+
r"""The taint effect.
158+
159+
Values:
160+
EFFECT_UNSPECIFIED (0):
161+
Not set.
162+
NO_SCHEDULE (1):
163+
Do not allow new pods to schedule onto the
164+
node unless they tolerate the taint, but allow
165+
all pods submitted to Kubelet without going
166+
through the scheduler to start, and allow all
167+
already-running pods to continue running.
168+
Enforced by the scheduler.
169+
PREFER_NO_SCHEDULE (2):
170+
Like TaintEffectNoSchedule, but the scheduler
171+
tries not to schedule new pods onto the node,
172+
rather than prohibiting new pods from scheduling
173+
onto the node entirely. Enforced by the
174+
scheduler.
175+
NO_EXECUTE (3):
176+
Evict any already-running pods that do not
177+
tolerate the taint. Currently enforced by
178+
NodeController.
179+
"""
158180
EFFECT_UNSPECIFIED = 0
159181
NO_SCHEDULE = 1
160182
PREFER_NO_SCHEDULE = 2
@@ -237,7 +259,18 @@ class LoggingComponentConfig(proto.Message):
237259
"""
238260

239261
class Component(proto.Enum):
240-
r"""The components of the logging configuration;"""
262+
r"""The components of the logging configuration;
263+
264+
Values:
265+
COMPONENT_UNSPECIFIED (0):
266+
No component is specified
267+
SYSTEM_COMPONENTS (1):
268+
This indicates that system logging components
269+
is enabled.
270+
WORKLOADS (2):
271+
This indicates that user workload logging
272+
component is enabled.
273+
"""
241274
COMPONENT_UNSPECIFIED = 0
242275
SYSTEM_COMPONENTS = 1
243276
WORKLOADS = 2

samples/generated_samples/snippet_metadata_google.cloud.gkemulticloud.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-gke-multicloud",
11-
"version": "0.5.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)