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

Commit

Permalink
chore: use gapic-generator-python 0.53.4 (#44)
Browse files Browse the repository at this point in the history
- [ ] 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: googleapis/googleapis-gen@2ff001f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9
  • Loading branch information
gcf-owl-bot[bot] committed Nov 1, 2021
1 parent 6e8655e commit 5234b6b
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 5 deletions.
40 changes: 40 additions & 0 deletions google/cloud/source_context_v1/types/source_context.py
Expand Up @@ -38,19 +38,30 @@ class SourceContext(proto.Message):
SourceContext together with a path point to a unique revision of
a single file or directory.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
cloud_repo (google.cloud.source_context_v1.types.CloudRepoSourceContext):
A SourceContext referring to a revision in a
cloud repo.
This field is a member of `oneof`_ ``context``.
cloud_workspace (google.cloud.source_context_v1.types.CloudWorkspaceSourceContext):
A SourceContext referring to a snapshot in a
cloud workspace.
This field is a member of `oneof`_ ``context``.
gerrit (google.cloud.source_context_v1.types.GerritSourceContext):
A SourceContext referring to a Gerrit
project.
This field is a member of `oneof`_ ``context``.
git (google.cloud.source_context_v1.types.GitSourceContext):
A SourceContext referring to any third party
Git repo (e.g. GitHub).
This field is a member of `oneof`_ ``context``.
"""

cloud_repo = proto.Field(
Expand Down Expand Up @@ -107,15 +118,25 @@ class CloudRepoSourceContext(proto.Message):
r"""A CloudRepoSourceContext denotes a particular revision in a
cloud repo (a repo hosted by the Google Cloud Platform).
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
repo_id (google.cloud.source_context_v1.types.RepoId):
The ID of the repo.
revision_id (str):
A revision ID.
This field is a member of `oneof`_ ``revision``.
alias_name (str):
The name of an alias (branch, tag, etc.).
This field is a member of `oneof`_ ``revision``.
alias_context (google.cloud.source_context_v1.types.AliasContext):
An alias, which may be a branch or tag.
This field is a member of `oneof`_ ``revision``.
"""

repo_id = proto.Field(proto.MESSAGE, number=1, message="RepoId",)
Expand Down Expand Up @@ -145,6 +166,13 @@ class CloudWorkspaceSourceContext(proto.Message):
class GerritSourceContext(proto.Message):
r"""A SourceContext referring to a Gerrit project.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
host_uri (str):
The URI of a running Gerrit instance.
Expand All @@ -155,10 +183,13 @@ class GerritSourceContext(proto.Message):
hostURI/project.
revision_id (str):
A revision (commit) ID.
This field is a member of `oneof`_ ``revision``.
alias_name (str):
The name of an alias (branch, tag, etc.).
This field is a member of `oneof`_ ``revision``.
alias_context (google.cloud.source_context_v1.types.AliasContext):
An alias, which may be a branch or tag.
This field is a member of `oneof`_ ``revision``.
"""

host_uri = proto.Field(proto.STRING, number=1,)
Expand Down Expand Up @@ -189,13 +220,22 @@ class GitSourceContext(proto.Message):
class RepoId(proto.Message):
r"""A unique identifier for a cloud repo.
This message has `oneof`_ fields (mutually exclusive fields).
For each oneof, at most one member field can be set at the same time.
Setting any member of the oneof automatically clears all other
members.
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
Attributes:
project_repo_id (google.cloud.source_context_v1.types.ProjectRepoId):
A combination of a project ID and a repo
name.
This field is a member of `oneof`_ ``id``.
uid (str):
A server-assigned, globally unique
identifier.
This field is a member of `oneof`_ ``id``.
"""

project_repo_id = proto.Field(
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Expand Up @@ -29,9 +29,8 @@
# NOTE: Maintainers, please do not require google-api-core>=2.x.x
# Until this issue is closed
# https://github.com/googleapis/google-cloud-python/issues/10566
"google-api-core[grpc] >= 1.26.0, <3.0.0dev",
"google-api-core[grpc] >= 1.28.0, <3.0.0dev",
"proto-plus >= 1.15.0",
"packaging >= 14.3",
]

package_root = os.path.abspath(os.path.dirname(__file__))
Expand Down
4 changes: 1 addition & 3 deletions testing/constraints-3.6.txt
Expand Up @@ -4,7 +4,5 @@
# Pin the version to the lower bound.
# e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev",
# Then this file should have google-cloud-foo==1.14.0
google-api-core==1.26.0
google-api-core==1.28.0
proto-plus==1.15.0
packaging==14.3
google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 is transitively required through google-api-core

0 comments on commit 5234b6b

Please sign in to comment.