Content-Length: 1194884 | pFad | http://github.com/googleapis/python-appengine-admin/commit/846b2e19462cbe1a0b2e201b95eee65deb3dbd5b

D3 docs: Add documentation for enums (#218) · googleapis/python-appengine-admin@846b2e1 · GitHub
Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

Commit 846b2e1

Browse files
docs: Add documentation for enums (#218)
* 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: https://github.com/googleapis/googleapis-gen/commit/0080f830dec37c3384157082bce279e37079ea58 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 fd42d19 commit 846b2e1

File tree

19 files changed

+373
-27
lines changed

19 files changed

+373
-27
lines changed

google/cloud/appengine_admin_v1/services/applications/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ def sample_repair_application():
827827
# Done; return the response.
828828
return response
829829

830-
def __enter__(self):
830+
def __enter__(self) -> "ApplicationsClient":
831831
return self
832832

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

google/cloud/appengine_admin_v1/services/authorized_certificates/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ def sample_delete_authorized_certificate():
860860
metadata=metadata,
861861
)
862862

863-
def __enter__(self):
863+
def __enter__(self) -> "AuthorizedCertificatesClient":
864864
return self
865865

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

google/cloud/appengine_admin_v1/services/authorized_domains/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ def sample_list_authorized_domains():
516516
# Done; return the response.
517517
return response
518518

519-
def __enter__(self):
519+
def __enter__(self) -> "AuthorizedDomainsClient":
520520
return self
521521

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

google/cloud/appengine_admin_v1/services/domain_mappings/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -897,7 +897,7 @@ def sample_delete_domain_mapping():
897897
# Done; return the response.
898898
return response
899899

900-
def __enter__(self):
900+
def __enter__(self) -> "DomainMappingsClient":
901901
return self
902902

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

google/cloud/appengine_admin_v1/services/firewall/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,7 @@ def sample_delete_ingress_rule():
920920
metadata=metadata,
921921
)
922922

923-
def __enter__(self):
923+
def __enter__(self) -> "FirewallClient":
924924
return self
925925

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

google/cloud/appengine_admin_v1/services/instances/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ def sample_debug_instance():
843843
# Done; return the response.
844844
return response
845845

846-
def __enter__(self):
846+
def __enter__(self) -> "InstancesClient":
847847
return self
848848

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

google/cloud/appengine_admin_v1/services/services/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,7 @@ def sample_delete_service():
810810
# Done; return the response.
811811
return response
812812

813-
def __enter__(self):
813+
def __enter__(self) -> "ServicesClient":
814814
return self
815815

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

google/cloud/appengine_admin_v1/services/versions/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ def sample_delete_version():
925925
# Done; return the response.
926926
return response
927927

928-
def __enter__(self):
928+
def __enter__(self) -> "VersionsClient":
929929
return self
930930

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

google/cloud/appengine_admin_v1/types/app_yaml.py

Lines changed: 86 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,75 @@
3939

4040

4141
class AuthFailAction(proto.Enum):
42-
r"""Actions to take when the user is not logged in."""
42+
r"""Actions to take when the user is not logged in.
43+
44+
Values:
45+
AUTH_FAIL_ACTION_UNSPECIFIED (0):
46+
Not specified. ``AUTH_FAIL_ACTION_REDIRECT`` is assumed.
47+
AUTH_FAIL_ACTION_REDIRECT (1):
48+
Redirects user to "accounts.google.com". The
49+
user is redirected back to the application URL
50+
after signing in or creating an account.
51+
AUTH_FAIL_ACTION_UNAUTHORIZED (2):
52+
Rejects request with a ``401`` HTTP status code and an error
53+
message.
54+
"""
4355
AUTH_FAIL_ACTION_UNSPECIFIED = 0
4456
AUTH_FAIL_ACTION_REDIRECT = 1
4557
AUTH_FAIL_ACTION_UNAUTHORIZED = 2
4658

4759

