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

Commit

Permalink
docs: Add documentation for enums (#103)
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] committed Jan 20, 2023
1 parent 310cfd2 commit 81cfbf9
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3657,7 +3657,7 @@ def sample_delete_certificate_issuance_config():
# Done; return the response.
return response

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

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

class KeyAlgorithm(proto.Enum):
r"""The type of keypair to generate."""
r"""The type of keypair to generate.
Values:
KEY_ALGORITHM_UNSPECIFIED (0):
Unspecified key algorithm.
RSA_2048 (1):
Specifies RSA with a 2048-bit modulus.
ECDSA_P256 (4):
Specifies ECDSA with curve P256.
"""
KEY_ALGORITHM_UNSPECIFIED = 0
RSA_2048 = 1
ECDSA_P256 = 4
Expand Down
104 changes: 98 additions & 6 deletions google/cloud/certificate_manager_v1/types/certificate_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,17 @@


class ServingState(proto.Enum):
r"""Defines set of serving states associated with a resource."""
r"""Defines set of serving states associated with a resource.
Values:
SERVING_STATE_UNSPECIFIED (0):
The status is undefined.
ACTIVE (1):
The configuration is serving.
PENDING (2):
Update is in progress. Some frontends may
serve this configuration.
"""
SERVING_STATE_UNSPECIFIED = 0
ACTIVE = 1
PENDING = 2
Expand Down Expand Up @@ -866,7 +876,17 @@ class Certificate(proto.Message):
"""

class Scope(proto.Enum):
r"""Certificate scope."""
r"""Certificate scope.
Values:
DEFAULT (0):
Certificates with default scope are served
from core Google data centers. If unsure, choose
this option.
EDGE_CACHE (1):
Certificates with scope EDGE_CACHE are special-purposed
certificates, served from non-core Google data centers.
"""
DEFAULT = 0
EDGE_CACHE = 1

Expand Down Expand Up @@ -930,7 +950,24 @@ class ManagedCertificate(proto.Message):
"""

class State(proto.Enum):
r""""""
r"""
Values:
STATE_UNSPECIFIED (0):
PROVISIONING (1):
Certificate Manager attempts to provision or renew the
certificate. If the process takes longer than expected,
consult the ``provisioning_issue`` field.
FAILED (2):
Multiple certificate provisioning attempts failed and
Certificate Manager gave up. To try again, delete and create
a new managed Certificate resource. For details see the
``provisioning_issue`` field.
ACTIVE (3):
The certificate management is working, and a
certificate has been provisioned.
"""
STATE_UNSPECIFIED = 0
PROVISIONING = 1
FAILED = 2
Expand All @@ -952,7 +989,21 @@ class ProvisioningIssue(proto.Message):
"""

class Reason(proto.Enum):
r""""""
r"""
Values:
REASON_UNSPECIFIED (0):
AUTHORIZATION_ISSUE (1):
Certificate provisioning failed due to an issue with one or
more of the domains on the certificate. For details of which
domains failed, consult the ``authorization_attempt_info``
field.
RATE_LIMITED (2):
Exceeded Certificate Authority quotas or
internal rate limits of the system. Provisioning
may take longer to complete.
"""
REASON_UNSPECIFIED = 0
AUTHORIZATION_ISSUE = 1
RATE_LIMITED = 2
Expand Down Expand Up @@ -991,14 +1042,47 @@ class AuthorizationAttemptInfo(proto.Message):
"""

class State(proto.Enum):
r""""""
r"""
Values:
STATE_UNSPECIFIED (0):
AUTHORIZING (1):
Certificate provisioning for this domain is
under way. GCP will attempt to authorize the
domain.
AUTHORIZED (6):
A managed certificate can be provisioned, no
issues for this domain.
FAILED (7):
Attempt to authorize the domain failed. This prevents the
Managed Certificate from being issued. See
``failure_reason`` and ``details`` fields for more
information.
"""
STATE_UNSPECIFIED = 0
AUTHORIZING = 1
AUTHORIZED = 6
FAILED = 7

class FailureReason(proto.Enum):
r""""""
r"""
Values:
FAILURE_REASON_UNSPECIFIED (0):
CONFIG (1):
There was a problem with the user's DNS or
load balancer configuration for this domain.
CAA (2):
Certificate issuance forbidden by an explicit
CAA record for the domain or a failure to check
CAA records for the domain.
RATE_LIMITED (3):
Reached a CA or internal rate-limit for the
domain, e.g. for certificates per top-level
private domain.
"""
FAILURE_REASON_UNSPECIFIED = 0
CONFIG = 1
CAA = 2
Expand Down Expand Up @@ -1287,6 +1371,14 @@ class CertificateMapEntry(proto.Message):
class Matcher(proto.Enum):
r"""Defines predefined cases other than SNI-hostname match when
this configuration should be applied.
Values:
MATCHER_UNSPECIFIED (0):
A matcher has't been recognized.
PRIMARY (1):
A primary certificate that is served when SNI
wasn't specified in the request or SNI couldn't
be found in the map.
"""
MATCHER_UNSPECIFIED = 0
PRIMARY = 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-certificate-manager",
"version": "1.3.0"
"version": "0.1.0"
},
"snippets": [
{
Expand Down

0 comments on commit 81cfbf9

Please sign in to comment.