Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ def sample_repair_application():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ def sample_delete_authorized_certificate():
metadata=metadata,
)

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ def sample_list_authorized_domains():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -897,7 +897,7 @@ def sample_delete_domain_mapping():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ def sample_delete_ingress_rule():
metadata=metadata,
)

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def sample_debug_instance():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ def sample_delete_service():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ def sample_delete_version():
# Done; return the response.
return response

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

def __exit__(self, type, value, traceback):
Expand Down
91 changes: 86 additions & 5 deletions google/cloud/appengine_admin_v1/types/app_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,75 @@


class AuthFailAction(proto.Enum):
r"""Actions to take when the user is not logged in."""
r"""Actions to take when the user is not logged in.

Values:
AUTH_FAIL_ACTION_UNSPECIFIED (0):
Not specified. ``AUTH_FAIL_ACTION_REDIRECT`` is assumed.
AUTH_FAIL_ACTION_REDIRECT (1):
Redirects user to "accounts.google.com". The
user is redirected back to the application URL
after signing in or creating an account.
AUTH_FAIL_ACTION_UNAUTHORIZED (2):
Rejects request with a ``401`` HTTP status code and an error
message.
"""
AUTH_FAIL_ACTION_UNSPECIFIED = 0
AUTH_FAIL_ACTION_REDIRECT = 1
AUTH_FAIL_ACTION_UNAUTHORIZED = 2


class LoginRequirement(proto.Enum):
r"""Methods to restrict access to a URL based on login status."""
r"""Methods to restrict access to a URL based on login status.

Values:
LOGIN_UNSPECIFIED (0):
Not specified. ``LOGIN_OPTIONAL`` is assumed.
LOGIN_OPTIONAL (1):
Does not require that the user is signed in.
LOGIN_ADMIN (2):
If the user is not signed in, the ``auth_fail_action`` is
taken. In addition, if the user is not an administrator for
the application, they are given an error message regardless
of ``auth_fail_action``. If the user is an administrator,
the handler proceeds.
LOGIN_REQUIRED (3):
If the user has signed in, the handler proceeds normally.
Otherwise, the auth_fail_action is taken.
"""
LOGIN_UNSPECIFIED = 0
LOGIN_OPTIONAL = 1
LOGIN_ADMIN = 2
LOGIN_REQUIRED = 3


class SecurityLevel(proto.Enum):
r"""Methods to enforce security (HTTPS) on a URL."""
r"""Methods to enforce security (HTTPS) on a URL.

Values:
SECURE_UNSPECIFIED (0):
Not specified.
SECURE_DEFAULT (0):
Both HTTP and HTTPS requests with URLs that
match the handler succeed without redirects. The
application can examine the request to determine
which protocol was used, and respond
accordingly.
SECURE_NEVER (1):
Requests for a URL that match this handler
that use HTTPS are automatically redirected to
the HTTP equivalent URL.
SECURE_OPTIONAL (2):
Both HTTP and HTTPS requests with URLs that
match the handler succeed without redirects. The
application can examine the request to determine
which protocol was used and respond accordingly.
SECURE_ALWAYS (3):
Requests for a URL that match this handler
that do not use HTTPS are automatically
redirected to the HTTPS URL with the same path.
Query parameters are reserved for the redirect.
"""
_pb_options = {"allow_alias": True}
SECURE_UNSPECIFIED = 0
SECURE_DEFAULT = 0
Expand Down Expand Up @@ -123,7 +176,22 @@ class ErrorHandler(proto.Message):
"""

class ErrorCode(proto.Enum):
r"""Error codes."""
r"""Error codes.

Values:
ERROR_CODE_UNSPECIFIED (0):
Not specified. ERROR_CODE_DEFAULT is assumed.
ERROR_CODE_DEFAULT (0):
All other error types.
ERROR_CODE_OVER_QUOTA (1):
Application has exceeded a resource quota.
ERROR_CODE_DOS_API_DENIAL (2):
Client blocked by the application's Denial of
Service protection configuration.
ERROR_CODE_TIMEOUT (3):
Deadline reached before the application
responds.
"""
_pb_options = {"allow_alias": True}
ERROR_CODE_UNSPECIFIED = 0
ERROR_CODE_DEFAULT = 0
Expand Down Expand Up @@ -198,7 +266,20 @@ class UrlMap(proto.Message):
"""

class RedirectHttpResponseCode(proto.Enum):
r"""Redirect codes."""
r"""Redirect codes.

Values:
REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED (0):
Not specified. ``302`` is assumed.
REDIRECT_HTTP_RESPONSE_CODE_301 (1):
``301 Moved Permanently`` code.
REDIRECT_HTTP_RESPONSE_CODE_302 (2):
``302 Moved Temporarily`` code.
REDIRECT_HTTP_RESPONSE_CODE_303 (3):
``303 See Other`` code.
REDIRECT_HTTP_RESPONSE_CODE_307 (4):
``307 Temporary Redirect`` code.
"""
REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0
REDIRECT_HTTP_RESPONSE_CODE_301 = 1
REDIRECT_HTTP_RESPONSE_CODE_302 = 2
Expand Down
39 changes: 38 additions & 1 deletion google/cloud/appengine_admin_v1/types/appengine.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,17 @@
class VersionView(proto.Enum):
r"""Fields that should be returned when
[Version][google.appengine.v1.Version] resources are retrieved.

Values:
BASIC (0):
Basic version information including scaling
and inbound services, but not detailed
deployment information.
FULL (1):
The information from ``BASIC``, plus detailed information
about the deployment. This format is required when creating
resources, but is not returned in ``Get`` or ``List`` by
default.
"""
BASIC = 0
FULL = 1
Expand All @@ -89,13 +100,39 @@ class VersionView(proto.Enum):
class AuthorizedCertificateView(proto.Enum):
r"""Fields that should be returned when an AuthorizedCertificate
resource is retrieved.

Values:
BASIC_CERTIFICATE (0):
Basic certificate information, including
applicable domains and expiration date.
FULL_CERTIFICATE (1):
The information from ``BASIC_CERTIFICATE``, plus detailed
information on the domain mappings that have this
certificate mapped.
"""
BASIC_CERTIFICATE = 0
FULL_CERTIFICATE = 1