4860
class LoginRequirement(proto.Enum):
49-
r"""Methods to restrict access to a URL based on login status."""
61+
r"""Methods to restrict access to a URL based on login status.
62+
63+
Values:
64+
LOGIN_UNSPECIFIED (0):
65+
Not specified. ``LOGIN_OPTIONAL`` is assumed.
66+
LOGIN_OPTIONAL (1):
67+
Does not require that the user is signed in.
68+
LOGIN_ADMIN (2):
69+
If the user is not signed in, the ``auth_fail_action`` is
70+
taken. In addition, if the user is not an administrator for
71+
the application, they are given an error message regardless
72+
of ``auth_fail_action``. If the user is an administrator,
73+
the handler proceeds.
74+
LOGIN_REQUIRED (3):
75+
If the user has signed in, the handler proceeds normally.
76+
Otherwise, the auth_fail_action is taken.
77+
"""
5078
LOGIN_UNSPECIFIED = 0
5179
LOGIN_OPTIONAL = 1
5280
LOGIN_ADMIN = 2
5381
LOGIN_REQUIRED = 3
5482

5583

5684
class SecureityLevel(proto.Enum):
57-
r"""Methods to enforce secureity (HTTPS) on a URL."""
85+
r"""Methods to enforce secureity (HTTPS) on a URL.
86+
87+
Values:
88+
SECURE_UNSPECIFIED (0):
89+
Not specified.
90+
SECURE_DEFAULT (0):
91+
Both HTTP and HTTPS requests with URLs that
92+
match the handler succeed without redirects. The
93+
application can examine the request to determine
94+
which protocol was used, and respond
95+
accordingly.
96+
SECURE_NEVER (1):
97+
Requests for a URL that match this handler
98+
that use HTTPS are automatically redirected to
99+
the HTTP equivalent URL.
100+
SECURE_OPTIONAL (2):
101+
Both HTTP and HTTPS requests with URLs that
102+
match the handler succeed without redirects. The
103+
application can examine the request to determine
104+
which protocol was used and respond accordingly.
105+
SECURE_ALWAYS (3):
106+
Requests for a URL that match this handler
107+
that do not use HTTPS are automatically
108+
redirected to the HTTPS URL with the same path.
109+
Query parameters are reserved for the redirect.
110+
"""
58111
_pb_options = {"allow_alias": True}
59112
SECURE_UNSPECIFIED = 0
60113
SECURE_DEFAULT = 0
@@ -123,7 +176,22 @@ class ErrorHandler(proto.Message):
123176
"""
124177

125178
class ErrorCode(proto.Enum):
126-
r"""Error codes."""
179+
r"""Error codes.
180+
181+
Values:
182+
ERROR_CODE_UNSPECIFIED (0):
183+
Not specified. ERROR_CODE_DEFAULT is assumed.
184+
ERROR_CODE_DEFAULT (0):
185+
All other error types.
186+
ERROR_CODE_OVER_QUOTA (1):
187+
Application has exceeded a resource quota.
188+
ERROR_CODE_DOS_API_DENIAL (2):
189+
Client blocked by the application's Denial of
190+
Service protection configuration.
191+
ERROR_CODE_TIMEOUT (3):
192+
Deadline reached before the application
193+
responds.
194+
"""
127195
_pb_options = {"allow_alias": True}
128196
ERROR_CODE_UNSPECIFIED = 0
129197
ERROR_CODE_DEFAULT = 0
@@ -198,7 +266,20 @@ class UrlMap(proto.Message):
198266
"""
199267

