From 4ce898e80eeb16b18d1ee29c678ade149804d186 Mon Sep 17 00:00:00 2001 From: Yoshi Automation Bot Date: Tue, 21 Apr 2020 01:49:28 -0700 Subject: [PATCH] feat: add methods for listing snapshots (via synth) (#66) * feat: add methods for listing snapshots (via synth) (#66) * chore: manual regen Co-authored-by: Bu Sun Kim Co-authored-by: Peter Lamut --- .coveragerc | 16 + .flake8 | 16 + .github/ISSUE_TEMPLATE/bug_report.md | 3 +- CONTRIBUTING.rst | 15 +- MANIFEST.in | 16 + .../cloud/pubsub_v1/gapic/publisher_client.py | 129 ++++- .../gapic/publisher_client_config.py | 6 + .../pubsub_v1/gapic/subscriber_client.py | 131 ++++- .../gapic/subscriber_client_config.py | 6 + .../transports/publisher_grpc_transport.py | 24 +- .../transports/subscriber_grpc_transport.py | 23 +- google/cloud/pubsub_v1/proto/pubsub.proto | 217 +++++---- google/cloud/pubsub_v1/proto/pubsub_pb2.py | 455 ++++++++++-------- noxfile.py | 5 +- setup.cfg | 16 + synth.metadata | 32 +- synth.py | 2 +- .../unit/gapic/v1/test_publisher_client_v1.py | 55 ++- .../gapic/v1/test_subscriber_client_v1.py | 61 ++- 19 files changed, 874 insertions(+), 354 deletions(-) diff --git a/.coveragerc b/.coveragerc index b178b094a..dd39c8546 100644 --- a/.coveragerc +++ b/.coveragerc @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [run] branch = True diff --git a/.flake8 b/.flake8 index 0268ecc9c..20fe9bda2 100644 --- a/.flake8 +++ b/.flake8 @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [flake8] ignore = E203, E266, E501, W503 diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 2c59dab14..27057e60f 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better! Please run down the following list and make sure you've tried the usual "quick fixes": - Search the issues already opened: https://github.com/googleapis/python-pubsub/issues - - Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python - - Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python + - Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python If you are still having issues, please be sure to include as much information as possible: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4f6294209..7eb8028d5 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -22,7 +22,7 @@ In order to add a feature: documentation. - The feature must work fully on the following CPython versions: 2.7, - 3.5, 3.6, and 3.7 on both UNIX and Windows. + 3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows. - The feature must not add unnecessary dependencies (where "unnecessary" is of course subjective, but new dependencies should @@ -214,26 +214,18 @@ We support: - `Python 3.5`_ - `Python 3.6`_ - `Python 3.7`_ +- `Python 3.8`_ .. _Python 3.5: https://docs.python.org/3.5/ .. _Python 3.6: https://docs.python.org/3.6/ .. _Python 3.7: https://docs.python.org/3.7/ +.. _Python 3.8: https://docs.python.org/3.8/ Supported versions can be found in our ``noxfile.py`` `config`_. .. _config: https://github.com/googleapis/python-pubsub/blob/master/noxfile.py -We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_ -and lack of continuous integration `support`_. - -.. _Python 2.5: https://docs.python.org/2.5/ -.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/ -.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/ - -We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no -longer supported by the core development team. - Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020. We also explicitly decided to support Python 3 beginning with version @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version .. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django .. _projects: http://flask.pocoo.org/docs/0.10/python3/ .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/ -.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995 ********** Versioning diff --git a/MANIFEST.in b/MANIFEST.in index cd011be27..68855abc3 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! include README.rst LICENSE recursive-include google *.json *.proto diff --git a/google/cloud/pubsub_v1/gapic/publisher_client.py b/google/cloud/pubsub_v1/gapic/publisher_client.py index 589d64508..1a981fefa 100644 --- a/google/cloud/pubsub_v1/gapic/publisher_client.py +++ b/google/cloud/pubsub_v1/gapic/publisher_client.py @@ -364,10 +364,9 @@ def update_topic( message :class:`~google.cloud.pubsub_v1.types.Topic` update_mask (Union[dict, ~google.cloud.pubsub_v1.types.FieldMask]): Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if ``update_mask`` contains - "message\_storage\_policy" then the new value will be determined based - on the policy configured at the project or organization level. The - ``message_storage_policy`` must not be set in the ``topic`` provided - above. + "message\_storage\_policy" but the ``message_storage_policy`` is not set + in the ``topic`` provided above, then the updated value is determined by + the policy configured at the project or organization level. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.pubsub_v1.types.FieldMask` @@ -774,6 +773,113 @@ def list_topic_subscriptions( ) return iterator + def list_topic_snapshots( + self, + topic, + page_size=None, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Lists the names of the snapshots on this topic. Snapshots are used in + Seek + operations, which allow + you to manage message acknowledgments in bulk. That is, you can set the + acknowledgment state of messages in an existing subscription to the state + captured by a snapshot. + + Example: + >>> from google.cloud import pubsub_v1 + >>> + >>> client = pubsub_v1.PublisherClient() + >>> + >>> topic = client.topic_path('[PROJECT]', '[TOPIC]') + >>> + >>> # Iterate over all results + >>> for element in client.list_topic_snapshots(topic): + ... # process element + ... pass + >>> + >>> + >>> # Alternatively: + >>> + >>> # Iterate over results one page at a time + >>> for page in client.list_topic_snapshots(topic).pages: + ... for element in page: + ... # process element + ... pass + + Args: + topic (str): Required. The name of the topic that snapshots are attached to. Format + is ``projects/{project}/topics/{topic}``. + page_size (int): The maximum number of resources contained in the + underlying API response. If page streaming is performed per- + resource, this parameter does not affect the return value. If page + streaming is performed per-page, this determines the maximum number + of resources in a page. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.api_core.page_iterator.GRPCIterator` instance. + An iterable of :class:`str` instances. + You can also iterate over the pages of the response + using its `pages` property. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "list_topic_snapshots" not in self._inner_api_calls: + self._inner_api_calls[ + "list_topic_snapshots" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.list_topic_snapshots, + default_retry=self._method_configs["ListTopicSnapshots"].retry, + default_timeout=self._method_configs["ListTopicSnapshots"].timeout, + client_info=self._client_info, + ) + + request = pubsub_pb2.ListTopicSnapshotsRequest(topic=topic, page_size=page_size) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("topic", topic)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + iterator = google.api_core.page_iterator.GRPCIterator( + client=None, + method=functools.partial( + self._inner_api_calls["list_topic_snapshots"], + retry=retry, + timeout=timeout, + metadata=metadata, + ), + request=request, + items_field="snapshots", + request_token_field="page_token", + response_token_field="next_page_token", + ) + return iterator + def delete_topic( self, topic, @@ -858,15 +964,16 @@ def set_iam_policy( Sets the access control policy on the specified resource. Replaces any existing policy. - Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - PERMISSION_DENIED + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. Example: >>> from google.cloud import pubsub_v1 >>> >>> client = pubsub_v1.PublisherClient() >>> - >>> resource = client.topic_path('[PROJECT]', '[TOPIC]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -948,7 +1055,8 @@ def get_iam_policy( >>> >>> client = pubsub_v1.PublisherClient() >>> - >>> resource = client.topic_path('[PROJECT]', '[TOPIC]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1021,7 +1129,7 @@ def test_iam_permissions( """ Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of - permissions, not a NOT_FOUND error. + permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization @@ -1032,7 +1140,8 @@ def test_iam_permissions( >>> >>> client = pubsub_v1.PublisherClient() >>> - >>> resource = client.topic_path('[PROJECT]', '[TOPIC]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] diff --git a/google/cloud/pubsub_v1/gapic/publisher_client_config.py b/google/cloud/pubsub_v1/gapic/publisher_client_config.py index dceb04a3c..ec8f8baec 100644 --- a/google/cloud/pubsub_v1/gapic/publisher_client_config.py +++ b/google/cloud/pubsub_v1/gapic/publisher_client_config.py @@ -4,6 +4,7 @@ "retry_codes": { "idempotent": ["ABORTED", "UNAVAILABLE", "UNKNOWN"], "non_idempotent": ["UNAVAILABLE"], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "none": [], "publish": [ "ABORTED", @@ -73,6 +74,11 @@ "retry_codes_name": "idempotent", "retry_params_name": "default", }, + "ListTopicSnapshots": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent2", + "retry_params_name": "default", + }, "DeleteTopic": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/google/cloud/pubsub_v1/gapic/subscriber_client.py b/google/cloud/pubsub_v1/gapic/subscriber_client.py index 6516c2264..e98a686bf 100644 --- a/google/cloud/pubsub_v1/gapic/subscriber_client.py +++ b/google/cloud/pubsub_v1/gapic/subscriber_client.py @@ -246,7 +246,9 @@ def create_subscription( labels=None, enable_message_ordering=None, expiration_policy=None, + filter_=None, dead_letter_policy=None, + retry_policy=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None, @@ -343,6 +345,13 @@ def create_subscription( If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.pubsub_v1.types.ExpirationPolicy` + filter_ (str): An expression written in the Cloud Pub/Sub filter language. If + non-empty, then only ``PubsubMessage``\ s whose ``attributes`` field + matches the filter are delivered on this subscription. If empty, then no + messages are filtered out. EXPERIMENTAL: This feature is part of a + closed alpha release. This API might be changed in backward-incompatible + ways and is not recommended for production use. It is not subject to any + SLA or deprecation policy. dead_letter_policy (Union[dict, ~google.cloud.pubsub_v1.types.DeadLetterPolicy]): A policy that specifies the conditions for dead lettering messages in this subscription. If dead\_letter\_policy is not set, dead lettering is disabled. @@ -351,12 +360,22 @@ def create_subscription( parent project (i.e., service-{project\_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription. - EXPERIMENTAL: This feature is part of a closed alpha release. This API - might be changed in backward-incompatible ways and is not recommended - for production use. It is not subject to any SLA or deprecation policy. If a dict is provided, it must be of the same form as the protobuf message :class:`~google.cloud.pubsub_v1.types.DeadLetterPolicy` + retry_policy (Union[dict, ~google.cloud.pubsub_v1.types.RetryPolicy]): A policy that specifies how Cloud Pub/Sub retries message delivery for this + subscription. + + If not set, the default retry policy is applied. This generally implies + that messages will be retried as soon as possible for healthy subscribers. + RetryPolicy will be triggered on NACKs or acknowledgement deadline + exceeded events for a given message. + EXPERIMENTAL: This API might be changed in backward-incompatible + ways and is not recommended for production use. It is not subject to any + SLA or deprecation policy. + + If a dict is provided, it must be of the same form as the protobuf + message :class:`~google.cloud.pubsub_v1.types.RetryPolicy` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -397,7 +416,9 @@ def create_subscription( labels=labels, enable_message_ordering=enable_message_ordering, expiration_policy=expiration_policy, + filter=filter_, dead_letter_policy=dead_letter_policy, + retry_policy=retry_policy, ) if metadata is None: metadata = [] @@ -747,6 +768,80 @@ def delete_subscription( request, retry=retry, timeout=timeout, metadata=metadata ) + def get_snapshot( + self, + snapshot, + retry=google.api_core.gapic_v1.method.DEFAULT, + timeout=google.api_core.gapic_v1.method.DEFAULT, + metadata=None, + ): + """ + Gets the configuration details of a snapshot. Snapshots are used in + Seek + operations, which allow you to manage message acknowledgments in bulk. That + is, you can set the acknowledgment state of messages in an existing + subscription to the state captured by a snapshot. + + Example: + >>> from google.cloud import pubsub_v1 + >>> + >>> client = pubsub_v1.SubscriberClient() + >>> + >>> snapshot = client.snapshot_path('[PROJECT]', '[SNAPSHOT]') + >>> + >>> response = client.get_snapshot(snapshot) + + Args: + snapshot (str): Required. The name of the snapshot to get. Format is + ``projects/{project}/snapshots/{snap}``. + retry (Optional[google.api_core.retry.Retry]): A retry object used + to retry requests. If ``None`` is specified, requests will + be retried using a default configuration. + timeout (Optional[float]): The amount of time, in seconds, to wait + for the request to complete. Note that if ``retry`` is + specified, the timeout applies to each individual attempt. + metadata (Optional[Sequence[Tuple[str, str]]]): Additional metadata + that is provided to the method. + + Returns: + A :class:`~google.cloud.pubsub_v1.types.Snapshot` instance. + + Raises: + google.api_core.exceptions.GoogleAPICallError: If the request + failed for any reason. + google.api_core.exceptions.RetryError: If the request failed due + to a retryable error and retry attempts failed. + ValueError: If the parameters are invalid. + """ + # Wrap the transport method to add retry and timeout logic. + if "get_snapshot" not in self._inner_api_calls: + self._inner_api_calls[ + "get_snapshot" + ] = google.api_core.gapic_v1.method.wrap_method( + self.transport.get_snapshot, + default_retry=self._method_configs["GetSnapshot"].retry, + default_timeout=self._method_configs["GetSnapshot"].timeout, + client_info=self._client_info, + ) + + request = pubsub_pb2.GetSnapshotRequest(snapshot=snapshot) + if metadata is None: + metadata = [] + metadata = list(metadata) + try: + routing_header = [("snapshot", snapshot)] + except AttributeError: + pass + else: + routing_metadata = google.api_core.gapic_v1.routing_header.to_grpc_metadata( + routing_header + ) + metadata.append(routing_metadata) + + return self._inner_api_calls["get_snapshot"]( + request, retry=retry, timeout=timeout, metadata=metadata + ) + def modify_ack_deadline( self, subscription, @@ -950,13 +1045,16 @@ def pull( Args: subscription (str): Required. The subscription from which messages should be pulled. Format is ``projects/{project}/subscriptions/{sub}``. - max_messages (int): Required. The maximum number of messages to return for this request. Must be a - positive integer. The Pub/Sub system may return fewer than the number + max_messages (int): Required. The maximum number of messages to return for this request. Must + be a positive integer. The Pub/Sub system may return fewer than the number specified. - return_immediately (bool): If this field set to true, the system will respond immediately even if - it there are no messages available to return in the ``Pull`` response. - Otherwise, the system may wait (for a bounded amount of time) until at - least one message is available, rather than returning no messages. + return_immediately (bool): Optional. If this field set to true, the system will respond immediately + even if it there are no messages available to return in the ``Pull`` + response. Otherwise, the system may wait (for a bounded amount of time) + until at least one message is available, rather than returning no + messages. Warning: setting this field to ``true`` is discouraged because + it adversely impacts the performance of ``Pull`` operations. We + recommend that users do not set this field. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will be retried using a default configuration. @@ -1648,15 +1746,16 @@ def set_iam_policy( Sets the access control policy on the specified resource. Replaces any existing policy. - Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - PERMISSION_DENIED + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. Example: >>> from google.cloud import pubsub_v1 >>> >>> client = pubsub_v1.SubscriberClient() >>> - >>> resource = client.subscription_path('[PROJECT]', '[SUBSCRIPTION]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `policy`: >>> policy = {} @@ -1738,7 +1837,8 @@ def get_iam_policy( >>> >>> client = pubsub_v1.SubscriberClient() >>> - >>> resource = client.subscription_path('[PROJECT]', '[SUBSCRIPTION]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> response = client.get_iam_policy(resource) @@ -1811,7 +1911,7 @@ def test_iam_permissions( """ Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of - permissions, not a NOT_FOUND error. + permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization @@ -1822,7 +1922,8 @@ def test_iam_permissions( >>> >>> client = pubsub_v1.SubscriberClient() >>> - >>> resource = client.subscription_path('[PROJECT]', '[SUBSCRIPTION]') + >>> # TODO: Initialize `resource`: + >>> resource = '' >>> >>> # TODO: Initialize `permissions`: >>> permissions = [] diff --git a/google/cloud/pubsub_v1/gapic/subscriber_client_config.py b/google/cloud/pubsub_v1/gapic/subscriber_client_config.py index 2c8e64b51..fc3254975 100644 --- a/google/cloud/pubsub_v1/gapic/subscriber_client_config.py +++ b/google/cloud/pubsub_v1/gapic/subscriber_client_config.py @@ -4,6 +4,7 @@ "retry_codes": { "idempotent": ["ABORTED", "UNAVAILABLE", "UNKNOWN"], "non_idempotent": ["UNAVAILABLE"], + "idempotent2": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "streaming_pull": [ "ABORTED", "DEADLINE_EXCEEDED", @@ -67,6 +68,11 @@ "retry_codes_name": "non_idempotent", "retry_params_name": "default", }, + "GetSnapshot": { + "timeout_millis": 60000, + "retry_codes_name": "idempotent2", + "retry_params_name": "default", + }, "ModifyAckDeadline": { "timeout_millis": 60000, "retry_codes_name": "non_idempotent", diff --git a/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py b/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py index 90c5726ff..a32aa8f7e 100644 --- a/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py +++ b/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py @@ -193,6 +193,24 @@ def list_topic_subscriptions(self): """ return self._stubs["publisher_stub"].ListTopicSubscriptions + @property + def list_topic_snapshots(self): + """Return the gRPC stub for :meth:`PublisherClient.list_topic_snapshots`. + + Lists the names of the snapshots on this topic. Snapshots are used in + Seek + operations, which allow + you to manage message acknowledgments in bulk. That is, you can set the + acknowledgment state of messages in an existing subscription to the state + captured by a snapshot. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["publisher_stub"].ListTopicSnapshots + @property def delete_topic(self): """Return the gRPC stub for :meth:`PublisherClient.delete_topic`. @@ -218,8 +236,8 @@ def set_iam_policy(self): Sets the access control policy on the specified resource. Replaces any existing policy. - Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - PERMISSION_DENIED + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. Returns: Callable: A callable which accepts the appropriate @@ -248,7 +266,7 @@ def test_iam_permissions(self): Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of - permissions, not a NOT_FOUND error. + permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization diff --git a/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py b/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py index 82af562ae..c569051b3 100644 --- a/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py +++ b/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py @@ -192,6 +192,23 @@ def delete_subscription(self): """ return self._stubs["subscriber_stub"].DeleteSubscription + @property + def get_snapshot(self): + """Return the gRPC stub for :meth:`SubscriberClient.get_snapshot`. + + Gets the configuration details of a snapshot. Snapshots are used in + Seek + operations, which allow you to manage message acknowledgments in bulk. That + is, you can set the acknowledgment state of messages in an existing + subscription to the state captured by a snapshot. + + Returns: + Callable: A callable which accepts the appropriate + deserialized request object and returns a + deserialized response object. + """ + return self._stubs["subscriber_stub"].GetSnapshot + @property def modify_ack_deadline(self): """Return the gRPC stub for :meth:`SubscriberClient.modify_ack_deadline`. @@ -392,8 +409,8 @@ def set_iam_policy(self): Sets the access control policy on the specified resource. Replaces any existing policy. - Can return Public Errors: NOT_FOUND, INVALID_ARGUMENT and - PERMISSION_DENIED + Can return `NOT_FOUND`, `INVALID_ARGUMENT`, and `PERMISSION_DENIED` + errors. Returns: Callable: A callable which accepts the appropriate @@ -422,7 +439,7 @@ def test_iam_permissions(self): Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of - permissions, not a NOT_FOUND error. + permissions, not a `NOT_FOUND` error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization diff --git a/google/cloud/pubsub_v1/proto/pubsub.proto b/google/cloud/pubsub_v1/proto/pubsub.proto index adaf8c6fc..832e0649c 100644 --- a/google/cloud/pubsub_v1/proto/pubsub.proto +++ b/google/cloud/pubsub_v1/proto/pubsub.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.pubsub.v1; +import "google/api/annotations.proto"; import "google/api/client.proto"; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; @@ -23,7 +24,6 @@ import "google/protobuf/duration.proto"; import "google/protobuf/empty.proto"; import "google/protobuf/field_mask.proto"; import "google/protobuf/timestamp.proto"; -import "google/api/annotations.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSub.V1"; @@ -89,7 +89,8 @@ service Publisher { } // Lists the names of the subscriptions on this topic. - rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) returns (ListTopicSubscriptionsResponse) { + rpc ListTopicSubscriptions(ListTopicSubscriptionsRequest) + returns (ListTopicSubscriptionsResponse) { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/subscriptions" }; @@ -102,10 +103,12 @@ service Publisher { // you to manage message acknowledgments in bulk. That is, you can set the // acknowledgment state of messages in an existing subscription to the state // captured by a snapshot. - rpc ListTopicSnapshots(ListTopicSnapshotsRequest) returns (ListTopicSnapshotsResponse) { + rpc ListTopicSnapshots(ListTopicSnapshotsRequest) + returns (ListTopicSnapshotsResponse) { option (google.api.http) = { get: "/v1/{topic=projects/*/topics/*}/snapshots" }; + option (google.api.method_signature) = "topic"; } // Deletes the topic with the given name. Returns `NOT_FOUND` if the topic @@ -208,9 +211,7 @@ message GetTopicRequest { // Format is `projects/{project}/topics/{topic}`. string topic = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; } @@ -219,12 +220,13 @@ message UpdateTopicRequest { // Required. The updated topic object. Topic topic = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. Indicates which fields in the provided topic to update. Must be specified - // and non-empty. Note that if `update_mask` contains - // "message_storage_policy" then the new value will be determined based on the - // policy configured at the project or organization level. The - // `message_storage_policy` must not be set in the `topic` provided above. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + // Required. Indicates which fields in the provided topic to update. Must be + // specified and non-empty. Note that if `update_mask` contains + // "message_storage_policy" but the `message_storage_policy` is not set in + // the `topic` provided above, then the updated value is determined by the + // policy configured at the project or organization level. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request for the Publish method. @@ -233,9 +235,7 @@ message PublishRequest { // Format is `projects/{project}/topics/{topic}`. string topic = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; // Required. The messages to publish. @@ -286,9 +286,7 @@ message ListTopicSubscriptionsRequest { // Format is `projects/{project}/topics/{topic}`. string topic = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; // Maximum number of subscription names to return. @@ -304,8 +302,8 @@ message ListTopicSubscriptionsRequest { message ListTopicSubscriptionsResponse { // The names of the subscriptions that match the request. repeated string subscriptions = 1 [(google.api.resource_reference) = { - type: "pubsub.googleapis.com/Subscription" - }]; + type: "pubsub.googleapis.com/Subscription" + }]; // If not empty, indicates that there may be more subscriptions that match // the request; this value should be passed in a new @@ -315,9 +313,12 @@ message ListTopicSubscriptionsResponse { // Request for the `ListTopicSnapshots` method. message ListTopicSnapshotsRequest { - // The name of the topic that snapshots are attached to. + // Required. The name of the topic that snapshots are attached to. // Format is `projects/{project}/topics/{topic}`. - string topic = 1; + string topic = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // Maximum number of snapshot names to return. int32 page_size = 2; @@ -345,9 +346,7 @@ message DeleteTopicRequest { // Format is `projects/{project}/topics/{topic}`. string topic = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; } @@ -378,7 +377,8 @@ service Subscriber { put: "/v1/{name=projects/*/subscriptions/*}" body: "*" }; - option (google.api.method_signature) = "name,topic,push_config,ack_deadline_seconds"; + option (google.api.method_signature) = + "name,topic,push_config,ack_deadline_seconds"; } // Gets the configuration details of a subscription. @@ -399,7 +399,8 @@ service Subscriber { } // Lists matching subscriptions. - rpc ListSubscriptions(ListSubscriptionsRequest) returns (ListSubscriptionsResponse) { + rpc ListSubscriptions(ListSubscriptionsRequest) + returns (ListSubscriptionsResponse) { option (google.api.http) = { get: "/v1/{project=projects/*}/subscriptions" }; @@ -411,7 +412,8 @@ service Subscriber { // `NOT_FOUND`. After a subscription is deleted, a new one may be created with // the same name, but the new one has no association with the old // subscription or its topic unless the same topic is specified. - rpc DeleteSubscription(DeleteSubscriptionRequest) returns (google.protobuf.Empty) { + rpc DeleteSubscription(DeleteSubscriptionRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { delete: "/v1/{subscription=projects/*/subscriptions/*}" }; @@ -423,12 +425,14 @@ service Subscriber { // subscriber, or to make the message available for redelivery if the // processing was interrupted. Note that this does not modify the // subscription-level `ackDeadlineSeconds` used for subsequent messages. - rpc ModifyAckDeadline(ModifyAckDeadlineRequest) returns (google.protobuf.Empty) { + rpc ModifyAckDeadline(ModifyAckDeadlineRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline" body: "*" }; - option (google.api.method_signature) = "subscription,ack_ids,ack_deadline_seconds"; + option (google.api.method_signature) = + "subscription,ack_ids,ack_deadline_seconds"; } // Acknowledges the messages associated with the `ack_ids` in the @@ -454,7 +458,8 @@ service Subscriber { post: "/v1/{subscription=projects/*/subscriptions/*}:pull" body: "*" }; - option (google.api.method_signature) = "subscription,return_immediately,max_messages"; + option (google.api.method_signature) = + "subscription,return_immediately,max_messages"; } // Establishes a stream with the server, which sends messages down to the @@ -464,8 +469,8 @@ service Subscriber { // reassign server-side resources, in which case, the client should // re-establish the stream. Flow control can be achieved by configuring the // underlying RPC channel. - rpc StreamingPull(stream StreamingPullRequest) returns (stream StreamingPullResponse) { - } + rpc StreamingPull(stream StreamingPullRequest) + returns (stream StreamingPullResponse) {} // Modifies the `PushConfig` for a specified subscription. // @@ -473,7 +478,8 @@ service Subscriber { // an empty `PushConfig`) or vice versa, or change the endpoint URL and other // attributes of a push subscription. Messages will accumulate for delivery // continuously through the call regardless of changes to the `PushConfig`. - rpc ModifyPushConfig(ModifyPushConfigRequest) returns (google.protobuf.Empty) { + rpc ModifyPushConfig(ModifyPushConfigRequest) + returns (google.protobuf.Empty) { option (google.api.http) = { post: "/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig" body: "*" @@ -490,6 +496,7 @@ service Subscriber { option (google.api.http) = { get: "/v1/{snapshot=projects/*/snapshots/*}" }; + option (google.api.method_signature) = "snapshot"; } // Lists the existing snapshots. Snapshots are used in @@ -592,15 +599,12 @@ message Subscription { // in length, and it must not start with `"goog"`. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Required. The name of the topic from which this subscription is receiving messages. - // Format is `projects/{project}/topics/{topic}`. - // The value of this field will be `_deleted-topic_` if the topic has been - // deleted. + // Required. The name of the topic from which this subscription is receiving + // messages. Format is `projects/{project}/topics/{topic}`. The value of this + // field will be `_deleted-topic_` if the topic has been deleted. string topic = 2 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } ]; // If push delivery is used with this subscription, this field is @@ -668,6 +672,15 @@ message Subscription { // value for `expiration_policy.ttl` is 1 day. ExpirationPolicy expiration_policy = 11; + // An expression written in the Cloud Pub/Sub filter language. If non-empty, + // then only `PubsubMessage`s whose `attributes` field matches the filter are + // delivered on this subscription. If empty, then no messages are filtered + // out. + // EXPERIMENTAL: This feature is part of a closed alpha release. This + // API might be changed in backward-incompatible ways and is not recommended + // for production use. It is not subject to any SLA or deprecation policy. + string filter = 12; + // A policy that specifies the conditions for dead lettering messages in // this subscription. If dead_letter_policy is not set, dead lettering // is disabled. @@ -676,10 +689,40 @@ message Subscription { // parent project (i.e., // service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have // permission to Acknowledge() messages on this subscription. - // EXPERIMENTAL: This feature is part of a closed alpha release. This - // API might be changed in backward-incompatible ways and is not recommended - // for production use. It is not subject to any SLA or deprecation policy. DeadLetterPolicy dead_letter_policy = 13; + + // A policy that specifies how Cloud Pub/Sub retries message delivery for this + // subscription. + // + // If not set, the default retry policy is applied. This generally implies + // that messages will be retried as soon as possible for healthy subscribers. + // RetryPolicy will be triggered on NACKs or acknowledgement deadline + // exceeded events for a given message. + // EXPERIMENTAL: This API might be changed in backward-incompatible + // ways and is not recommended for production use. It is not subject to any + // SLA or deprecation policy. + RetryPolicy retry_policy = 14; +} + +// A policy that specifies how Cloud Pub/Sub retries message delivery. +// +// Retry delay will be exponential based on provided minimum and maximum +// backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. +// +// RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded +// events for a given message. +// +// Retry Policy is implemented on a best effort basis. At times, the delay +// between consecutive deliveries may not match the configuration. That is, +// delay can be more or less than configured backoff. +message RetryPolicy { + // The minimum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 10 seconds. + google.protobuf.Duration minimum_backoff = 1; + + // The maximum delay between consecutive deliveries of a given message. + // Value should be between 0 and 600 seconds. Defaults to 600 seconds. + google.protobuf.Duration maximum_backoff = 2; } // Dead lettering is done on a best effort basis. The same message might be @@ -750,7 +793,7 @@ message PushConfig { } // A URL locating the endpoint to which messages should be pushed. - // For example, a Webhook endpoint might use "https://example.com/push". + // For example, a Webhook endpoint might use `https://example.com/push`. string push_endpoint = 1; // Endpoint configuration attributes that can be used to control different @@ -834,7 +877,8 @@ message UpdateSubscriptionRequest { // Required. Indicates which fields in the provided subscription to update. // Must be specified and non-empty. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // Request for the `ListSubscriptions` method. @@ -911,14 +955,18 @@ message PullRequest { } ]; - // If this field set to true, the system will respond immediately even if - // it there are no messages available to return in the `Pull` response. - // Otherwise, the system may wait (for a bounded amount of time) until at - // least one message is available, rather than returning no messages. - bool return_immediately = 2; - - // Required. The maximum number of messages to return for this request. Must be a - // positive integer. The Pub/Sub system may return fewer than the number + // Optional. If this field set to true, the system will respond immediately + // even if it there are no messages available to return in the `Pull` + // response. Otherwise, the system may wait (for a bounded amount of time) + // until at least one message is available, rather than returning no messages. + // Warning: setting this field to `true` is discouraged because it adversely + // impacts the performance of `Pull` operations. We recommend that users do + // not set this field. + bool return_immediately = 2 + [deprecated = true, (google.api.field_behavior) = OPTIONAL]; + + // Required. The maximum number of messages to return for this request. Must + // be a positive integer. The Pub/Sub system may return fewer than the number // specified. int32 max_messages = 3 [(google.api.field_behavior) = REQUIRED]; } @@ -946,10 +994,10 @@ message ModifyAckDeadlineRequest { // Required. List of acknowledgment IDs. repeated string ack_ids = 4 [(google.api.field_behavior) = REQUIRED]; - // Required. The new ack deadline with respect to the time this request was sent to - // the Pub/Sub system. For example, if the value is 10, the new - // ack deadline will expire 10 seconds after the `ModifyAckDeadline` call - // was made. Specifying zero might immediately make the message available for + // Required. The new ack deadline with respect to the time this request was + // sent to the Pub/Sub system. For example, if the value is 10, the new ack + // deadline will expire 10 seconds after the `ModifyAckDeadline` call was + // made. Specifying zero might immediately make the message available for // delivery to another subscriber client. This typically results in an // increase in the rate of message redeliveries (that is, duplicates). // The minimum deadline you can specify is 0 seconds. @@ -968,8 +1016,9 @@ message AcknowledgeRequest { } ]; - // Required. The acknowledgment ID for the messages being acknowledged that was returned - // by the Pub/Sub system in the `Pull` response. Must not be empty. + // Required. The acknowledgment ID for the messages being acknowledged that + // was returned by the Pub/Sub system in the `Pull` response. Must not be + // empty. repeated string ack_ids = 2 [(google.api.field_behavior) = REQUIRED]; } @@ -977,8 +1026,8 @@ message AcknowledgeRequest { // establish the initial stream as well as to stream acknowledgements and ack // deadline modifications from the client to the server. message StreamingPullRequest { - // Required. The subscription for which to initialize the new stream. This must be - // provided in the first request on the stream, and must not be set in + // Required. The subscription for which to initialize the new stream. This + // must be provided in the first request on the stream, and must not be set in // subsequent requests from client to server. // Format is `projects/{project}/subscriptions/{sub}`. string subscription = 1 [ @@ -1015,11 +1064,12 @@ message StreamingPullRequest { // processing was interrupted. repeated string modify_deadline_ack_ids = 4; - // Required. The ack deadline to use for the stream. This must be provided in the - // first request on the stream, but it can also be updated on subsequent + // Required. The ack deadline to use for the stream. This must be provided in + // the first request on the stream, but it can also be updated on subsequent // requests from client to server. The minimum deadline you can specify is 10 // seconds. The maximum deadline you can specify is 600 seconds (10 minutes). - int32 stream_ack_deadline_seconds = 5 [(google.api.field_behavior) = REQUIRED]; + int32 stream_ack_deadline_seconds = 5 + [(google.api.field_behavior) = REQUIRED]; // A unique identifier that is used to distinguish client instances from each // other. Only needs to be provided on the initial request. When a stream @@ -1039,17 +1089,15 @@ message StreamingPullResponse { // Request for the `CreateSnapshot` method. message CreateSnapshotRequest { - // Required. User-provided name for this snapshot. If the name is not provided in the - // request, the server will assign a random name for this snapshot on the same - // project as the subscription. Note that for REST API requests, you must - // specify a name. See the resource // name rules. Format is `projects/{project}/snapshots/{snap}`. string name = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Snapshot" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } ]; // Required. The subscription whose backlog the snapshot retains. @@ -1080,7 +1128,8 @@ message UpdateSnapshotRequest { // Required. Indicates which fields in the provided snapshot to update. // Must be specified and non-empty. - google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; } // A snapshot resource. Snapshots are used in @@ -1099,9 +1148,9 @@ message Snapshot { string name = 1; // The name of the topic from which this snapshot is retaining messages. - string topic = 2 [(google.api.resource_reference) = { - type: "pubsub.googleapis.com/Topic" - }]; + string topic = 2 [ + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Topic" } + ]; // The snapshot is guaranteed to exist up until this time. // A newly-created snapshot expires no later than 7 days from the time of its @@ -1126,9 +1175,7 @@ message GetSnapshotRequest { // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Snapshot" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } ]; } @@ -1168,9 +1215,7 @@ message DeleteSnapshotRequest { // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 1 [ (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "pubsub.googleapis.com/Snapshot" - } + (google.api.resource_reference) = { type: "pubsub.googleapis.com/Snapshot" } ]; } @@ -1202,12 +1247,10 @@ message SeekRequest { // the provided subscription. // Format is `projects/{project}/snapshots/{snap}`. string snapshot = 3 [(google.api.resource_reference) = { - type: "pubsub.googleapis.com/Snapshot" - }]; + type: "pubsub.googleapis.com/Snapshot" + }]; } } // Response for the `Seek` method (this response is empty). -message SeekResponse { - -} +message SeekResponse {} diff --git a/google/cloud/pubsub_v1/proto/pubsub_pb2.py b/google/cloud/pubsub_v1/proto/pubsub_pb2.py index 4843bbdbe..4729f11ee 100644 --- a/google/cloud/pubsub_v1/proto/pubsub_pb2.py +++ b/google/cloud/pubsub_v1/proto/pubsub_pb2.py @@ -15,6 +15,7 @@ _sym_db = _symbol_database.Default() +from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 from google.api import client_pb2 as google_dot_api_dot_client__pb2 from google.api import field_behavior_pb2 as google_dot_api_dot_field__behavior__pb2 from google.api import resource_pb2 as google_dot_api_dot_resource__pb2 @@ -22,7 +23,6 @@ from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from google.protobuf import field_mask_pb2 as google_dot_protobuf_dot_field__mask__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -from google.api import annotations_pb2 as google_dot_api_dot_annotations__pb2 DESCRIPTOR = _descriptor.FileDescriptor( @@ -33,9 +33,10 @@ "\n\024com.google.pubsub.v1B\013PubsubProtoP\001Z6google.golang.org/genproto/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\Cloud\\PubSub\\V1\352\002\031Google::Cloud::PubSub::V1" ), serialized_pb=_b( - '\n)google/cloud/pubsub_v1/proto/pubsub.proto\x12\x10google.pubsub.v1\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto\x1a\x1cgoogle/api/annotations.proto";\n\x14MessageStoragePolicy\x12#\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\t"\xb2\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntry\x12\x46\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicy\x12\x14\n\x0ckms_key_name\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:T\xea\x41Q\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_"\xf1\x01\n\rPubsubMessage\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x43\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntry\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cordering_key\x18\x05 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02"&\n\x0fPublishResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t"\x80\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"V\n\x12ListTopicsResponse\x12\'\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.Topic\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"z\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"y\n\x1eListTopicSubscriptionsResponse\x12>\n\rsubscriptions\x18\x01 \x03(\tB\'\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x19ListTopicSnapshotsRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"H\n\x1aListTopicSnapshotsResponse\x12\x11\n\tsnapshots\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic"\xe9\x04\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x31\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfig\x12\x1c\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x12\x1d\n\x15retain_acked_messages\x18\x07 \x01(\x08\x12=\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntry\x12\x1f\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x12=\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32".google.pubsub.v1.ExpirationPolicy\x12>\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32".google.pubsub.v1.DeadLetterPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:X\xea\x41U\n"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}"L\n\x10\x44\x65\x61\x64LetterPolicy\x12\x19\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\t\x12\x1d\n\x15max_delivery_attempts\x18\x02 \x01(\x05":\n\x10\x45xpirationPolicy\x12&\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration"\xad\x02\n\nPushConfig\x12\x15\n\rpush_endpoint\x18\x01 \x01(\t\x12@\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntry\x12<\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenH\x00\x1a<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_method"m\n\x0fReceivedMessage\x12\x0e\n\x06\x61\x63k_id\x18\x01 \x01(\t\x12\x30\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessage\x12\x18\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"\x87\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"k\n\x19ListSubscriptionsResponse\x12\x35\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02"\x86\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x1a\n\x12return_immediately\x18\x02 \x01(\x08\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02"L\n\x0cPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xe8\x01\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x0f\n\x07\x61\x63k_ids\x18\x02 \x03(\t\x12\x1f\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x12\x1f\n\x17modify_deadline_ack_ids\x18\x04 \x03(\t\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\tclient_id\x18\x06 \x01(\t"U\n\x15StreamingPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage"\x83\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x43\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"\xaf\x02\n\x08Snapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:L\xea\x41I\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot"\x83\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"_\n\x15ListSnapshotsResponse\x12-\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.Snapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot"\xbe\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12*\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x37\n\x08snapshot\x18\x03 \x01(\tB#\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target"\x0e\n\x0cSeekResponse2\xeb\t\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic"0\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\xda\x41\x04name\x12}\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic"/\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse"C\x82\xd3\xe4\x93\x02,"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\xda\x41\x0etopic,messages\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic"/\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\xda\x41\x05topic\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse"1\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\xda\x41\x07project\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse"=\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\xda\x41\x05topic\x12\xa2\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse"1\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty"/\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\xda\x41\x05topic\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\xf7\x14\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription"^\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\xda\x41+name,topic,push_config,ack_deadline_seconds\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription"D\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\xda\x41\x0csubscription\x12\xa0\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription"=\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse"8\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\xda\x41\x07project\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty"D\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\xda\x41\x0csubscription\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty"v\x82\xd3\xe4\x93\x02\x44"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\xda\x41)subscription,ack_ids,ack_deadline_seconds\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty"[\x82\xd3\xe4\x93\x02>"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\xda\x41\x14subscription,ack_ids\x12\xb3\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse"l\x82\xd3\xe4\x93\x02\x37"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\xda\x41,subscription,return_immediately,max_messages\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty"d\x82\xd3\xe4\x93\x02\x43">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\xda\x41\x18subscription,push_config\x12~\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"-\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse"4\x82\xd3\xe4\x93\x02$\x12"/v1/{project=projects/*}/snapshots\xda\x41\x07project\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"@\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\xda\x41\x11name,subscription\x12\x8c\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"5\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty"8\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\xda\x41\x08snapshot\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse"=\x82\xd3\xe4\x93\x02\x37"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xae\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z6google.golang.org/genproto/googleapis/pubsub/v1;pubsub\xf8\x01\x01\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3' + '\n)google/cloud/pubsub_v1/proto/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.proto\x1a\x17google/api/client.proto\x1a\x1fgoogle/api/field_behavior.proto\x1a\x19google/api/resource.proto\x1a\x1egoogle/protobuf/duration.proto\x1a\x1bgoogle/protobuf/empty.proto\x1a google/protobuf/field_mask.proto\x1a\x1fgoogle/protobuf/timestamp.proto";\n\x14MessageStoragePolicy\x12#\n\x1b\x61llowed_persistence_regions\x18\x01 \x03(\t"\xb2\x02\n\x05Topic\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x33\n\x06labels\x18\x02 \x03(\x0b\x32#.google.pubsub.v1.Topic.LabelsEntry\x12\x46\n\x16message_storage_policy\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.MessageStoragePolicy\x12\x14\n\x0ckms_key_name\x18\x05 \x01(\t\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:T\xea\x41Q\n\x1bpubsub.googleapis.com/Topic\x12!projects/{project}/topics/{topic}\x12\x0f_deleted-topic_"\xf1\x01\n\rPubsubMessage\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x43\n\nattributes\x18\x02 \x03(\x0b\x32/.google.pubsub.v1.PubsubMessage.AttributesEntry\x12\x12\n\nmessage_id\x18\x03 \x01(\t\x12\x30\n\x0cpublish_time\x18\x04 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x14\n\x0cordering_key\x18\x05 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"E\n\x0fGetTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic"w\n\x12UpdateTopicRequest\x12+\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.TopicB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"|\n\x0ePublishRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x36\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessageB\x03\xe0\x41\x02"&\n\x0fPublishResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t"\x80\x01\n\x11ListTopicsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"V\n\x12ListTopicsResponse\x12\'\n\x06topics\x18\x01 \x03(\x0b\x32\x17.google.pubsub.v1.Topic\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"z\n\x1dListTopicSubscriptionsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"y\n\x1eListTopicSubscriptionsResponse\x12>\n\rsubscriptions\x18\x01 \x03(\tB\'\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"v\n\x19ListTopicSnapshotsRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"H\n\x1aListTopicSnapshotsResponse\x12\x11\n\tsnapshots\x18\x01 \x03(\t\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"H\n\x12\x44\x65leteTopicRequest\x12\x32\n\x05topic\x18\x01 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic"\xae\x05\n\x0cSubscription\x12\x11\n\x04name\x18\x01 \x01(\tB\x03\xe0\x41\x02\x12\x32\n\x05topic\x18\x02 \x01(\tB#\xe0\x41\x02\xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12\x31\n\x0bpush_config\x18\x04 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfig\x12\x1c\n\x14\x61\x63k_deadline_seconds\x18\x05 \x01(\x05\x12\x1d\n\x15retain_acked_messages\x18\x07 \x01(\x08\x12=\n\x1amessage_retention_duration\x18\x08 \x01(\x0b\x32\x19.google.protobuf.Duration\x12:\n\x06labels\x18\t \x03(\x0b\x32*.google.pubsub.v1.Subscription.LabelsEntry\x12\x1f\n\x17\x65nable_message_ordering\x18\n \x01(\x08\x12=\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32".google.pubsub.v1.ExpirationPolicy\x12\x0e\n\x06\x66ilter\x18\x0c \x01(\t\x12>\n\x12\x64\x65\x61\x64_letter_policy\x18\r \x01(\x0b\x32".google.pubsub.v1.DeadLetterPolicy\x12\x33\n\x0cretry_policy\x18\x0e \x01(\x0b\x32\x1d.google.pubsub.v1.RetryPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:X\xea\x41U\n"pubsub.googleapis.com/Subscription\x12/projects/{project}/subscriptions/{subscription}"u\n\x0bRetryPolicy\x12\x32\n\x0fminimum_backoff\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\x12\x32\n\x0fmaximum_backoff\x18\x02 \x01(\x0b\x32\x19.google.protobuf.Duration"L\n\x10\x44\x65\x61\x64LetterPolicy\x12\x19\n\x11\x64\x65\x61\x64_letter_topic\x18\x01 \x01(\t\x12\x1d\n\x15max_delivery_attempts\x18\x02 \x01(\x05":\n\x10\x45xpirationPolicy\x12&\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration"\xad\x02\n\nPushConfig\x12\x15\n\rpush_endpoint\x18\x01 \x01(\t\x12@\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntry\x12<\n\noidc_token\x18\x03 \x01(\x0b\x32&.google.pubsub.v1.PushConfig.OidcTokenH\x00\x1a<\n\tOidcToken\x12\x1d\n\x15service_account_email\x18\x01 \x01(\t\x12\x10\n\x08\x61udience\x18\x02 \x01(\t\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x17\n\x15\x61uthentication_method"m\n\x0fReceivedMessage\x12\x0e\n\x06\x61\x63k_id\x18\x01 \x01(\t\x12\x30\n\x07message\x18\x02 \x01(\x0b\x32\x1f.google.pubsub.v1.PubsubMessage\x12\x18\n\x10\x64\x65livery_attempt\x18\x03 \x01(\x05"Z\n\x16GetSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription"\x8c\x01\n\x19UpdateSubscriptionRequest\x12\x39\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.SubscriptionB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"\x87\x01\n\x18ListSubscriptionsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"k\n\x19ListSubscriptionsResponse\x12\x35\n\rsubscriptions\x18\x01 \x03(\x0b\x32\x1e.google.pubsub.v1.Subscription\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"]\n\x19\x44\x65leteSubscriptionRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription"\x93\x01\n\x17ModifyPushConfigRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x36\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfigB\x03\xe0\x41\x02"\x8d\x01\n\x0bPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12!\n\x12return_immediately\x18\x02 \x01(\x08\x42\x05\x18\x01\xe0\x41\x01\x12\x19\n\x0cmax_messages\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02"L\n\x0cPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage"\x95\x01\n\x18ModifyAckDeadlineRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x04 \x03(\tB\x03\xe0\x41\x02\x12!\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\x42\x03\xe0\x41\x02"l\n\x12\x41\x63knowledgeRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x14\n\x07\x61\x63k_ids\x18\x02 \x03(\tB\x03\xe0\x41\x02"\xe8\x01\n\x14StreamingPullRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x0f\n\x07\x61\x63k_ids\x18\x02 \x03(\t\x12\x1f\n\x17modify_deadline_seconds\x18\x03 \x03(\x05\x12\x1f\n\x17modify_deadline_ack_ids\x18\x04 \x03(\t\x12(\n\x1bstream_ack_deadline_seconds\x18\x05 \x01(\x05\x42\x03\xe0\x41\x02\x12\x11\n\tclient_id\x18\x06 \x01(\t"U\n\x15StreamingPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage"\x83\x02\n\x15\x43reateSnapshotRequest\x12\x34\n\x04name\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot\x12@\n\x0csubscription\x18\x02 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12\x43\n\x06labels\x18\x03 \x03(\x0b\x32\x33.google.pubsub.v1.CreateSnapshotRequest.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01"\x80\x01\n\x15UpdateSnapshotRequest\x12\x31\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.SnapshotB\x03\xe0\x41\x02\x12\x34\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMaskB\x03\xe0\x41\x02"\xaf\x02\n\x08Snapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12/\n\x05topic\x18\x02 \x01(\tB \xfa\x41\x1d\n\x1bpubsub.googleapis.com/Topic\x12/\n\x0b\x65xpire_time\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x36\n\x06labels\x18\x04 \x03(\x0b\x32&.google.pubsub.v1.Snapshot.LabelsEntry\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01:L\xea\x41I\n\x1epubsub.googleapis.com/Snapshot\x12\'projects/{project}/snapshots/{snapshot}"N\n\x12GetSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot"\x83\x01\n\x14ListSnapshotsRequest\x12\x44\n\x07project\x18\x01 \x01(\tB3\xe0\x41\x02\xfa\x41-\n+cloudresourcemanager.googleapis.com/Project\x12\x11\n\tpage_size\x18\x02 \x01(\x05\x12\x12\n\npage_token\x18\x03 \x01(\t"_\n\x15ListSnapshotsResponse\x12-\n\tsnapshots\x18\x01 \x03(\x0b\x32\x1a.google.pubsub.v1.Snapshot\x12\x17\n\x0fnext_page_token\x18\x02 \x01(\t"Q\n\x15\x44\x65leteSnapshotRequest\x12\x38\n\x08snapshot\x18\x01 \x01(\tB&\xe0\x41\x02\xfa\x41 \n\x1epubsub.googleapis.com/Snapshot"\xbe\x01\n\x0bSeekRequest\x12@\n\x0csubscription\x18\x01 \x01(\tB*\xe0\x41\x02\xfa\x41$\n"pubsub.googleapis.com/Subscription\x12*\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x37\n\x08snapshot\x18\x03 \x01(\tB#\xfa\x41 \n\x1epubsub.googleapis.com/SnapshotH\x00\x42\x08\n\x06target"\x0e\n\x0cSeekResponse2\xf3\t\n\tPublisher\x12q\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic"0\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\xda\x41\x04name\x12}\n\x0bUpdateTopic\x12$.google.pubsub.v1.UpdateTopicRequest\x1a\x17.google.pubsub.v1.Topic"/\x82\xd3\xe4\x93\x02)2$/v1/{topic.name=projects/*/topics/*}:\x01*\x12\x93\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse"C\x82\xd3\xe4\x93\x02,"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\xda\x41\x0etopic,messages\x12w\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic"/\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\xda\x41\x05topic\x12\x8a\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse"1\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\xda\x41\x07project\x12\xba\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse"=\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\xda\x41\x05topic\x12\xaa\x01\n\x12ListTopicSnapshots\x12+.google.pubsub.v1.ListTopicSnapshotsRequest\x1a,.google.pubsub.v1.ListTopicSnapshotsResponse"9\x82\xd3\xe4\x93\x02+\x12)/v1/{topic=projects/*/topics/*}/snapshots\xda\x41\x05topic\x12|\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty"/\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}\xda\x41\x05topic\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub2\x83\x15\n\nSubscriber\x12\xb4\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription"^\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\xda\x41+name,topic,push_config,ack_deadline_seconds\x12\xa1\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription"D\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\xda\x41\x0csubscription\x12\xa0\x01\n\x12UpdateSubscription\x12+.google.pubsub.v1.UpdateSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription"=\x82\xd3\xe4\x93\x02\x37\x32\x32/v1/{subscription.name=projects/*/subscriptions/*}:\x01*\x12\xa6\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse"8\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\xda\x41\x07project\x12\x9f\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty"D\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\xda\x41\x0csubscription\x12\xcf\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty"v\x82\xd3\xe4\x93\x02\x44"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\xda\x41)subscription,ack_ids,ack_deadline_seconds\x12\xa8\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty"[\x82\xd3\xe4\x93\x02>"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\xda\x41\x14subscription,ack_ids\x12\xb3\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse"l\x82\xd3\xe4\x93\x02\x37"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\xda\x41,subscription,return_immediately,max_messages\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse"\x00(\x01\x30\x01\x12\xbb\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty"d\x82\xd3\xe4\x93\x02\x43">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\xda\x41\x18subscription,push_config\x12\x89\x01\n\x0bGetSnapshot\x12$.google.pubsub.v1.GetSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"8\x82\xd3\xe4\x93\x02\'\x12%/v1/{snapshot=projects/*/snapshots/*}\xda\x41\x08snapshot\x12\x96\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse"4\x82\xd3\xe4\x93\x02$\x12"/v1/{project=projects/*}/snapshots\xda\x41\x07project\x12\x97\x01\n\x0e\x43reateSnapshot\x12\'.google.pubsub.v1.CreateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"@\x82\xd3\xe4\x93\x02&\x1a!/v1/{name=projects/*/snapshots/*}:\x01*\xda\x41\x11name,subscription\x12\x8c\x01\n\x0eUpdateSnapshot\x12\'.google.pubsub.v1.UpdateSnapshotRequest\x1a\x1a.google.pubsub.v1.Snapshot"5\x82\xd3\xe4\x93\x02/2*/v1/{snapshot.name=projects/*/snapshots/*}:\x01*\x12\x8b\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty"8\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\xda\x41\x08snapshot\x12\x84\x01\n\x04Seek\x12\x1d.google.pubsub.v1.SeekRequest\x1a\x1e.google.pubsub.v1.SeekResponse"=\x82\xd3\xe4\x93\x02\x37"2/v1/{subscription=projects/*/subscriptions/*}:seek:\x01*\x1ap\xca\x41\x15pubsub.googleapis.com\xd2\x41Uhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsubB\xae\x01\n\x14\x63om.google.pubsub.v1B\x0bPubsubProtoP\x01Z6google.golang.org/genproto/googleapis/pubsub/v1;pubsub\xf8\x01\x01\xaa\x02\x16Google.Cloud.PubSub.V1\xca\x02\x16Google\\Cloud\\PubSub\\V1\xea\x02\x19Google::Cloud::PubSub::V1b\x06proto3' ), dependencies=[ + google_dot_api_dot_annotations__pb2.DESCRIPTOR, google_dot_api_dot_client__pb2.DESCRIPTOR, google_dot_api_dot_field__behavior__pb2.DESCRIPTOR, google_dot_api_dot_resource__pb2.DESCRIPTOR, @@ -43,7 +44,6 @@ google_dot_protobuf_dot_empty__pb2.DESCRIPTOR, google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR, google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR, - google_dot_api_dot_annotations__pb2.DESCRIPTOR, ], ) @@ -891,7 +891,9 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b( + "\340A\002\372A\035\n\033pubsub.googleapis.com/Topic" + ), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -940,7 +942,7 @@ extension_ranges=[], oneofs=[], serialized_start=1744, - serialized_end=1825, + serialized_end=1862, ) @@ -996,8 +998,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1827, - serialized_end=1899, + serialized_start=1864, + serialized_end=1936, ) @@ -1037,8 +1039,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1901, - serialized_end=1973, + serialized_start=1938, + serialized_end=2010, ) @@ -1269,10 +1271,28 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="filter", + full_name="google.pubsub.v1.Subscription.filter", + index=9, + number=12, + type=9, + cpp_type=9, + label=1, + has_default_value=False, + default_value=_b("").decode("utf-8"), + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), _descriptor.FieldDescriptor( name="dead_letter_policy", full_name="google.pubsub.v1.Subscription.dead_letter_policy", - index=9, + index=10, number=13, type=11, cpp_type=10, @@ -1287,6 +1307,24 @@ serialized_options=None, file=DESCRIPTOR, ), + _descriptor.FieldDescriptor( + name="retry_policy", + full_name="google.pubsub.v1.Subscription.retry_policy", + index=11, + number=14, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), ], extensions=[], nested_types=[_SUBSCRIPTION_LABELSENTRY], @@ -1298,8 +1336,65 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=1976, - serialized_end=2593, + serialized_start=2013, + serialized_end=2699, +) + + +_RETRYPOLICY = _descriptor.Descriptor( + name="RetryPolicy", + full_name="google.pubsub.v1.RetryPolicy", + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name="minimum_backoff", + full_name="google.pubsub.v1.RetryPolicy.minimum_backoff", + index=0, + number=1, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + _descriptor.FieldDescriptor( + name="maximum_backoff", + full_name="google.pubsub.v1.RetryPolicy.maximum_backoff", + index=1, + number=2, + type=11, + cpp_type=10, + label=1, + has_default_value=False, + default_value=None, + message_type=None, + enum_type=None, + containing_type=None, + is_extension=False, + extension_scope=None, + serialized_options=None, + file=DESCRIPTOR, + ), + ], + extensions=[], + nested_types=[], + enum_types=[], + serialized_options=None, + is_extendable=False, + syntax="proto3", + extension_ranges=[], + oneofs=[], + serialized_start=2701, + serialized_end=2818, ) @@ -1355,8 +1450,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2595, - serialized_end=2671, + serialized_start=2820, + serialized_end=2896, ) @@ -1394,8 +1489,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2673, - serialized_end=2731, + serialized_start=2898, + serialized_end=2956, ) @@ -1451,8 +1546,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=2899, - serialized_end=2959, + serialized_start=3124, + serialized_end=3184, ) _PUSHCONFIG_ATTRIBUTESENTRY = _descriptor.Descriptor( @@ -1589,8 +1684,8 @@ fields=[], ) ], - serialized_start=2734, - serialized_end=3035, + serialized_start=2959, + serialized_end=3260, ) @@ -1664,8 +1759,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3037, - serialized_end=3146, + serialized_start=3262, + serialized_end=3371, ) @@ -1705,8 +1800,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3148, - serialized_end=3238, + serialized_start=3373, + serialized_end=3463, ) @@ -1762,8 +1857,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3241, - serialized_end=3381, + serialized_start=3466, + serialized_end=3606, ) @@ -1839,8 +1934,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3384, - serialized_end=3519, + serialized_start=3609, + serialized_end=3744, ) @@ -1896,8 +1991,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3521, - serialized_end=3628, + serialized_start=3746, + serialized_end=3853, ) @@ -1937,8 +2032,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3630, - serialized_end=3723, + serialized_start=3855, + serialized_end=3948, ) @@ -1996,8 +2091,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3726, - serialized_end=3873, + serialized_start=3951, + serialized_end=4098, ) @@ -2043,7 +2138,7 @@ containing_type=None, is_extension=False, extension_scope=None, - serialized_options=None, + serialized_options=_b("\030\001\340A\001"), file=DESCRIPTOR, ), _descriptor.FieldDescriptor( @@ -2073,8 +2168,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=3876, - serialized_end=4010, + serialized_start=4101, + serialized_end=4242, ) @@ -2112,8 +2207,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4012, - serialized_end=4088, + serialized_start=4244, + serialized_end=4320, ) @@ -2189,8 +2284,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4091, - serialized_end=4240, + serialized_start=4323, + serialized_end=4472, ) @@ -2248,8 +2343,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4242, - serialized_end=4350, + serialized_start=4474, + serialized_end=4582, ) @@ -2379,8 +2474,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4353, - serialized_end=4585, + serialized_start=4585, + serialized_end=4817, ) @@ -2418,8 +2513,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4587, - serialized_end=4672, + serialized_start=4819, + serialized_end=4904, ) @@ -2553,8 +2648,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4675, - serialized_end=4934, + serialized_start=4907, + serialized_end=5166, ) @@ -2610,8 +2705,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=4937, - serialized_end=5065, + serialized_start=5169, + serialized_end=5297, ) @@ -2761,8 +2856,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5068, - serialized_end=5371, + serialized_start=5300, + serialized_end=5603, ) @@ -2802,8 +2897,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5373, - serialized_end=5451, + serialized_start=5605, + serialized_end=5683, ) @@ -2879,8 +2974,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5454, - serialized_end=5585, + serialized_start=5686, + serialized_end=5817, ) @@ -2936,8 +3031,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5587, - serialized_end=5682, + serialized_start=5819, + serialized_end=5914, ) @@ -2977,8 +3072,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5684, - serialized_end=5765, + serialized_start=5916, + serialized_end=5997, ) @@ -3062,8 +3157,8 @@ fields=[], ) ], - serialized_start=5768, - serialized_end=5958, + serialized_start=6000, + serialized_end=6190, ) @@ -3082,8 +3177,8 @@ syntax="proto3", extension_ranges=[], oneofs=[], - serialized_start=5960, - serialized_end=5974, + serialized_start=6192, + serialized_end=6206, ) _TOPIC_LABELSENTRY.containing_type = _TOPIC @@ -3110,6 +3205,13 @@ _SUBSCRIPTION.fields_by_name["labels"].message_type = _SUBSCRIPTION_LABELSENTRY _SUBSCRIPTION.fields_by_name["expiration_policy"].message_type = _EXPIRATIONPOLICY _SUBSCRIPTION.fields_by_name["dead_letter_policy"].message_type = _DEADLETTERPOLICY +_SUBSCRIPTION.fields_by_name["retry_policy"].message_type = _RETRYPOLICY +_RETRYPOLICY.fields_by_name[ + "minimum_backoff" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION +_RETRYPOLICY.fields_by_name[ + "maximum_backoff" +].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _EXPIRATIONPOLICY.fields_by_name[ "ttl" ].message_type = google_dot_protobuf_dot_duration__pb2._DURATION @@ -3184,6 +3286,7 @@ ] = _LISTTOPICSNAPSHOTSRESPONSE DESCRIPTOR.message_types_by_name["DeleteTopicRequest"] = _DELETETOPICREQUEST DESCRIPTOR.message_types_by_name["Subscription"] = _SUBSCRIPTION +DESCRIPTOR.message_types_by_name["RetryPolicy"] = _RETRYPOLICY DESCRIPTOR.message_types_by_name["DeadLetterPolicy"] = _DEADLETTERPOLICY DESCRIPTOR.message_types_by_name["ExpirationPolicy"] = _EXPIRATIONPOLICY DESCRIPTOR.message_types_by_name["PushConfig"] = _PUSHCONFIG @@ -3256,8 +3359,6 @@ DESCRIPTOR=_TOPIC, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""A topic resource. - - Attributes: name: Required. The name of the topic. It must have the format @@ -3300,14 +3401,12 @@ ), DESCRIPTOR=_PUBSUBMESSAGE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""A message that is published by publishers and consumed by - subscribers. The message must contain either a non-empty data field or - at least one attribute. Note that client libraries represent this object + __doc__="""A message that is published by publishers and consumed by subscribers. + The message must contain either a non-empty data field or at least one + attribute. Note that client libraries represent this object differently depending on the language. See the corresponding client library documentation for more information. See Quotas and limits for more information about message limits. - - Attributes: data: The message data field. If this field is empty, the message @@ -3351,8 +3450,6 @@ DESCRIPTOR=_GETTOPICREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the GetTopic method. - - Attributes: topic: Required. The name of the topic to get. Format is @@ -3370,19 +3467,16 @@ DESCRIPTOR=_UPDATETOPICREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the UpdateTopic method. - - Attributes: topic: Required. The updated topic object. update_mask: Required. Indicates which fields in the provided topic to update. Must be specified and non-empty. Note that if - ``update_mask`` contains "message\_storage\_policy" then the - new value will be determined based on the policy configured at - the project or organization level. The - ``message_storage_policy`` must not be set in the ``topic`` - provided above. + ``update_mask`` contains "message\_storage\_policy" but the + ``message_storage_policy`` is not set in the ``topic`` + provided above, then the updated value is determined by the + policy configured at the project or organization level. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.UpdateTopicRequest) ), @@ -3396,8 +3490,6 @@ DESCRIPTOR=_PUBLISHREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the Publish method. - - Attributes: topic: Required. The messages in the request will be published on @@ -3417,8 +3509,6 @@ DESCRIPTOR=_PUBLISHRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``Publish`` method. - - Attributes: message_ids: The server-assigned ID of each published message, in the same @@ -3437,8 +3527,6 @@ DESCRIPTOR=_LISTTOPICSREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``ListTopics`` method. - - Attributes: project: Required. The name of the project in which to list topics. @@ -3463,8 +3551,6 @@ DESCRIPTOR=_LISTTOPICSRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``ListTopics`` method. - - Attributes: topics: The resulting topics. @@ -3485,8 +3571,6 @@ DESCRIPTOR=_LISTTOPICSUBSCRIPTIONSREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``ListTopicSubscriptions`` method. - - Attributes: topic: Required. The name of the topic that subscriptions are @@ -3511,8 +3595,6 @@ DESCRIPTOR=_LISTTOPICSUBSCRIPTIONSRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``ListTopicSubscriptions`` method. - - Attributes: subscriptions: The names of the subscriptions that match the request. @@ -3533,12 +3615,10 @@ DESCRIPTOR=_LISTTOPICSNAPSHOTSREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``ListTopicSnapshots`` method. - - Attributes: topic: - The name of the topic that snapshots are attached to. Format - is ``projects/{project}/topics/{topic}``. + Required. The name of the topic that snapshots are attached + to. Format is ``projects/{project}/topics/{topic}``. page_size: Maximum number of snapshot names to return. page_token: @@ -3559,8 +3639,6 @@ DESCRIPTOR=_LISTTOPICSNAPSHOTSRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``ListTopicSnapshots`` method. - - Attributes: snapshots: The names of the snapshots that match the request. @@ -3581,8 +3659,6 @@ DESCRIPTOR=_DELETETOPICREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``DeleteTopic`` method. - - Attributes: topic: Required. Name of the topic to delete. Format is @@ -3609,8 +3685,6 @@ DESCRIPTOR=_SUBSCRIPTION, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""A subscription resource. - - Attributes: name: Required. The name of the subscription. It must have the @@ -3681,6 +3755,15 @@ If ``expiration_policy`` is not set, a *default policy* with ``ttl`` of 31 days will be used. The minimum allowed value for ``expiration_policy.ttl`` is 1 day. + filter: + An expression written in the Cloud Pub/Sub filter language. If + non-empty, then only ``PubsubMessage``\ s whose ``attributes`` + field matches the filter are delivered on this subscription. + If empty, then no messages are filtered out. EXPERIMENTAL: + This feature is part of a closed alpha release. This API might + be changed in backward-incompatible ways and is not + recommended for production use. It is not subject to any SLA + or deprecation policy. dead_letter_policy: A policy that specifies the conditions for dead lettering messages in this subscription. If dead\_letter\_policy is not @@ -3688,11 +3771,17 @@ account associated with this subscriptions's parent project (i.e., service-{project\_number}@gcp-sa- pubsub.iam.gserviceaccount.com) must have permission to - Acknowledge() messages on this subscription. EXPERIMENTAL: - This feature is part of a closed alpha release. This API might - be changed in backward-incompatible ways and is not - recommended for production use. It is not subject to any SLA - or deprecation policy. + Acknowledge() messages on this subscription. + retry_policy: + A policy that specifies how Cloud Pub/Sub retries message + delivery for this subscription. If not set, the default retry + policy is applied. This generally implies that messages will + be retried as soon as possible for healthy subscribers. + RetryPolicy will be triggered on NACKs or acknowledgement + deadline exceeded events for a given message. EXPERIMENTAL: + This API might be changed in backward-incompatible ways and is + not recommended for production use. It is not subject to any + SLA or deprecation policy. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.Subscription) ), @@ -3700,19 +3789,45 @@ _sym_db.RegisterMessage(Subscription) _sym_db.RegisterMessage(Subscription.LabelsEntry) +RetryPolicy = _reflection.GeneratedProtocolMessageType( + "RetryPolicy", + (_message.Message,), + dict( + DESCRIPTOR=_RETRYPOLICY, + __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", + __doc__="""A policy that specifies how Cloud Pub/Sub retries message delivery. + Retry delay will be exponential based on provided minimum and maximum + backoffs. https://en.wikipedia.org/wiki/Exponential\_backoff. + RetryPolicy will be triggered on NACKs or acknowledgement deadline + exceeded events for a given message. Retry Policy is implemented on a + best effort basis. At times, the delay between consecutive deliveries + may not match the configuration. That is, delay can be more or less + than configured backoff. + Attributes: + minimum_backoff: + The minimum delay between consecutive deliveries of a given + message. Value should be between 0 and 600 seconds. Defaults + to 10 seconds. + maximum_backoff: + The maximum delay between consecutive deliveries of a given + message. Value should be between 0 and 600 seconds. Defaults + to 600 seconds. + """, + # @@protoc_insertion_point(class_scope:google.pubsub.v1.RetryPolicy) + ), +) +_sym_db.RegisterMessage(RetryPolicy) + DeadLetterPolicy = _reflection.GeneratedProtocolMessageType( "DeadLetterPolicy", (_message.Message,), dict( DESCRIPTOR=_DEADLETTERPOLICY, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""Dead lettering is done on a best effort basis. The same - message might be dead lettered multiple times. - - If validation on any of the fields fails at subscription - creation/updation, the create/update subscription request will fail. - - + __doc__="""Dead lettering is done on a best effort basis. The same message might + be dead lettered multiple times. If validation on any of the fields + fails at subscription creation/updation, the create/update + subscription request will fail. Attributes: dead_letter_topic: The name of the topic to which dead letter messages should be @@ -3747,10 +3862,8 @@ dict( DESCRIPTOR=_EXPIRATIONPOLICY, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""A policy that specifies the conditions for resource - expiration (i.e., automatic resource deletion). - - + __doc__="""A policy that specifies the conditions for resource expiration (i.e., + automatic resource deletion). Attributes: ttl: Specifies the "time-to-live" duration for an associated @@ -3776,11 +3889,8 @@ dict( DESCRIPTOR=_PUSHCONFIG_OIDCTOKEN, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""Contains information needed for generating an `OpenID - Connect - token `__. - - + __doc__="""Contains information needed for generating an `OpenID Connect token + `__. Attributes: service_account_email: \ `Service account email @@ -3813,13 +3923,11 @@ DESCRIPTOR=_PUSHCONFIG, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Configuration for a push delivery endpoint. - - Attributes: push_endpoint: A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use - "https://example.com/push". + ``https://example.com/push``. attributes: Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently @@ -3864,8 +3972,6 @@ DESCRIPTOR=_RECEIVEDMESSAGE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""A message and its corresponding acknowledgment ID. - - Attributes: ack_id: This ID can be used to acknowledge the received message. @@ -3899,8 +4005,6 @@ DESCRIPTOR=_GETSUBSCRIPTIONREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the GetSubscription method. - - Attributes: subscription: Required. The name of the subscription to get. Format is @@ -3918,8 +4022,6 @@ DESCRIPTOR=_UPDATESUBSCRIPTIONREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the UpdateSubscription method. - - Attributes: subscription: Required. The updated subscription object. @@ -3939,8 +4041,6 @@ DESCRIPTOR=_LISTSUBSCRIPTIONSREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``ListSubscriptions`` method. - - Attributes: project: Required. The name of the project in which to list @@ -3965,8 +4065,6 @@ DESCRIPTOR=_LISTSUBSCRIPTIONSRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``ListSubscriptions`` method. - - Attributes: subscriptions: The subscriptions that match the request. @@ -3987,8 +4085,6 @@ DESCRIPTOR=_DELETESUBSCRIPTIONREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the DeleteSubscription method. - - Attributes: subscription: Required. The subscription to delete. Format is @@ -4006,8 +4102,6 @@ DESCRIPTOR=_MODIFYPUSHCONFIGREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ModifyPushConfig method. - - Attributes: subscription: Required. The name of the subscription. Format is @@ -4032,18 +4126,19 @@ DESCRIPTOR=_PULLREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``Pull`` method. - - Attributes: subscription: Required. The subscription from which messages should be pulled. Format is ``projects/{project}/subscriptions/{sub}``. return_immediately: - If this field set to true, the system will respond immediately - even if it there are no messages available to return in the - ``Pull`` response. Otherwise, the system may wait (for a - bounded amount of time) until at least one message is - available, rather than returning no messages. + Optional. If this field set to true, the system will respond + immediately even if it there are no messages available to + return in the ``Pull`` response. Otherwise, the system may + wait (for a bounded amount of time) until at least one message + is available, rather than returning no messages. Warning: + setting this field to ``true`` is discouraged because it + adversely impacts the performance of ``Pull`` operations. We + recommend that users do not set this field. max_messages: Required. The maximum number of messages to return for this request. Must be a positive integer. The Pub/Sub system may @@ -4061,8 +4156,6 @@ DESCRIPTOR=_PULLRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``Pull`` method. - - Attributes: received_messages: Received Pub/Sub messages. The list will be empty if there are @@ -4083,8 +4176,6 @@ DESCRIPTOR=_MODIFYACKDEADLINEREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ModifyAckDeadline method. - - Attributes: subscription: Required. The name of the subscription. Format is @@ -4114,8 +4205,6 @@ DESCRIPTOR=_ACKNOWLEDGEREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the Acknowledge method. - - Attributes: subscription: Required. The subscription whose message is being @@ -4137,12 +4226,10 @@ dict( DESCRIPTOR=_STREAMINGPULLREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""Request for the ``StreamingPull`` streaming RPC method. - This request is used to establish the initial stream as well as to - stream acknowledgements and ack deadline modifications from the client - to the server. - - + __doc__="""Request for the ``StreamingPull`` streaming RPC method. This request + is used to establish the initial stream as well as to stream + acknowledgements and ack deadline modifications from the client to the + server. Attributes: subscription: Required. The subscription for which to initialize the new @@ -4205,10 +4292,8 @@ dict( DESCRIPTOR=_STREAMINGPULLRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""Response for the ``StreamingPull`` method. This response - is used to stream messages from the server to the client. - - + __doc__="""Response for the ``StreamingPull`` method. This response is used to + stream messages from the server to the client. Attributes: received_messages: Received Pub/Sub messages. This will not be empty. @@ -4234,8 +4319,6 @@ DESCRIPTOR=_CREATESNAPSHOTREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``CreateSnapshot`` method. - - Attributes: name: Required. User-provided name for this snapshot. If the name is @@ -4270,8 +4353,6 @@ DESCRIPTOR=_UPDATESNAPSHOTREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the UpdateSnapshot method. - - Attributes: snapshot: Required. The updated snapshot object. @@ -4299,12 +4380,10 @@ ), DESCRIPTOR=_SNAPSHOT, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""A snapshot resource. Snapshots are used in Seek - operations, which allow you to manage message acknowledgments in bulk. - That is, you can set the acknowledgment state of messages in an existing - subscription to the state captured by a snapshot. - - + __doc__="""A snapshot resource. Snapshots are used in Seek operations, which + allow you to manage message acknowledgments in bulk. That is, you can + set the acknowledgment state of messages in an existing subscription + to the state captured by a snapshot. Attributes: name: The name of the snapshot. @@ -4340,8 +4419,6 @@ DESCRIPTOR=_GETSNAPSHOTREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the GetSnapshot method. - - Attributes: snapshot: Required. The name of the snapshot to get. Format is @@ -4359,8 +4436,6 @@ DESCRIPTOR=_LISTSNAPSHOTSREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``ListSnapshots`` method. - - Attributes: project: Required. The name of the project in which to list snapshots. @@ -4385,8 +4460,6 @@ DESCRIPTOR=_LISTSNAPSHOTSRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Response for the ``ListSnapshots`` method. - - Attributes: snapshots: The resulting snapshots. @@ -4407,8 +4480,6 @@ DESCRIPTOR=_DELETESNAPSHOTREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``DeleteSnapshot`` method. - - Attributes: snapshot: Required. The name of the snapshot to delete. Format is @@ -4426,8 +4497,6 @@ DESCRIPTOR=_SEEKREQUEST, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", __doc__="""Request for the ``Seek`` method. - - Attributes: subscription: Required. The subscription to affect. @@ -4460,9 +4529,7 @@ dict( DESCRIPTOR=_SEEKRESPONSE, __module__="google.cloud.pubsub_v1.proto.pubsub_pb2", - __doc__="""Response for the ``Seek`` method (this response is empty). - - """, + __doc__="""Response for the ``Seek`` method (this response is empty).""", # @@protoc_insertion_point(class_scope:google.pubsub.v1.SeekResponse) ), ) @@ -4482,6 +4549,7 @@ _LISTTOPICSREQUEST.fields_by_name["project"]._options = None _LISTTOPICSUBSCRIPTIONSREQUEST.fields_by_name["topic"]._options = None _LISTTOPICSUBSCRIPTIONSRESPONSE.fields_by_name["subscriptions"]._options = None +_LISTTOPICSNAPSHOTSREQUEST.fields_by_name["topic"]._options = None _DELETETOPICREQUEST.fields_by_name["topic"]._options = None _SUBSCRIPTION_LABELSENTRY._options = None _SUBSCRIPTION.fields_by_name["name"]._options = None @@ -4496,6 +4564,7 @@ _MODIFYPUSHCONFIGREQUEST.fields_by_name["subscription"]._options = None _MODIFYPUSHCONFIGREQUEST.fields_by_name["push_config"]._options = None _PULLREQUEST.fields_by_name["subscription"]._options = None +_PULLREQUEST.fields_by_name["return_immediately"]._options = None _PULLREQUEST.fields_by_name["max_messages"]._options = None _MODIFYACKDEADLINEREQUEST.fields_by_name["subscription"]._options = None _MODIFYACKDEADLINEREQUEST.fields_by_name["ack_ids"]._options = None @@ -4526,8 +4595,8 @@ serialized_options=_b( "\312A\025pubsub.googleapis.com\322AUhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub" ), - serialized_start=5977, - serialized_end=7236, + serialized_start=6209, + serialized_end=7476, methods=[ _descriptor.MethodDescriptor( name="CreateTopic", @@ -4603,7 +4672,7 @@ input_type=_LISTTOPICSNAPSHOTSREQUEST, output_type=_LISTTOPICSNAPSHOTSRESPONSE, serialized_options=_b( - "\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/snapshots" + "\202\323\344\223\002+\022)/v1/{topic=projects/*/topics/*}/snapshots\332A\005topic" ), ), _descriptor.MethodDescriptor( @@ -4632,8 +4701,8 @@ serialized_options=_b( "\312A\025pubsub.googleapis.com\322AUhttps://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/pubsub" ), - serialized_start=7239, - serialized_end=9918, + serialized_start=7479, + serialized_end=10170, methods=[ _descriptor.MethodDescriptor( name="CreateSubscription", @@ -4751,7 +4820,7 @@ input_type=_GETSNAPSHOTREQUEST, output_type=_SNAPSHOT, serialized_options=_b( - "\202\323\344\223\002'\022%/v1/{snapshot=projects/*/snapshots/*}" + "\202\323\344\223\002'\022%/v1/{snapshot=projects/*/snapshots/*}\332A\010snapshot" ), ), _descriptor.MethodDescriptor( diff --git a/noxfile.py b/noxfile.py index 03c570f57..e48f0680a 100644 --- a/noxfile.py +++ b/noxfile.py @@ -111,8 +111,7 @@ def system(session): # Install all test dependencies, then install this package into the # virtualenv's dist-packages. session.install("mock", "pytest", "psutil") - - session.install("-e", "test_utils") + session.install("git+https://github.com/googleapis/python-test-utils") session.install("-e", ".") # Run py.test against the system tests. @@ -140,7 +139,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/setup.cfg b/setup.cfg index 3bd555500..c3a2b39f6 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,3 +1,19 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + # Generated by synthtool. DO NOT EDIT! [bdist_wheel] universal = 1 diff --git a/synth.metadata b/synth.metadata index 05b0eeac2..c38b8778d 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,27 +1,39 @@ { - "updateTime": "2020-03-04T13:26:32.035995Z", "sources": [ { "generator": { "name": "artman", - "version": "1.0.0", - "dockerImage": "googleapis/artman@sha256:f37f2464788cb551299209b4fcab4eb323533154488c2ef9ec0c75d7c2b4b482" + "version": "2.0.0", + "dockerImage": "googleapis/artman@sha256:b3b47805231a305d0f40c4bf069df20f6a2635574e6d4259fac651d3f9f6e098" + } + }, + { + "git": { + "name": ".", + "remote": "git@github.com:googleapis/python-pubsub", + "sha": "96f4f820801dc83a04aed992af14e52f8e5bb710" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "541b1ded4abadcc38e8178680b0677f65594ea6f", - "internalRef": "298686266", - "log": "541b1ded4abadcc38e8178680b0677f65594ea6f\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 298686266\n\nc0d171acecb4f5b0bfd2c4ca34fc54716574e300\n Updated to include the Notification v1 API.\n\nPiperOrigin-RevId: 298652775\n\n2346a9186c0bff2c9cc439f2459d558068637e05\nAdd Service Directory v1beta1 protos and configs\n\nPiperOrigin-RevId: 298625638\n\na78ed801b82a5c6d9c5368e24b1412212e541bb7\nPublishing v3 protos and configs.\n\nPiperOrigin-RevId: 298607357\n\n4a180bfff8a21645b3a935c2756e8d6ab18a74e0\nautoml/v1beta1 publish proto updates\n\nPiperOrigin-RevId: 298484782\n\n6de6e938b7df1cd62396563a067334abeedb9676\nchore: use the latest gapic-generator and protoc-java-resource-name-plugin in Bazel workspace.\n\nPiperOrigin-RevId: 298474513\n\n244ab2b83a82076a1fa7be63b7e0671af73f5c02\nAdds service config definition for bigqueryreservation v1\n\nPiperOrigin-RevId: 298455048\n\n83c6f84035ee0f80eaa44d8b688a010461cc4080\nUpdate google/api/auth.proto to make AuthProvider to have JwtLocation\n\nPiperOrigin-RevId: 297918498\n\ne9e90a787703ec5d388902e2cb796aaed3a385b4\nDialogflow weekly v2/v2beta1 library update:\n - adding get validation result\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297671458\n\n1a2b05cc3541a5f7714529c665aecc3ea042c646\nAdding .yaml and .json config files.\n\nPiperOrigin-RevId: 297570622\n\ndfe1cf7be44dee31d78f78e485d8c95430981d6e\nPublish `QueryOptions` proto.\n\nIntroduced a `query_options` input in `ExecuteSqlRequest`.\n\nPiperOrigin-RevId: 297497710\n\ndafc905f71e5d46f500b41ed715aad585be062c3\npubsub: revert pull init_rpc_timeout & max_rpc_timeout back to 25 seconds and reset multiplier to 1.0\n\nPiperOrigin-RevId: 297486523\n\nf077632ba7fee588922d9e8717ee272039be126d\nfirestore: add update_transform\n\nPiperOrigin-RevId: 297405063\n\n0aba1900ffef672ec5f0da677cf590ee5686e13b\ncluster: use square brace for cross-reference\n\nPiperOrigin-RevId: 297204568\n\n5dac2da18f6325cbaed54603c43f0667ecd50247\nRestore retry params in gapic config because securitycenter has non-standard default retry params.\nRestore a few retry codes for some idempotent methods.\n\nPiperOrigin-RevId: 297196720\n\n1eb61455530252bba8b2c8d4bc9832960e5a56f6\npubsub: v1 replace IAM HTTP rules\n\nPiperOrigin-RevId: 297188590\n\n80b2d25f8d43d9d47024ff06ead7f7166548a7ba\nDialogflow weekly v2/v2beta1 library update:\n - updates to mega agent api\n - adding field mask override control for output audio config\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 297187629\n\n0b1876b35e98f560f9c9ca9797955f020238a092\nUse an older version of protoc-docs-plugin that is compatible with the specified gapic-generator and protobuf versions.\n\nprotoc-docs-plugin >=0.4.0 (see commit https://github.com/googleapis/protoc-docs-plugin/commit/979f03ede6678c487337f3d7e88bae58df5207af) is incompatible with protobuf 3.9.1.\n\nPiperOrigin-RevId: 296986742\n\n1e47e676cddbbd8d93f19ba0665af15b5532417e\nFix: Restore a method signature for UpdateCluster\n\nPiperOrigin-RevId: 296901854\n\n7f910bcc4fc4704947ccfd3ceed015d16b9e00c2\nUpdate Dataproc v1beta2 client.\n\nPiperOrigin-RevId: 296451205\n\nde287524405a3dce124d301634731584fc0432d7\nFix: Reinstate method signatures that had been missed off some RPCs\nFix: Correct resource types for two fields\n\nPiperOrigin-RevId: 296435091\n\ne5bc9566ae057fb4c92f8b7e047f1c8958235b53\nDeprecate the endpoint_uris field, as it is unused.\n\nPiperOrigin-RevId: 296357191\n\n8c12e2b4dca94e12bff9f538bdac29524ff7ef7a\nUpdate Dataproc v1 client.\n\nPiperOrigin-RevId: 296336662\n\n17567c4a1ef0a9b50faa87024d66f8acbb561089\nRemoving erroneous comment, a la https://github.com/googleapis/java-speech/pull/103\n\nPiperOrigin-RevId: 296332968\n\n3eaaaf8626ce5b0c0bc7eee05e143beffa373b01\nAdd BUILD.bazel for v1 secretmanager.googleapis.com\n\nPiperOrigin-RevId: 296274723\n\ne76149c3d992337f85eeb45643106aacae7ede82\nMove securitycenter v1 to use generate from annotations.\n\nPiperOrigin-RevId: 296266862\n\n203740c78ac69ee07c3bf6be7408048751f618f8\nAdd StackdriverLoggingConfig field to Cloud Tasks v2 API.\n\nPiperOrigin-RevId: 296256388\n\ne4117d5e9ed8bbca28da4a60a94947ca51cb2083\nCreate a Bazel BUILD file for the google.actions.type export.\n\nPiperOrigin-RevId: 296212567\n\na9639a0a9854fd6e1be08bba1ac3897f4f16cb2f\nAdd secretmanager.googleapis.com v1 protos\n\nPiperOrigin-RevId: 295983266\n\nce4f4c21d9dd2bfab18873a80449b9d9851efde8\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295861722\n\ncb61d6c2d070b589980c779b68ffca617f789116\nasset: v1p1beta1 remove SearchResources and SearchIamPolicies\n\nPiperOrigin-RevId: 295855449\n\nab2685d8d3a0e191dc8aef83df36773c07cb3d06\nfix: Dataproc v1 - AutoscalingPolicy annotation\n\nThis adds the second resource name pattern to the\nAutoscalingPolicy resource.\n\nCommitter: @lukesneeringer\nPiperOrigin-RevId: 295738415\n\n8a1020bf6828f6e3c84c3014f2c51cb62b739140\nUpdate cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295286165\n\n5cfa105206e77670369e4b2225597386aba32985\nAdd service control related proto build rule.\n\nPiperOrigin-RevId: 295262088\n\nee4dddf805072004ab19ac94df2ce669046eec26\nmonitoring v3: Add prefix \"https://cloud.google.com/\" into the link for global access\ncl 295167522, get ride of synth.py hacks\n\nPiperOrigin-RevId: 295238095\n\nd9835e922ea79eed8497db270d2f9f85099a519c\nUpdate some minor docs changes about user event proto\n\nPiperOrigin-RevId: 295185610\n\n5f311e416e69c170243de722023b22f3df89ec1c\nfix: use correct PHP package name in gapic configuration\n\nPiperOrigin-RevId: 295161330\n\n6cdd74dcdb071694da6a6b5a206e3a320b62dd11\npubsub: v1 add client config annotations and retry config\n\nPiperOrigin-RevId: 295158776\n\n5169f46d9f792e2934d9fa25c36d0515b4fd0024\nAdded cloud asset api v1p4beta1.\n\nPiperOrigin-RevId: 295026522\n\n56b55aa8818cd0a532a7d779f6ef337ba809ccbd\nFix: Resource annotations for CreateTimeSeriesRequest and ListTimeSeriesRequest should refer to valid resources. TimeSeries is not a named resource.\n\nPiperOrigin-RevId: 294931650\n\n0646bc775203077226c2c34d3e4d50cc4ec53660\nRemove unnecessary languages from bigquery-related artman configuration files.\n\nPiperOrigin-RevId: 294809380\n\n8b78aa04382e3d4147112ad6d344666771bb1909\nUpdate backend.proto for schemes and protocol\n\nPiperOrigin-RevId: 294788800\n\n80b8f8b3de2359831295e24e5238641a38d8488f\nAdds artman config files for bigquerystorage endpoints v1beta2, v1alpha2, v1\n\nPiperOrigin-RevId: 294763931\n\n2c17ac33b226194041155bb5340c3f34733f1b3a\nAdd parameter to sample generated for UpdateInstance. Related to https://github.com/googleapis/python-redis/issues/4\n\nPiperOrigin-RevId: 294734008\n\nd5e8a8953f2acdfe96fb15e85eb2f33739623957\nMove bigquery datatransfer to gapic v2.\n\nPiperOrigin-RevId: 294703703\n\nefd36705972cfcd7d00ab4c6dfa1135bafacd4ae\nfix: Add two annotations that we missed.\n\nPiperOrigin-RevId: 294664231\n\n8a36b928873ff9c05b43859b9d4ea14cd205df57\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1beta2).\n\nPiperOrigin-RevId: 294459768\n\nc7a3caa2c40c49f034a3c11079dd90eb24987047\nFix: Define the \"bigquery.googleapis.com/Table\" resource in the BigQuery Storage API (v1).\n\nPiperOrigin-RevId: 294456889\n\n5006247aa157e59118833658084345ee59af7c09\nFix: Make deprecated fields optional\nFix: Deprecate SetLoggingServiceRequest.zone in line with the comments\nFeature: Add resource name method signatures where appropriate\n\nPiperOrigin-RevId: 294383128\n\neabba40dac05c5cbe0fca3a35761b17e372036c4\nFix: C# and PHP package/namespace capitalization for BigQuery Storage v1.\n\nPiperOrigin-RevId: 294382444\n\nf8d9a858a7a55eba8009a23aa3f5cc5fe5e88dde\nfix: artman configuration file for bigtable-admin\n\nPiperOrigin-RevId: 294322616\n\n0f29555d1cfcf96add5c0b16b089235afbe9b1a9\nAPI definition for (not-yet-launched) GCS gRPC.\n\nPiperOrigin-RevId: 294321472\n\nfcc86bee0e84dc11e9abbff8d7c3529c0626f390\nfix: Bigtable Admin v2\n\nChange LRO metadata from PartialUpdateInstanceMetadata\nto UpdateInstanceMetadata. (Otherwise, it will not build.)\n\nPiperOrigin-RevId: 294264582\n\n6d9361eae2ebb3f42d8c7ce5baf4bab966fee7c0\nrefactor: Add annotations to Bigtable Admin v2.\n\nPiperOrigin-RevId: 294243406\n\nad7616f3fc8e123451c8b3a7987bc91cea9e6913\nFix: Resource type in CreateLogMetricRequest should use logging.googleapis.com.\nFix: ListLogEntries should have a method signature for convenience of calling it.\n\nPiperOrigin-RevId: 294222165\n\n63796fcbb08712676069e20a3e455c9f7aa21026\nFix: Remove extraneous resource definition for cloudkms.googleapis.com/CryptoKey.\n\nPiperOrigin-RevId: 294176658\n\ne7d8a694f4559201e6913f6610069cb08b39274e\nDepend on the latest gapic-generator and resource names plugin.\n\nThis fixes the very old an very annoying bug: https://github.com/googleapis/gapic-generator/pull/3087\n\nPiperOrigin-RevId: 293903652\n\n806b2854a966d55374ee26bb0cef4e30eda17b58\nfix: correct capitalization of Ruby namespaces in SecurityCenter V1p1beta1\n\nPiperOrigin-RevId: 293903613\n\n1b83c92462b14d67a7644e2980f723112472e03a\nPublish annotations and grpc service config for Logging API.\n\nPiperOrigin-RevId: 293893514\n\ne46f761cd6ec15a9e3d5ed4ff321a4bcba8e8585\nGenerate the Bazel build file for recommendengine public api\n\nPiperOrigin-RevId: 293710856\n\n68477017c4173c98addac0373950c6aa9d7b375f\nMake `language_code` optional for UpdateIntentRequest and BatchUpdateIntentsRequest.\n\nThe comments and proto annotations describe this parameter as optional.\n\nPiperOrigin-RevId: 293703548\n\n16f823f578bca4e845a19b88bb9bc5870ea71ab2\nAdd BUILD.bazel files for managedidentities API\n\nPiperOrigin-RevId: 293698246\n\n2f53fd8178c9a9de4ad10fae8dd17a7ba36133f2\nAdd v1p1beta1 config file\n\nPiperOrigin-RevId: 293696729\n\n052b274138fce2be80f97b6dcb83ab343c7c8812\nAdd source field for user event and add field behavior annotations\n\nPiperOrigin-RevId: 293693115\n\n1e89732b2d69151b1b3418fff3d4cc0434f0dded\ndatacatalog: v1beta1 add three new RPCs to gapic v1beta1 config\n\nPiperOrigin-RevId: 293692823\n\n9c8bd09bbdc7c4160a44f1fbab279b73cd7a2337\nchange the name of AccessApproval service to AccessApprovalAdmin\n\nPiperOrigin-RevId: 293690934\n\n2e23b8fbc45f5d9e200572ca662fe1271bcd6760\nAdd ListEntryGroups method, add http bindings to support entry group tagging, and update some comments.\n\nPiperOrigin-RevId: 293666452\n\n0275e38a4ca03a13d3f47a9613aac8c8b0d3f1f2\nAdd proto_package field to managedidentities API. It is needed for APIs that still depend on artman generation.\n\nPiperOrigin-RevId: 293643323\n\n4cdfe8278cb6f308106580d70648001c9146e759\nRegenerating public protos for Data Catalog to add new Custom Type Entry feature.\n\nPiperOrigin-RevId: 293614782\n\n45d2a569ab526a1fad3720f95eefb1c7330eaada\nEnable client generation for v1 ManagedIdentities API.\n\nPiperOrigin-RevId: 293515675\n\n2c17086b77e6f3bcf04a1f65758dfb0c3da1568f\nAdd the Actions on Google common types (//google/actions/type/*).\n\nPiperOrigin-RevId: 293478245\n\n781aadb932e64a12fb6ead7cd842698d99588433\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293443396\n\ne2602608c9138c2fca24162720e67f9307c30b95\nDialogflow weekly v2/v2beta1 library update:\n- Documentation updates\nImportant updates are also posted at\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 293442964\n\nc8aef82028d06b7992278fa9294c18570dc86c3d\nAdd cc_proto_library and cc_grpc_library targets for Bigtable protos.\n\nAlso fix indentation of cc_grpc_library targets in Spanner and IAM protos.\n\nPiperOrigin-RevId: 293440538\n\ne2faab04f4cb7f9755072330866689b1943a16e9\ncloudtasks: v2 replace non-standard retry params in gapic config v2\n\nPiperOrigin-RevId: 293424055\n\ndfb4097ea628a8470292c6590a4313aee0c675bd\nerrorreporting: v1beta1 add legacy artman config for php\n\nPiperOrigin-RevId: 293423790\n\nb18aed55b45bfe5b62476292c72759e6c3e573c6\nasset: v1p1beta1 updated comment for `page_size` limit.\n\nPiperOrigin-RevId: 293421386\n\nc9ef36b7956d9859a2fc86ad35fcaa16958ab44f\nbazel: Refactor CI build scripts\n\nPiperOrigin-RevId: 293387911\n\na8ed9d921fdddc61d8467bfd7c1668f0ad90435c\nfix: set Ruby module name for OrgPolicy\n\nPiperOrigin-RevId: 293257997\n\n6c7d28509bd8315de8af0889688ee20099594269\nredis: v1beta1 add UpgradeInstance and connect_mode field to Instance\n\nPiperOrigin-RevId: 293242878\n\nae0abed4fcb4c21f5cb67a82349a049524c4ef68\nredis: v1 add connect_mode field to Instance\n\nPiperOrigin-RevId: 293241914\n\n3f7a0d29b28ee9365771da2b66edf7fa2b4e9c56\nAdds service config definition for bigqueryreservation v1beta1\n\nPiperOrigin-RevId: 293234418\n\n0c88168d5ed6fe353a8cf8cbdc6bf084f6bb66a5\naddition of BUILD & configuration for accessapproval v1\n\nPiperOrigin-RevId: 293219198\n\n39bedc2e30f4778ce81193f6ba1fec56107bcfc4\naccessapproval: v1 publish protos\n\nPiperOrigin-RevId: 293167048\n\n" + "sha": "42ee97c1b93a0e3759bbba3013da309f670a90ab", + "internalRef": "307114445" } }, { - "template": { - "name": "python_library", - "origin": "synthtool.gcp", - "version": "2020.2.4" + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "f5e4c17dc78a966dbf29961dd01f9bbd63e20a04" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "f5e4c17dc78a966dbf29961dd01f9bbd63e20a04" } } ], diff --git a/synth.py b/synth.py index cc45712ad..8c957d732 100644 --- a/synth.py +++ b/synth.py @@ -191,7 +191,7 @@ def _merge_dict(d1, d2): # Add templated files # ---------------------------------------------------------------------------- templated_files = gcp.CommonTemplates().py_library( - unit_cov_level=97, cov_level=99, system_test_dependencies=["test_utils", "psutil"] + unit_cov_level=97, cov_level=99, system_test_external_dependencies=["psutil"], ) s.move(templated_files) diff --git a/tests/unit/gapic/v1/test_publisher_client_v1.py b/tests/unit/gapic/v1/test_publisher_client_v1.py index 1d2cb7522..4fad76b78 100644 --- a/tests/unit/gapic/v1/test_publisher_client_v1.py +++ b/tests/unit/gapic/v1/test_publisher_client_v1.py @@ -321,6 +321,49 @@ def test_list_topic_subscriptions_exception(self): with pytest.raises(CustomException): list(paged_list_response) + def test_list_topic_snapshots(self): + # Setup Expected Response + next_page_token = "" + snapshots_element = "snapshotsElement1339034092" + snapshots = [snapshots_element] + expected_response = {"next_page_token": next_page_token, "snapshots": snapshots} + expected_response = pubsub_pb2.ListTopicSnapshotsResponse(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = publisher_client.PublisherClient() + + # Setup Request + topic = client.topic_path("[PROJECT]", "[TOPIC]") + + paged_list_response = client.list_topic_snapshots(topic) + resources = list(paged_list_response) + assert len(resources) == 1 + + assert expected_response.snapshots[0] == resources[0] + + assert len(channel.requests) == 1 + expected_request = pubsub_pb2.ListTopicSnapshotsRequest(topic=topic) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_list_topic_snapshots_exception(self): + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = publisher_client.PublisherClient() + + # Setup request + topic = client.topic_path("[PROJECT]", "[TOPIC]") + + paged_list_response = client.list_topic_snapshots(topic) + with pytest.raises(CustomException): + list(paged_list_response) + def test_delete_topic(self): channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -367,7 +410,7 @@ def test_set_iam_policy(self): client = publisher_client.PublisherClient() # Setup Request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -389,7 +432,7 @@ def test_set_iam_policy_exception(self): client = publisher_client.PublisherClient() # Setup request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -410,7 +453,7 @@ def test_get_iam_policy(self): client = publisher_client.PublisherClient() # Setup Request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -429,7 +472,7 @@ def test_get_iam_policy_exception(self): client = publisher_client.PublisherClient() # Setup request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -449,7 +492,7 @@ def test_test_iam_permissions(self): client = publisher_client.PublisherClient() # Setup Request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -471,7 +514,7 @@ def test_test_iam_permissions_exception(self): client = publisher_client.PublisherClient() # Setup request - resource = client.topic_path("[PROJECT]", "[TOPIC]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException): diff --git a/tests/unit/gapic/v1/test_subscriber_client_v1.py b/tests/unit/gapic/v1/test_subscriber_client_v1.py index db9e77b2a..4e34e1905 100644 --- a/tests/unit/gapic/v1/test_subscriber_client_v1.py +++ b/tests/unit/gapic/v1/test_subscriber_client_v1.py @@ -77,12 +77,14 @@ def test_create_subscription(self): ack_deadline_seconds = 2135351438 retain_acked_messages = False enable_message_ordering = True + filter_ = "filter-1274492040" expected_response = { "name": name_2, "topic": topic_2, "ack_deadline_seconds": ack_deadline_seconds, "retain_acked_messages": retain_acked_messages, "enable_message_ordering": enable_message_ordering, + "filter": filter_, } expected_response = pubsub_pb2.Subscription(**expected_response) @@ -127,12 +129,14 @@ def test_get_subscription(self): ack_deadline_seconds = 2135351438 retain_acked_messages = False enable_message_ordering = True + filter_ = "filter-1274492040" expected_response = { "name": name, "topic": topic, "ack_deadline_seconds": ack_deadline_seconds, "retain_acked_messages": retain_acked_messages, "enable_message_ordering": enable_message_ordering, + "filter": filter_, } expected_response = pubsub_pb2.Subscription(**expected_response) @@ -175,12 +179,14 @@ def test_update_subscription(self): ack_deadline_seconds_2 = 921632575 retain_acked_messages = False enable_message_ordering = True + filter_ = "filter-1274492040" expected_response = { "name": name, "topic": topic, "ack_deadline_seconds": ack_deadline_seconds_2, "retain_acked_messages": retain_acked_messages, "enable_message_ordering": enable_message_ordering, + "filter": filter_, } expected_response = pubsub_pb2.Subscription(**expected_response) @@ -305,6 +311,45 @@ def test_delete_subscription_exception(self): with pytest.raises(CustomException): client.delete_subscription(subscription) + def test_get_snapshot(self): + # Setup Expected Response + name = "name3373707" + topic = "topic110546223" + expected_response = {"name": name, "topic": topic} + expected_response = pubsub_pb2.Snapshot(**expected_response) + + # Mock the API response + channel = ChannelStub(responses=[expected_response]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = subscriber_client.SubscriberClient() + + # Setup Request + snapshot = client.snapshot_path("[PROJECT]", "[SNAPSHOT]") + + response = client.get_snapshot(snapshot) + assert expected_response == response + + assert len(channel.requests) == 1 + expected_request = pubsub_pb2.GetSnapshotRequest(snapshot=snapshot) + actual_request = channel.requests[0][1] + assert expected_request == actual_request + + def test_get_snapshot_exception(self): + # Mock the API response + channel = ChannelStub(responses=[CustomException()]) + patch = mock.patch("google.api_core.grpc_helpers.create_channel") + with patch as create_channel: + create_channel.return_value = channel + client = subscriber_client.SubscriberClient() + + # Setup request + snapshot = client.snapshot_path("[PROJECT]", "[SNAPSHOT]") + + with pytest.raises(CustomException): + client.get_snapshot(snapshot) + def test_modify_ack_deadline(self): channel = ChannelStub() patch = mock.patch("google.api_core.grpc_helpers.create_channel") @@ -422,9 +467,7 @@ def test_pull_exception(self): def test_streaming_pull(self): # Setup Expected Response - received_messages_element = {} - received_messages = [received_messages_element] - expected_response = {"received_messages": received_messages} + expected_response = {} expected_response = pubsub_pb2.StreamingPullResponse(**expected_response) # Mock the API response @@ -732,7 +775,7 @@ def test_set_iam_policy(self): client = subscriber_client.SubscriberClient() # Setup Request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" policy = {} response = client.set_iam_policy(resource, policy) @@ -754,7 +797,7 @@ def test_set_iam_policy_exception(self): client = subscriber_client.SubscriberClient() # Setup request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" policy = {} with pytest.raises(CustomException): @@ -775,7 +818,7 @@ def test_get_iam_policy(self): client = subscriber_client.SubscriberClient() # Setup Request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" response = client.get_iam_policy(resource) assert expected_response == response @@ -794,7 +837,7 @@ def test_get_iam_policy_exception(self): client = subscriber_client.SubscriberClient() # Setup request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" with pytest.raises(CustomException): client.get_iam_policy(resource) @@ -814,7 +857,7 @@ def test_test_iam_permissions(self): client = subscriber_client.SubscriberClient() # Setup Request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" permissions = [] response = client.test_iam_permissions(resource, permissions) @@ -836,7 +879,7 @@ def test_test_iam_permissions_exception(self): client = subscriber_client.SubscriberClient() # Setup request - resource = client.subscription_path("[PROJECT]", "[SUBSCRIPTION]") + resource = "resource-341064690" permissions = [] with pytest.raises(CustomException):