Skip to content

Commit f6528fc

Browse files
docs: Add documentation for enums (#219)
* 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 93cb8af commit f6528fc

File tree

8 files changed

+140
-8
lines changed

8 files changed

+140
-8
lines changed

packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/types/configmanagement.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,17 @@
5050
class DeploymentState(proto.Enum):
5151
r"""Enum representing the state of an ACM's deployment on a
5252
cluster
53+
54+
Values:
55+
DEPLOYMENT_STATE_UNSPECIFIED (0):
56+
Deployment's state cannot be determined
57+
NOT_INSTALLED (1):
58+
Deployment is not installed
59+
INSTALLED (2):
60+
Deployment is installed
61+
ERROR (3):
62+
Deployment was attempted to be installed, but
63+
has errors
5364
"""
5465
DEPLOYMENT_STATE_UNSPECIFIED = 0
5566
NOT_INSTALLED = 1
@@ -597,6 +608,29 @@ class SyncState(proto.Message):
597608
class SyncCode(proto.Enum):
598609
r"""An enum representing an ACM's status syncing configs to a
599610
cluster
611+
612+
Values:
613+
SYNC_CODE_UNSPECIFIED (0):
614+
ACM cannot determine a sync code
615+
SYNCED (1):
616+
ACM successfully synced the git Repo with the
617+
cluster
618+
PENDING (2):
619+
ACM is in the progress of syncing a new
620+
change
621+
ERROR (3):
622+
Indicates an error configuring ACM, and user
623+
action is required
624+
NOT_CONFIGURED (4):
625+
ACM has been installed (operator manifest
626+
deployed), but not configured.
627+
NOT_INSTALLED (5):
628+
ACM has not been installed (no operator pod
629+
found)
630+
UNAUTHORIZED (6):
631+
Error authorizing with the cluster
632+
UNREACHABLE (7):
633+
Cluster could not be reached
600634
"""
601635
SYNC_CODE_UNSPECIFIED = 0
602636
SYNCED = 1

packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1822,7 +1822,7 @@ def sample_generate_connect_manifest():
18221822
# Done; return the response.
18231823
return response
18241824

1825-
def __enter__(self):
1825+
def __enter__(self) -> "GkeHubClient":
18261826
return self
18271827

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

packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,28 @@ class FeatureResourceState(proto.Message):
163163
"""
164164

165165
class State(proto.Enum):
166-
r"""State describes the lifecycle status of a Feature."""
166+
r"""State describes the lifecycle status of a Feature.
167+
168+
Values:
169+
STATE_UNSPECIFIED (0):
170+
State is unknown or not set.
171+
ENABLING (1):
172+
The Feature is being enabled, and the Feature
173+
resource is being created. Once complete, the
174+
corresponding Feature will be enabled in this
175+
Hub.
176+
ACTIVE (2):
177+
The Feature is enabled in this Hub, and the
178+
Feature resource is fully available.
179+
DISABLING (3):
180+
The Feature is being disabled in this Hub,
181+
and the Feature resource is being deleted.
182+
UPDATING (4):
183+
The Feature resource is being updated.
184+
SERVICE_UPDATING (5):
185+
The Feature resource is being updated by the
186+
Hub Service.
187+
"""
167188
STATE_UNSPECIFIED = 0
168189
ENABLING = 1
169190
ACTIVE = 2
@@ -198,6 +219,24 @@ class FeatureState(proto.Message):
198219
class Code(proto.Enum):
199220
r"""Code represents a machine-readable, high-level status of the
200221
Feature.
222+
223+
Values:
224+
CODE_UNSPECIFIED (0):
225+
Unknown or not set.
226+
OK (1):
227+
The Feature is operating normally.
228+
WARNING (2):
229+
The Feature has encountered an issue, and is
230+
operating in a degraded state. The Feature may
231+
need intervention to return to normal operation.
232+
See the description and any associated
233+
Feature-specific details for more information.
234+
ERROR (3):
235+
The Feature is not operating or is in a
236+
severely degraded state. The Feature may need
237+
intervention to return to normal operation. See
238+
the description and any associated
239+
Feature-specific details for more information.
201240
"""
202241
CODE_UNSPECIFIED = 0
203242
OK = 1

packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/membership.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,23 @@ class MembershipState(proto.Message):
424424
"""
425425

426426
class Code(proto.Enum):
427-
r"""Code describes the state of a Membership resource."""
427+
r"""Code describes the state of a Membership resource.
428+
429+
Values:
430+
CODE_UNSPECIFIED (0):
431+
The code is not set.
432+
CREATING (1):
433+
The cluster is being registered.
434+
READY (2):
435+
The cluster is registered.
436+
DELETING (3):
437+
The cluster is being unregistered.
438+
UPDATING (4):
439+
The Membership is being updated.
440+
SERVICE_UPDATING (5):
441+
The Membership is being updated by the Hub
442+
Service.
443+
"""
428444
CODE_UNSPECIFIED = 0
429445
CREATING = 1
430446
READY = 2

packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1379,7 +1379,7 @@ def sample_generate_exclusivity_manifest():
13791379
# Done; return the response.
13801380
return response
13811381

1382-
def __enter__(self):
1382+
def __enter__(self) -> "GkeHubMembershipServiceClient":
13831383
return self
13841384

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

packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/types/membership.py

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,19 @@ class InfrastructureType(proto.Enum):
142142
Each GKE distribution (on-GCP, on-Prem, on-X,...) will set this
143143
field automatically, but Attached Clusters customers should
144144
specify a type during registration.
145+
146+
Values:
147+
INFRASTRUCTURE_TYPE_UNSPECIFIED (0):
148+
No type was specified. Some Hub functionality
149+
may require a type be specified, and will not
150+
support Memberships with this value.
151+
ON_PREM (1):
152+
Private infrastructure that is owned or
153+
operated by customer. This includes GKE
154+
distributions such as GKE-OnPrem and
155+
GKE-OnBareMetal.
156+
MULTI_CLOUD (2):
157+
Public cloud infrastructure.
145158
"""
146159
INFRASTRUCTURE_TYPE_UNSPECIFIED = 0
147160
ON_PREM = 1
@@ -482,7 +495,21 @@ class OnPremCluster(proto.Message):
482495
"""
483496

484497
class ClusterType(proto.Enum):
485-
r"""ClusterType describes on prem cluster's type."""
498+
r"""ClusterType describes on prem cluster's type.
499+
500+
Values:
501+
CLUSTERTYPE_UNSPECIFIED (0):
502+
The ClusterType is not set.
503+
BOOTSTRAP (1):
504+
The ClusterType is bootstrap cluster.
505+
HYBRID (2):
506+
The ClusterType is baremetal hybrid cluster.
507+
STANDALONE (3):
508+
The ClusterType is baremetal standalone
509+
cluster.
510+
USER (4):
511+
The ClusterType is user cluster.
512+
"""
486513
CLUSTERTYPE_UNSPECIFIED = 0
487514
BOOTSTRAP = 1
488515
HYBRID = 2
@@ -703,7 +730,23 @@ class MembershipState(proto.Message):
703730
"""
704731

705732
class Code(proto.Enum):
706-
r"""Code describes the state of a Membership resource."""
733+
r"""Code describes the state of a Membership resource.
734+
735+
Values:
736+
CODE_UNSPECIFIED (0):
737+
The code is not set.
738+
CREATING (1):
739+
The cluster is being registered.
740+
READY (2):
741+
The cluster is registered.
742+
DELETING (3):
743+
The cluster is being unregistered.
744+
UPDATING (4):
745+
The Membership is being updated.
746+
SERVICE_UPDATING (5):
747+
The Membership is being updated by the Hub
748+
Service.
749+
"""
707750
CODE_UNSPECIFIED = 0
708751
CREATING = 1
709752
READY = 2

packages/google-cloud-gke-hub/samples/generated_samples/snippet_metadata_google.cloud.gkehub.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-hub",
11-
"version": "1.7.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-gke-hub/samples/generated_samples/snippet_metadata_google.cloud.gkehub.v1beta1.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-hub",
11-
"version": "1.7.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)