class DomainOverrideStrategy(proto.Enum):
r"""Override strategy for mutating an existing mapping."""
r"""Override strategy for mutating an existing mapping.

Values:
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY (0):
Strategy unspecified. Defaults to ``STRICT``.
STRICT (1):
Overrides not allowed. If a mapping already exists for the
specified domain, the request will return an ALREADY_EXISTS
(409).
OVERRIDE (2):
Overrides allowed. If a mapping already
exists for the specified domain, the request
will overwrite it. Note that this might stop
another Google product from serving. For
example, if the domain is mapped to another App
Engine application, that app will no longer
serve from that domain.
"""
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0
STRICT = 1
OVERRIDE = 2
Expand Down
26 changes: 24 additions & 2 deletions google/cloud/appengine_admin_v1/types/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,36 @@ class Application(proto.Message):
"""

class ServingStatus(proto.Enum):
r""""""
r"""

Values:
UNSPECIFIED (0):
Serving status is unspecified.
SERVING (1):
Application is serving.
USER_DISABLED (2):
Application has been disabled by the user.
SYSTEM_DISABLED (3):
Application has been disabled by the system.
"""
UNSPECIFIED = 0
SERVING = 1
USER_DISABLED = 2
SYSTEM_DISABLED = 3

class DatabaseType(proto.Enum):
r""""""
r"""

Values:
DATABASE_TYPE_UNSPECIFIED (0):
Database type is unspecified.
CLOUD_DATASTORE (1):
Cloud Datastore
CLOUD_FIRESTORE (2):
Cloud Firestore Native
CLOUD_DATASTORE_COMPATIBILITY (3):
Cloud Firestore in Datastore Mode
"""
DATABASE_TYPE_UNSPECIFIED = 0
CLOUD_DATASTORE = 1
CLOUD_FIRESTORE = 2
Expand Down
37 changes: 37 additions & 0 deletions google/cloud/appengine_admin_v1/types/certificate.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,43 @@
class ManagementStatus(proto.Enum):
r"""State of certificate management. Refers to the most recent
certificate acquisition or renewal attempt.

Values:
MANAGEMENT_STATUS_UNSPECIFIED (0):

OK (1):
Certificate was successfully obtained and
inserted into the serving system.
PENDING (2):
Certificate is under active attempts to
acquire or renew.
FAILED_RETRYING_NOT_VISIBLE (4):
Most recent renewal failed due to an invalid
DNS setup and will be retried. Renewal attempts
will continue to fail until the certificate
domain's DNS configuration is fixed. The last
successfully provisioned certificate may still
be serving.
FAILED_PERMANENT (6):
All renewal attempts have been exhausted,
likely due to an invalid DNS setup.
FAILED_RETRYING_CAA_FORBIDDEN (7):
Most recent renewal failed due to an explicit
CAA record that does not include one of the
in-use CAs (Google CA and Let's Encrypt).
Renewals will continue to fail until the CAA is
reconfigured. The last successfully provisioned
certificate may still be serving.
FAILED_RETRYING_CAA_CHECKING (8):
Most recent renewal failed due to a CAA
retrieval failure. This means that the domain's
DNS provider does not properly handle CAA
records, failing requests for CAA records when
no CAA records are defined. Renewals will
continue to fail until the DNS provider is
changed or a CAA record is added for the given
domain. The last successfully provisioned
certificate may still be serving.
"""
MANAGEMENT_STATUS_UNSPECIFIED = 0
OK = 1
Expand Down
32 changes: 30 additions & 2 deletions google/cloud/appengine_admin_v1/types/domain_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,21 @@ class SslSettings(proto.Message):
"""

class SslManagementType(proto.Enum):
r"""The SSL management type for this domain."""
r"""The SSL management type for this domain.

Values:
SSL_MANAGEMENT_TYPE_UNSPECIFIED (0):
Defaults to ``AUTOMATIC``.
AUTOMATIC (1):
SSL support for this domain is configured
automatically. The mapped SSL certificate will
be automatically renewed.
MANUAL (2):
SSL support for this domain is configured
manually by the user. Either the domain has no
SSL support or a user-obtained SSL certificate
has been explictly mapped to this domain.
"""
SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0
AUTOMATIC = 1
MANUAL = 2
Expand Down Expand Up @@ -143,7 +157,21 @@ class ResourceRecord(proto.Message):
"""

class RecordType(proto.Enum):
r"""A resource record type."""
r"""A resource record type.

Values:
RECORD_TYPE_UNSPECIFIED (0):
An unknown resource record.
A (1):
An A resource record. Data is an IPv4
address.
AAAA (2):
An AAAA resource record. Data is an IPv6
address.
CNAME (3):
A CNAME resource record. Data is a domain
name to be aliased.
"""
RECORD_TYPE_UNSPECIFIED = 0
A = 1
AAAA = 2
Expand Down
Loading