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

Commit 5234b6b

Browse files
chore: use gapic-generator-python 0.53.4 (#44)
- [ ] Regenerate this pull request now. docs: list oneofs in docstring fix(deps): require google-api-core >= 1.28.0 fix(deps): drop packaging dependency committer: busunkim96@ PiperOrigin-RevId: 406468269 Source-Link: googleapis/googleapis@83d81b0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2ff001fbacb9e77e71d734de5f955c05fdae8526 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
1 parent 6e8655e commit 5234b6b

File tree

3 files changed

+42
-5
lines changed

3 files changed

+42
-5
lines changed

google/cloud/source_context_v1/types/source_context.py

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,19 +38,30 @@ class SourceContext(proto.Message):
3838
SourceContext together with a path point to a unique revision of
3939
a single file or directory.
4040
41+
This message has `oneof`_ fields (mutually exclusive fields).
42+
For each oneof, at most one member field can be set at the same time.
43+
Setting any member of the oneof automatically clears all other
44+
members.
45+
46+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
47+
4148
Attributes:
4249
cloud_repo (google.cloud.source_context_v1.types.CloudRepoSourceContext):
4350
A SourceContext referring to a revision in a
4451
cloud repo.
52+
This field is a member of `oneof`_ ``context``.
4553
cloud_workspace (google.cloud.source_context_v1.types.CloudWorkspaceSourceContext):
4654
A SourceContext referring to a snapshot in a
4755
cloud workspace.
56+
This field is a member of `oneof`_ ``context``.
4857
gerrit (google.cloud.source_context_v1.types.GerritSourceContext):
4958
A SourceContext referring to a Gerrit
5059
project.
60+
This field is a member of `oneof`_ ``context``.
5161
git (google.cloud.source_context_v1.types.GitSourceContext):
5262
A SourceContext referring to any third party
5363
Git repo (e.g. GitHub).
64+
This field is a member of `oneof`_ ``context``.
5465
"""
5566

5667
cloud_repo = proto.Field(
@@ -107,15 +118,25 @@ class CloudRepoSourceContext(proto.Message):
107118
r"""A CloudRepoSourceContext denotes a particular revision in a
108119
cloud repo (a repo hosted by the Google Cloud Platform).
109120
121+
This message has `oneof`_ fields (mutually exclusive fields).
122+
For each oneof, at most one member field can be set at the same time.
123+
Setting any member of the oneof automatically clears all other
124+
members.
125+
126+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
127+
110128
Attributes:
111129
repo_id (google.cloud.source_context_v1.types.RepoId):
112130
The ID of the repo.
113131
revision_id (str):
114132
A revision ID.
133+
This field is a member of `oneof`_ ``revision``.
115134
alias_name (str):
116135
The name of an alias (branch, tag, etc.).
136+
This field is a member of `oneof`_ ``revision``.
117137
alias_context (google.cloud.source_context_v1.types.AliasContext):
118138
An alias, which may be a branch or tag.
139+
This field is a member of `oneof`_ ``revision``.
119140
"""
120141

121142
repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",)
@@ -145,6 +166,13 @@ class CloudWorkspaceSourceContext(proto.Message):
145166
class GerritSourceContext(proto.Message):
146167
r"""A SourceContext referring to a Gerrit project.
147168
169+
This message has `oneof`_ fields (mutually exclusive fields).
170+
For each oneof, at most one member field can be set at the same time.
171+
Setting any member of the oneof automatically clears all other
172+
members.
173+
174+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
175+
148176
Attributes:
149177
host_uri (str):
150178
The URI of a running Gerrit instance.
@@ -155,10 +183,13 @@ class GerritSourceContext(proto.Message):
155183
hostURI/project.
156184
revision_id (str):
157185
A revision (commit) ID.
186+
This field is a member of `oneof`_ ``revision``.
158187
alias_name (str):
159188
The name of an alias (branch, tag, etc.).
189+
This field is a member of `oneof`_ ``revision``.
160190
alias_context (google.cloud.source_context_v1.types.AliasContext):
161191
An alias, which may be a branch or tag.
192+
This field is a member of `oneof`_ ``revision``.
162193
"""
163194

164195
host_uri = proto.Field(proto.STRING, number=1,)
@@ -189,13 +220,22 @@ class GitSourceContext(proto.Message):
189220
class RepoId(proto.Message):
190221
r"""A unique identifier for a cloud repo.
191222
223+
This message has `oneof`_ fields (mutually exclusive fields).
224+
For each oneof, at most one member field can be set at the same time.
225+
Setting any member of the oneof automatically clears all other
226+
members.
227+
228+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
229+
192230
Attributes:
193231
project_repo_id (google.cloud.source_context_v1.types.ProjectRepoId):
194232
A combination of a project ID and a repo
195233
name.
234+
This field is a member of `oneof`_ ``id``.
196235
uid (str):
197236
A server-assigned, globally unique
198237
identifier.
238+
This field is a member of `oneof`_ ``id``.
199239
"""
200240

201241
project_repo_id = proto.Field(

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
3030
# Until this issue is closed
3131
# https://github.com/googleapis/google-cloud-python/issues/10566
32-
"google-api-core[grpc] >= 1.26.0, <3.0.0dev",
32+
"google-api-core[grpc] >= 1.28.0, <3.0.0dev",
3333
"proto-plus >= 1.15.0",
34-
"packaging >= 14.3",
3534
]
3635

3736
package_root = os.path.abspath(os.path.dirname(__file__))

testing/constraints-3.6.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@
44
# Pin the version to the lower bound.
55
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
66
# Then this file should have google-cloud-foo==1.14.0
7-
google-api-core==1.26.0
7+
google-api-core==1.28.0
88
proto-plus==1.15.0
9-
packaging==14.3
10-
google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 is transitively required through google-api-core

0 commit comments

Comments
 (0)