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

Commit 62d61be

Browse files
docs: Add documentation for enums (#216)
* 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 b2cea8a commit 62d61be

File tree

16 files changed

+174
-16
lines changed

16 files changed

+174
-16
lines changed

google/cloud/artifactregistry_v1/services/artifact_registry/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3641,7 +3641,7 @@ def sample_update_project_settings():
36413641
# Done; return the response.
36423642
return response
36433643

3644-
def __enter__(self):
3644+
def __enter__(self) -> "ArtifactRegistryClient":
36453645
return self
36463646

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

google/cloud/artifactregistry_v1/types/apt_artifact.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,16 @@ class AptArtifact(proto.Message):
5858
"""
5959

6060
class PackageType(proto.Enum):
61-
r"""Package type is either binary or source."""
61+
r"""Package type is either binary or source.
62+
63+
Values:
64+
PACKAGE_TYPE_UNSPECIFIED (0):
65+
Package type is not specified.
66+
BINARY (1):
67+
Binary package.
68+
SOURCE (2):
69+
Source package.
70+
"""
6271
PACKAGE_TYPE_UNSPECIFIED = 0
6372
BINARY = 1
6473
SOURCE = 2

google/cloud/artifactregistry_v1/types/file.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ class Hash(proto.Message):
4141
"""
4242

4343
class HashType(proto.Enum):
44-
r"""The algorithm used to compute the hash."""
44+
r"""The algorithm used to compute the hash.
45+
46+
Values:
47+
HASH_TYPE_UNSPECIFIED (0):
48+
Unspecified.
49+
SHA256 (1):
50+
SHA256 hash.
51+
MD5 (2):
52+
MD5 hash.
53+
"""
4554
HASH_TYPE_UNSPECIFIED = 0
4655
SHA256 = 1
4756
MD5 = 2

google/cloud/artifactregistry_v1/types/repository.py

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,24 @@ class Repository(proto.Message):
7777
"""
7878

7979
class Format(proto.Enum):
80-
r"""A package format."""
80+
r"""A package format.
81+
82+
Values:
83+
FORMAT_UNSPECIFIED (0):
84+
Unspecified package format.
85+
DOCKER (1):
86+
Docker package format.
87+
MAVEN (2):
88+
Maven package format.
89+
NPM (3):
90+
NPM package format.
91+
APT (5):
92+
APT package format.
93+
YUM (6):
94+
YUM package format.
95+
PYTHON (8):
96+
Python package format.
97+
"""
8198
FORMAT_UNSPECIFIED = 0
8299
DOCKER = 1
83100
MAVEN = 2
@@ -101,7 +118,20 @@ class MavenRepositoryConfig(proto.Message):
101118
"""
102119

103120
class VersionPolicy(proto.Enum):
104-
r"""VersionPolicy is the version policy for the repository."""
121+
r"""VersionPolicy is the version policy for the repository.
122+
123+
Values:
124+
VERSION_POLICY_UNSPECIFIED (0):
125+
VERSION_POLICY_UNSPECIFIED - the version policy is not
126+
defined. When the version policy is not defined, no
127+
validation is performed for the versions.
128+
RELEASE (1):
129+
RELEASE - repository will accept only Release
130+
versions.
131+
SNAPSHOT (2):
132+
SNAPSHOT - repository will accept only
133+
Snapshot versions.
134+
"""
105135
VERSION_POLICY_UNSPECIFIED = 0
106136
RELEASE = 1
107137
SNAPSHOT = 2

google/cloud/artifactregistry_v1/types/settings.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,19 @@ class ProjectSettings(proto.Message):
4545
"""
4646

4747
class RedirectionState(proto.Enum):
48-
r"""The possible redirection states for legacy repositories."""
48+
r"""The possible redirection states for legacy repositories.
49+
50+
Values:
51+
REDIRECTION_STATE_UNSPECIFIED (0):
52+
No redirection status has been set.
53+
REDIRECTION_FROM_GCR_IO_DISABLED (1):
54+
Redirection is disabled.
55+
REDIRECTION_FROM_GCR_IO_ENABLED (2):
56+
Redirection is enabled.
57+
REDIRECTION_FROM_GCR_IO_FINALIZED (3):
58+
Redirection is enabled, and has been
59+
finalized so cannot be reverted.
60+
"""
4961
REDIRECTION_STATE_UNSPECIFIED = 0
5062
REDIRECTION_FROM_GCR_IO_DISABLED = 1
5163
REDIRECTION_FROM_GCR_IO_ENABLED = 2

google/cloud/artifactregistry_v1/types/version.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@
3737
class VersionView(proto.Enum):
3838
r"""The view, which determines what version information is
3939
returned in a response.
40+
41+
Values:
42+
VERSION_VIEW_UNSPECIFIED (0):
43+
The default / unset value.
44+
The API will default to the BASIC view.
45+
BASIC (1):
46+
Includes basic information about the version,
47+
but not any related tags.
48+
FULL (2):
49+
Include everything.
4050
"""
4151
VERSION_VIEW_UNSPECIFIED = 0
4252
BASIC = 1

google/cloud/artifactregistry_v1/types/yum_artifact.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,16 @@ class YumArtifact(proto.Message):
5050
"""
5151

5252
class PackageType(proto.Enum):
53-
r"""Package type is either binary or source."""
53+
r"""Package type is either binary or source.
54+
55+
Values:
56+
PACKAGE_TYPE_UNSPECIFIED (0):
57+
Package type is not specified.
58+
BINARY (1):
59+
Binary package (.rpm).
60+
SOURCE (2):
61+
Source package (.srpm).
62+
"""
5463
PACKAGE_TYPE_UNSPECIFIED = 0
5564
BINARY = 1
5665
SOURCE = 2

google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3391,7 +3391,7 @@ def sample_update_project_settings():
33913391
# Done; return the response.
33923392
return response
33933393

3394-
def __enter__(self):
3394+
def __enter__(self) -> "ArtifactRegistryClient":
33953395
return self
33963396

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

google/cloud/artifactregistry_v1beta2/types/apt_artifact.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,16 @@ class AptArtifact(proto.Message):
5858
"""
5959

6060
class PackageType(proto.Enum):
61-
r"""Package type is either binary or source."""
61+
r"""Package type is either binary or source.
62+
63+
Values:
64+
PACKAGE_TYPE_UNSPECIFIED (0):
65+
Package type is not specified.
66+
BINARY (1):
67+
Binary package.
68+
SOURCE (2):
69+
Source package.
70+
"""
6271
PACKAGE_TYPE_UNSPECIFIED = 0
6372
BINARY = 1
6473
SOURCE = 2

google/cloud/artifactregistry_v1beta2/types/file.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ class Hash(proto.Message):
4141
"""
4242

4343
class HashType(proto.Enum):
44-
r"""The algorithm used to compute the hash."""
44+
r"""The algorithm used to compute the hash.
45+
46+
Values:
47+
HASH_TYPE_UNSPECIFIED (0):
48+
Unspecified.
49+
SHA256 (1):
50+
SHA256 hash.
51+
MD5 (2):
52+
MD5 hash.
53+
"""
4554
HASH_TYPE_UNSPECIFIED = 0
4655
SHA256 = 1
4756
MD5 = 2

0 commit comments

Comments
 (0)