GeezerVison is showing github.com — docs: Add documentation for enums (#219) · googleapis/google-cloud-python@f6528fc
File treeExpand file treeCollapse file tree Open diff view settings packages/google-cloud-gke-hub services/gke_hub_membership_service
configmanagement_v1/types
samples/generated_samples
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1/configmanagement_v1/types/configmanagement.py +34Lines changed: 34 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 50 | 50 | class DeploymentState(proto.Enum): | 51 | 51 | r"""Enum representing the state of an ACM's deployment on a | 52 | 52 | 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 | 53 | 64 | """ | 54 | 65 | DEPLOYMENT_STATE_UNSPECIFIED = 0 | 55 | 66 | NOT_INSTALLED = 1 | @@ -597,6 +608,29 @@ class SyncState(proto.Message): | 597 | 608 | class SyncCode(proto.Enum): | 598 | 609 | r"""An enum representing an ACM's status syncing configs to a | 599 | 610 | 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 | 600 | 634 | """ | 601 | 635 | SYNC_CODE_UNSPECIFIED = 0 | 602 | 636 | SYNCED = 1 | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1/services/gke_hub/client.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1822,7 +1822,7 @@ def sample_generate_connect_manifest(): | 1822 | 1822 | # Done; return the response. | 1823 | 1823 | return response | 1824 | 1824 |
| 1825 | | - def __enter__(self): | | 1825 | + def __enter__(self) -> "GkeHubClient": | 1826 | 1826 | return self | 1827 | 1827 |
| 1828 | 1828 | def __exit__(self, type, value, traceback): | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/feature.py +40-1Lines changed: 40 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -163,7 +163,28 @@ class FeatureResourceState(proto.Message): | 163 | 163 | """ | 164 | 164 |
| 165 | 165 | 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 | + """ | 167 | 188 | STATE_UNSPECIFIED = 0 | 168 | 189 | ENABLING = 1 | 169 | 190 | ACTIVE = 2 | @@ -198,6 +219,24 @@ class FeatureState(proto.Message): | 198 | 219 | class Code(proto.Enum): | 199 | 220 | r"""Code represents a machine-readable, high-level status of the | 200 | 221 | 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. | 201 | 240 | """ | 202 | 241 | CODE_UNSPECIFIED = 0 | 203 | 242 | OK = 1 | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1/types/membership.py +17-1Lines changed: 17 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -424,7 +424,23 @@ class MembershipState(proto.Message): | 424 | 424 | """ | 425 | 425 |
| 426 | 426 | 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 | + """ | 428 | 444 | CODE_UNSPECIFIED = 0 | 429 | 445 | CREATING = 1 | 430 | 446 | READY = 2 | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/services/gke_hub_membership_service/client.py +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -1379,7 +1379,7 @@ def sample_generate_exclusivity_manifest(): | 1379 | 1379 | # Done; return the response. | 1380 | 1380 | return response | 1381 | 1381 |
| 1382 | | - def __enter__(self): | | 1382 | + def __enter__(self) -> "GkeHubMembershipServiceClient": | 1383 | 1383 | return self | 1384 | 1384 |
| 1385 | 1385 | def __exit__(self, type, value, traceback): | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/google/cloud/gkehub_v1beta1/types/membership.py +45-2Lines changed: 45 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -142,6 +142,19 @@ class InfrastructureType(proto.Enum): | 142 | 142 | Each GKE distribution (on-GCP, on-Prem, on-X,...) will set this | 143 | 143 | field automatically, but Attached Clusters customers should | 144 | 144 | 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. | 145 | 158 | """ | 146 | 159 | INFRASTRUCTURE_TYPE_UNSPECIFIED = 0 | 147 | 160 | ON_PREM = 1 | @@ -482,7 +495,21 @@ class OnPremCluster(proto.Message): | 482 | 495 | """ | 483 | 496 |
| 484 | 497 | 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 | + """ | 486 | 513 | CLUSTERTYPE_UNSPECIFIED = 0 | 487 | 514 | BOOTSTRAP = 1 | 488 | 515 | HYBRID = 2 | @@ -703,7 +730,23 @@ class MembershipState(proto.Message): | 703 | 730 | """ | 704 | 731 |
| 705 | 732 | 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 | + """ | 707 | 750 | CODE_UNSPECIFIED = 0 | 708 | 751 | CREATING = 1 | 709 | 752 | READY = 2 | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/samples/generated_samples/snippet_metadata_google.cloud.gkehub.v1.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | ], | 9 | 9 | "language": "PYTHON", | 10 | 10 | "name": "google-cloud-gke-hub", | 11 | | - "version": "1.7.0" | | 11 | + "version": "0.1.0" | 12 | 12 | }, | 13 | 13 | "snippets": [ | 14 | 14 | { | |
Collapse file Copy file name to clipboardExpand all lines: packages/google-cloud-gke-hub/samples/generated_samples/snippet_metadata_google.cloud.gkehub.v1beta1.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 8 | 8 | ], | 9 | 9 | "language": "PYTHON", | 10 | 10 | "name": "google-cloud-gke-hub", | 11 | | - "version": "1.7.0" | | 11 | + "version": "0.1.0" | 12 | 12 | }, | 13 | 13 | "snippets": [ | 14 | 14 | { | |
|