Skip to content

Commit

Permalink
docs: Add documentation for enums (#219)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jan 20, 2023
1 parent 93cb8af commit f6528fc
Show file tree
Hide file tree
Showing 8 changed files with 140 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,17 @@
class DeploymentState(proto.Enum):
r"""Enum representing the state of an ACM's deployment on a
cluster
Values:
DEPLOYMENT_STATE_UNSPECIFIED (0):
Deployment's state cannot be determined
NOT_INSTALLED (1):
Deployment is not installed
INSTALLED (2):
Deployment is installed
ERROR (3):
Deployment was attempted to be installed, but
has errors
"""
DEPLOYMENT_STATE_UNSPECIFIED = 0
NOT_INSTALLED = 1
Expand Down Expand Up @@ -597,6 +608,29 @@ class SyncState(proto.Message):
class SyncCode(proto.Enum):
r"""An enum representing an ACM's status syncing configs to a
cluster
Values:
SYNC_CODE_UNSPECIFIED (0):
ACM cannot determine a sync code
SYNCED (1):
ACM successfully synced the git Repo with the
cluster
PENDING (2):
ACM is in the progress of syncing a new
change
ERROR (3):
Indicates an error configuring ACM, and user
action is required
NOT_CONFIGURED (4):
ACM has been installed (operator manifest
deployed), but not configured.
NOT_INSTALLED (5):
ACM has not been installed (no operator pod
found)
UNAUTHORIZED (6):
Error authorizing with the cluster
UNREACHABLE (7):
Cluster could not be reached
"""
SYNC_CODE_UNSPECIFIED = 0
SYNCED = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1822,7 +1822,7 @@ def sample_generate_connect_manifest():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GkeHubClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,28 @@ class FeatureResourceState(proto.Message):
"""

class State(proto.Enum):
r"""State describes the lifecycle status of a Feature."""
r"""State describes the lifecycle status of a Feature.
Values:
STATE_UNSPECIFIED (0):
State is unknown or not set.
ENABLING (1):
The Feature is being enabled, and the Feature
resource is being created. Once complete, the
corresponding Feature will be enabled in this
Hub.
ACTIVE (2):
The Feature is enabled in this Hub, and the
Feature resource is fully available.
DISABLING (3):
The Feature is being disabled in this Hub,
and the Feature resource is being deleted.
UPDATING (4):
The Feature resource is being updated.
SERVICE_UPDATING (5):
The Feature resource is being updated by the
Hub Service.
"""
STATE_UNSPECIFIED = 0
ENABLING = 1
ACTIVE = 2
Expand Down Expand Up @@ -198,6 +219,24 @@ class FeatureState(proto.Message):
class Code(proto.Enum):
r"""Code represents a machine-readable, high-level status of the
Feature.
Values:
CODE_UNSPECIFIED (0):
Unknown or not set.
OK (1):
The Feature is operating normally.
WARNING (2):
The Feature has encountered an issue, and is
operating in a degraded state. The Feature may
need intervention to return to normal operation.
See the description and any associated
Feature-specific details for more information.
ERROR (3):
The Feature is not operating or is in a
severely degraded state. The Feature may need
intervention to return to normal operation. See
the description and any associated
Feature-specific details for more information.
"""
CODE_UNSPECIFIED = 0
OK = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,23 @@ class MembershipState(proto.Message):
"""

class Code(proto.Enum):
r"""Code describes the state of a Membership resource."""
r"""Code describes the state of a Membership resource.
Values:
CODE_UNSPECIFIED (0):
The code is not set.
CREATING (1):
The cluster is being registered.
READY (2):
The cluster is registered.
DELETING (3):
The cluster is being unregistered.
UPDATING (4):
The Membership is being updated.
SERVICE_UPDATING (5):
The Membership is being updated by the Hub
Service.
"""
CODE_UNSPECIFIED = 0
CREATING = 1
READY = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1379,7 +1379,7 @@ def sample_generate_exclusivity_manifest():
# Done; return the response.
return response

def __enter__(self):
def __enter__(self) -> "GkeHubMembershipServiceClient":
return self

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,19 @@ class InfrastructureType(proto.Enum):
Each GKE distribution (on-GCP, on-Prem, on-X,...) will set this
field automatically, but Attached Clusters customers should
specify a type during registration.
Values:
INFRASTRUCTURE_TYPE_UNSPECIFIED (0):
No type was specified. Some Hub functionality
may require a type be specified, and will not
support Memberships with this value.
ON_PREM (1):
Private infrastructure that is owned or
operated by customer. This includes GKE
distributions such as GKE-OnPrem and
GKE-OnBareMetal.
MULTI_CLOUD (2):
Public cloud infrastructure.
"""
INFRASTRUCTURE_TYPE_UNSPECIFIED = 0
ON_PREM = 1
Expand Down Expand Up @@ -482,7 +495,21 @@ class OnPremCluster(proto.Message):
"""

class ClusterType(proto.Enum):
r"""ClusterType describes on prem cluster's type."""
r"""ClusterType describes on prem cluster's type.
Values:
CLUSTERTYPE_UNSPECIFIED (0):
The ClusterType is not set.
BOOTSTRAP (1):
The ClusterType is bootstrap cluster.
HYBRID (2):
The ClusterType is baremetal hybrid cluster.
STANDALONE (3):
The ClusterType is baremetal standalone
cluster.
USER (4):
The ClusterType is user cluster.
"""
CLUSTERTYPE_UNSPECIFIED = 0
BOOTSTRAP = 1
HYBRID = 2
Expand Down Expand Up @@ -703,7 +730,23 @@ class MembershipState(proto.Message):
"""

class Code(proto.Enum):
r"""Code describes the state of a Membership resource."""
r"""Code describes the state of a Membership resource.
Values:
CODE_UNSPECIFIED (0):
The code is not set.
CREATING (1):
The cluster is being registered.
READY (2):
The cluster is registered.
DELETING (3):
The cluster is being unregistered.
UPDATING (4):
The Membership is being updated.
SERVICE_UPDATING (5):
The Membership is being updated by the Hub
Service.
"""
CODE_UNSPECIFIED = 0
CREATING = 1
READY = 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-gke-hub",
"version": "1.7.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-gke-hub",
"version": "1.7.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit f6528fc

Please sign in to comment.