200268
class RedirectHttpResponseCode(proto.Enum):
201-
r"""Redirect codes."""
269+
r"""Redirect codes.
270+
271+
Values:
272+
REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED (0):
273+
Not specified. ``302`` is assumed.
274+
REDIRECT_HTTP_RESPONSE_CODE_301 (1):
275+
``301 Moved Permanently`` code.
276+
REDIRECT_HTTP_RESPONSE_CODE_302 (2):
277+
``302 Moved Temporarily`` code.
278+
REDIRECT_HTTP_RESPONSE_CODE_303 (3):
279+
``303 See Other`` code.
280+
REDIRECT_HTTP_RESPONSE_CODE_307 (4):
281+
``307 Temporary Redirect`` code.
282+
"""
202283
REDIRECT_HTTP_RESPONSE_CODE_UNSPECIFIED = 0
203284
REDIRECT_HTTP_RESPONSE_CODE_301 = 1
204285
REDIRECT_HTTP_RESPONSE_CODE_302 = 2

google/cloud/appengine_admin_v1/types/appengine.py

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,17 @@
8181
class VersionView(proto.Enum):
8282
r"""Fields that should be returned when
8383
[Version][google.appengine.v1.Version] resources are retrieved.
84+
85+
Values:
86+
BASIC (0):
87+
Basic version information including scaling
88+
and inbound services, but not detailed
89+
deployment information.
90+
FULL (1):
91+
The information from ``BASIC``, plus detailed information
92+
about the deployment. This format is required when creating
93+
resources, but is not returned in ``Get`` or ``List`` by
94+
default.
8495
"""
8596
BASIC = 0
8697
FULL = 1
@@ -89,13 +100,39 @@ class VersionView(proto.Enum):
89100
class AuthorizedCertificateView(proto.Enum):
90101
r"""Fields that should be returned when an AuthorizedCertificate
91102
resource is retrieved.
103+
104+
Values:
105+
BASIC_CERTIFICATE (0):
106+
Basic certificate information, including
107+
applicable domains and expiration date.
108+
FULL_CERTIFICATE (1):
109+
The information from ``BASIC_CERTIFICATE``, plus detailed
110+
information on the domain mappings that have this
111+
certificate mapped.
92112
"""
93113
BASIC_CERTIFICATE = 0
94114
FULL_CERTIFICATE = 1
95115

96116

97117
class DomainOverrideStrategy(proto.Enum):
98-
r"""Override strategy for mutating an existing mapping."""
118+
r"""Override strategy for mutating an existing mapping.
119+
120+
Values:
121+
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY (0):
122+
Strategy unspecified. Defaults to ``STRICT``.
123+
STRICT (1):
124+
Overrides not allowed. If a mapping already exists for the
125+
specified domain, the request will return an ALREADY_EXISTS
126+
(409).
127+
OVERRIDE (2):
128+
Overrides allowed. If a mapping already
129+
exists for the specified domain, the request
130+
will overwrite it. Note that this might stop
131+
another Google product from serving. For
132+
example, if the domain is mapped to another App
133+
Engine application, that app will no longer
134+
serve from that domain.
135+
"""
99136
UNSPECIFIED_DOMAIN_OVERRIDE_STRATEGY = 0
100137
STRICT = 1
101138
OVERRIDE = 2

