From faf55b1e9d9f256b13e0e62015a34dd7bb27ef0e Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Mon, 1 Nov 2021 10:46:11 +0000 Subject: [PATCH] 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: https://github.com/googleapis/googleapis/commit/83d81b0c8fc22291a13398d6d77f02dc97a5b6f4 Source-Link: https://github.com/googleapis/googleapis-gen/commit/2ff001fbacb9e77e71d734de5f955c05fdae8526 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmZmMDAxZmJhY2I5ZTc3ZTcxZDczNGRlNWY5NTVjMDVmZGFlODUyNiJ9 --- .../source_context_v1/types/source_context.py | 40 +++++++++++++++++++ packages/google-cloud-source-context/setup.py | 3 +- .../testing/constraints-3.6.txt | 4 +- 3 files changed, 42 insertions(+), 5 deletions(-) diff --git a/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py b/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py index 5bec072f8df9..7edbc9cd60b6 100644 --- a/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py +++ b/packages/google-cloud-source-context/google/cloud/source_context_v1/types/source_context.py @@ -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( @@ -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",) @@ -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. @@ -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,) @@ -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( diff --git a/packages/google-cloud-source-context/setup.py b/packages/google-cloud-source-context/setup.py index b5d3ac79d000..aea1421214d4 100644 --- a/packages/google-cloud-source-context/setup.py +++ b/packages/google-cloud-source-context/setup.py @@ -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__)) diff --git a/packages/google-cloud-source-context/testing/constraints-3.6.txt b/packages/google-cloud-source-context/testing/constraints-3.6.txt index 3f7f11e70e7a..1e3ec8b642ae 100644 --- a/packages/google-cloud-source-context/testing/constraints-3.6.txt +++ b/packages/google-cloud-source-context/testing/constraints-3.6.txt @@ -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 \ No newline at end of file