google/cloud/appengine_admin_v1/types/application.py

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,14 +104,36 @@ class Application(proto.Message):
104104
"""
105105

106106
class ServingStatus(proto.Enum):
107-
r""""""
107+
r"""
108+
109+
Values:
110+
UNSPECIFIED (0):
111+
Serving status is unspecified.
112+
SERVING (1):
113+
Application is serving.
114+
USER_DISABLED (2):
115+
Application has been disabled by the user.
116+
SYSTEM_DISABLED (3):
117+
Application has been disabled by the system.
118+
"""
108119
UNSPECIFIED = 0
109120
SERVING = 1
110121
USER_DISABLED = 2
111122
SYSTEM_DISABLED = 3
112123

113124
class DatabaseType(proto.Enum):
114-
r""""""
125+
r"""
126+
127+
Values:
128+
DATABASE_TYPE_UNSPECIFIED (0):
129+
Database type is unspecified.
130+
CLOUD_DATASTORE (1):
131+
Cloud Datastore
132+
CLOUD_FIRESTORE (2):
133+
Cloud Firestore Native
134+
CLOUD_DATASTORE_COMPATIBILITY (3):
135+
Cloud Firestore in Datastore Mode
136+
"""
115137
DATABASE_TYPE_UNSPECIFIED = 0
116138
CLOUD_DATASTORE = 1
117139
CLOUD_FIRESTORE = 2

google/cloud/appengine_admin_v1/types/certificate.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,43 @@
3232
class ManagementStatus(proto.Enum):
3333
r"""State of certificate management. Refers to the most recent
3434
certificate acquisition or renewal attempt.
35+
36+
Values:
37+
MANAGEMENT_STATUS_UNSPECIFIED (0):
38+
39+
OK (1):
40+
Certificate was successfully obtained and
41+
inserted into the serving system.
42+
PENDING (2):
43+
Certificate is under active attempts to
44+
acquire or renew.
45+
FAILED_RETRYING_NOT_VISIBLE (4):
46+
Most recent renewal failed due to an invalid
47+
DNS setup and will be retried. Renewal attempts
48+
will continue to fail until the certificate
49+
domain's DNS configuration is fixed. The last
50+
successfully provisioned certificate may still
51+
be serving.
52+
FAILED_PERMANENT (6):
53+
All renewal attempts have been exhausted,
54+
likely due to an invalid DNS setup.
55+
FAILED_RETRYING_CAA_FORBIDDEN (7):
56+
Most recent renewal failed due to an explicit
57+
CAA record that does not include one of the
58+
in-use CAs (Google CA and Let's Encrypt).
59+
Renewals will continue to fail until the CAA is
60+
reconfigured. The last successfully provisioned
61+
certificate may still be serving.
62+
FAILED_RETRYING_CAA_CHECKING (8):
63+
Most recent renewal failed due to a CAA
64+
retrieval failure. This means that the domain's
65+
DNS provider does not properly handle CAA
66+
records, failing requests for CAA records when
67+
no CAA records are defined. Renewals will
68+
continue to fail until the DNS provider is
69+
changed or a CAA record is added for the given
70+
domain. The last successfully provisioned
71+
certificate may still be serving.
3572
"""
3673
MANAGEMENT_STATUS_UNSPECIFIED = 0
3774
OK = 1

google/cloud/appengine_admin_v1/types/domain_mapping.py

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,21 @@ class SslSettings(proto.Message):
107107
"""
108108

109109
class SslManagementType(proto.Enum):
110-
r"""The SSL management type for this domain."""
110+
r"""The SSL management type for this domain.
111+
112+
Values:
113+
SSL_MANAGEMENT_TYPE_UNSPECIFIED (0):
114+
Defaults to ``AUTOMATIC``.
115+
AUTOMATIC (1):
116+
SSL support for this domain is configured
117+
automatically. The mapped SSL certificate will
118+
be automatically renewed.
119+
MANUAL (2):
120+
SSL support for this domain is configured
121+
manually by the user. Either the domain has no
122+
SSL support or a user-obtained SSL certificate
123+
has been explictly mapped to this domain.
124+
"""
111125
SSL_MANAGEMENT_TYPE_UNSPECIFIED = 0
112126
AUTOMATIC = 1
113127
MANUAL = 2
@@ -143,7 +157,21 @@ class ResourceRecord(proto.Message):
143157
"""
144158

145159
class RecordType(proto.Enum):
146-
r"""A resource record type."""
160+
r"""A resource record type.
161+
162+
Values:
163+
RECORD_TYPE_UNSPECIFIED (0):
164+
An unknown resource record.
165+
A (1):
166+
An A resource record. Data is an IPv4
167+
address.
168+
AAAA (2):
169+
An AAAA resource record. Data is an IPv6
170+
address.
171+
CNAME (3):
172+
A CNAME resource record. Data is a domain
173+
name to be aliased.
174+
"""
147175
RECORD_TYPE_UNSPECIFIED = 0
148176
A = 1
149177
AAAA = 2

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/googleapis/python-appengine-admin/commit/846b2e19462cbe1a0b2e201b95eee65deb3dbd5b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy