diff --git a/pubsub/google/cloud/pubsub_v1/gapic/publisher_client.py b/pubsub/google/cloud/pubsub_v1/gapic/publisher_client.py index cb08721e1d05..b5cc5e5e83a0 100644 --- a/pubsub/google/cloud/pubsub_v1/gapic/publisher_client.py +++ b/pubsub/google/cloud/pubsub_v1/gapic/publisher_client.py @@ -214,7 +214,7 @@ def create_topic(self, underscores (``_``), periods (``.``), tildes (``~``), plus (``+``) or percent signs (``%``). It must be between 3 and 255 characters in length, and it must not start with ``\"goog\"``. - labels (dict[str -> str]): User labels. + labels (dict[str -> str]): See Creating and managing labels. message_storage_policy (Union[dict, ~google.cloud.pubsub_v1.types.MessageStoragePolicy]): Policy constraining how messages published to the topic may be stored. It is determined when the topic is created based on the policy configured at the project level. It must not be set by the caller in the request to @@ -340,8 +340,7 @@ def publish(self, metadata=None): """ Adds one or more messages to the topic. Returns ``NOT_FOUND`` if the topic - does not exist. The message payload must not be empty; it must contain - either a non-empty data field, or at least one attribute. + does not exist. Example: >>> from google.cloud import pubsub_v1 @@ -481,8 +480,8 @@ def list_topics(self, ... pass Args: - project (str): The name of the cloud project that topics belong to. - Format is ``projects/{project}``. + project (str): The name of the project in which to list topics. + Format is ``projects/{project-id}``. 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 diff --git a/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client.py b/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client.py index 48ce0f8e7540..95829e5923ca 100644 --- a/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client.py +++ b/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client.py @@ -216,6 +216,7 @@ def create_subscription(self, retain_acked_messages=None, message_retention_duration=None, labels=None, + expiration_policy=None, retry=google.api_core.gapic_v1.method.DEFAULT, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None): @@ -296,7 +297,18 @@ def create_subscription(self, 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.Duration` - labels (dict[str -> str]): User labels. + labels (dict[str -> str]): See Creating and managing labels. + expiration_policy (Union[dict, ~google.cloud.pubsub_v1.types.ExpirationPolicy]): A policy that specifies the conditions for this subscription's expiration. + A subscription is considered active as long as any connected subscriber is + successfully consuming messages from the subscription or is issuing + operations on the subscription. 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. + BETA: This feature is part of a beta 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.ExpirationPolicy` retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -336,6 +348,7 @@ def create_subscription(self, retain_acked_messages=retain_acked_messages, message_retention_duration=message_retention_duration, labels=labels, + expiration_policy=expiration_policy, ) return self._inner_api_calls['create_subscription']( request, retry=retry, timeout=timeout, metadata=metadata) @@ -496,8 +509,8 @@ def list_subscriptions(self, ... pass Args: - project (str): The name of the cloud project that subscriptions belong to. - Format is ``projects/{project}``. + project (str): The name of the project in which to list subscriptions. + Format is ``projects/{project-id}``. 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 @@ -762,8 +775,7 @@ def pull(self, timeout=google.api_core.gapic_v1.method.DEFAULT, metadata=None): """ - Pulls messages from the server. Returns an empty list if there are no - messages available in the backlog. The server may return ``UNAVAILABLE`` if + Pulls messages from the server. The server may return ``UNAVAILABLE`` if there are too many concurrent pull requests pending for the given subscription. @@ -787,9 +799,7 @@ def pull(self, 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. The - client may cancel the request if it does not wish to wait any longer for - the response. + least one message is available, rather than returning no messages. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. @@ -1001,8 +1011,8 @@ def list_snapshots(self, ... pass Args: - project (str): The name of the cloud project that snapshots belong to. - Format is ``projects/{project}``. + project (str): The name of the project in which to list snapshots. + Format is ``projects/{project-id}``. 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 @@ -1070,7 +1080,7 @@ def create_snapshot(self, Creates a snapshot from the requested subscription.

ALPHA: This feature is part of an 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. + use. It is not subject to any SLA or deprecation policy.

If the snapshot already exists, returns ``ALREADY_EXISTS``. If the requested subscription doesn't exist, returns ``NOT_FOUND``. If the backlog in the subscription is too old -- and the resulting snapshot @@ -1097,7 +1107,8 @@ def create_snapshot(self, name (str): Optional 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. + Note that for REST API requests, you must specify a name. See the + resource name rules. Format is ``projects/{project}/snapshots/{snap}``. subscription (str): The subscription whose backlog the snapshot retains. Specifically, the created snapshot is guaranteed to retain: \ @@ -1109,7 +1120,7 @@ def create_snapshot(self, successful completion of the CreateSnapshot request. \ Format is ``projects/{project}/subscriptions/{sub}``. - labels (dict[str -> str]): User labels. + labels (dict[str -> str]): See Creating and managing labels. retry (Optional[google.api_core.retry.Retry]): A retry object used to retry requests. If ``None`` is specified, requests will not be retried. diff --git a/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client_config.py b/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client_config.py index faa26736e62e..ef113edaec15 100644 --- a/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client_config.py +++ b/pubsub/google/cloud/pubsub_v1/gapic/subscriber_client_config.py @@ -4,8 +4,8 @@ "retry_codes": { "idempotent": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "pull": [ - "CANCELLED", "DEADLINE_EXCEEDED", "INTERNAL", - "RESOURCE_EXHAUSTED", "UNAVAILABLE" + "DEADLINE_EXCEEDED", "INTERNAL", "RESOURCE_EXHAUSTED", + "UNAVAILABLE" ], "http_get": ["DEADLINE_EXCEEDED", "UNAVAILABLE"], "non_idempotent": [] @@ -72,7 +72,7 @@ }, "Acknowledge": { "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", + "retry_codes_name": "idempotent", "retry_params_name": "messaging" }, "Pull": { diff --git a/pubsub/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py b/pubsub/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py index c74dabd24891..9facdc16d9b0 100644 --- a/pubsub/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py +++ b/pubsub/google/cloud/pubsub_v1/gapic/transports/publisher_grpc_transport.py @@ -129,8 +129,7 @@ def publish(self): """Return the gRPC stub for {$apiMethod.name}. Adds one or more messages to the topic. Returns ``NOT_FOUND`` if the topic - does not exist. The message payload must not be empty; it must contain - either a non-empty data field, or at least one attribute. + does not exist. Returns: Callable: A callable which accepts the appropriate diff --git a/pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py b/pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py index 50f7aa3ee266..eeb05cee25ff 100644 --- a/pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py +++ b/pubsub/google/cloud/pubsub_v1/gapic/transports/subscriber_grpc_transport.py @@ -216,8 +216,7 @@ def acknowledge(self): def pull(self): """Return the gRPC stub for {$apiMethod.name}. - Pulls messages from the server. Returns an empty list if there are no - messages available in the backlog. The server may return ``UNAVAILABLE`` if + Pulls messages from the server. The server may return ``UNAVAILABLE`` if there are too many concurrent pull requests pending for the given subscription. @@ -288,7 +287,7 @@ def create_snapshot(self): Creates a snapshot from the requested subscription.

ALPHA: This feature is part of an 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. + use. It is not subject to any SLA or deprecation policy.

If the snapshot already exists, returns ``ALREADY_EXISTS``. If the requested subscription doesn't exist, returns ``NOT_FOUND``. If the backlog in the subscription is too old -- and the resulting snapshot diff --git a/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2.py b/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2.py index 112f1d8a05f1..6f4a75859082 100644 --- a/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2.py +++ b/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2.py @@ -24,7 +24,7 @@ name='google/cloud/pubsub_v1/proto/pubsub.proto', package='google.pubsub.v1', syntax='proto3', - serialized_pb=_b('\n)google/cloud/pubsub_v1/proto/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.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\"\xc1\x01\n\x05Topic\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdb\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\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\" \n\x0fGetTopicRequest\x12\r\n\x05topic\x18\x01 \x01(\t\"m\n\x12UpdateTopicRequest\x12&\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.Topic\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"R\n\x0ePublishRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x31\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessage\"&\n\x0fPublishResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"K\n\x11ListTopicsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\"U\n\x1dListTopicSubscriptionsRequest\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\"P\n\x1eListTopicSubscriptionsResponse\x12\x15\n\rsubscriptions\x18\x01 \x03(\t\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\"#\n\x12\x44\x65leteTopicRequest\x12\r\n\x05topic\x18\x01 \x01(\t\"\xc5\x02\n\x0cSubscription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x98\x01\n\nPushConfig\x12\x15\n\rpush_endpoint\x18\x01 \x01(\t\x12@\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"S\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\".\n\x16GetSubscriptionRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\"\x82\x01\n\x19UpdateSubscriptionRequest\x12\x34\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.Subscription\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"R\n\x18ListSubscriptionsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\"1\n\x19\x44\x65leteSubscriptionRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\"b\n\x17ModifyPushConfigRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x31\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfig\"U\n\x0bPullRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x1a\n\x12return_immediately\x18\x02 \x01(\x08\x12\x14\n\x0cmax_messages\x18\x03 \x01(\x05\"L\n\x0cPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage\"_\n\x18ModifyAckDeadlineRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63k_ids\x18\x04 \x03(\t\x12\x1c\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\";\n\x12\x41\x63knowledgeRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63k_ids\x18\x02 \x03(\t\"\xa4\x01\n\x14StreamingPullRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\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\"U\n\x15StreamingPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage\"\xaf\x01\n\x15\x43reateSnapshotRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0csubscription\x18\x02 \x01(\t\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\"v\n\x15UpdateSnapshotRequest\x12,\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.Snapshot\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xbf\x01\n\x08Snapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\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\"&\n\x12GetSnapshotRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\t\"N\n\x14ListSnapshotsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\")\n\x15\x44\x65leteSnapshotRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\t\"m\n\x0bSeekRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12*\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x12\n\x08snapshot\x18\x03 \x01(\tH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xbf\x08\n\tPublisher\x12j\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\")\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\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\x82\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"2\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12o\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x80\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xb2\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\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\x12t\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"\'\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}2\xf7\x11\n\nSubscriber\x12\x86\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"0\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\x92\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\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\x9c\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\".\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x90\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xa3\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\x91\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"D\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\x84\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x64\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse(\x01\x30\x01\x12\xa0\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"I\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\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\x8c\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x83\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*\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\x80\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\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*B\x92\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\\V1b\x06proto3') + serialized_pb=_b('\n)google/cloud/pubsub_v1/proto/pubsub.proto\x12\x10google.pubsub.v1\x1a\x1cgoogle/api/annotations.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\"\xc1\x01\n\x05Topic\x12\x0c\n\x04name\x18\x01 \x01(\t\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\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xdb\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\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\" \n\x0fGetTopicRequest\x12\r\n\x05topic\x18\x01 \x01(\t\"m\n\x12UpdateTopicRequest\x12&\n\x05topic\x18\x01 \x01(\x0b\x32\x17.google.pubsub.v1.Topic\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"R\n\x0ePublishRequest\x12\r\n\x05topic\x18\x01 \x01(\t\x12\x31\n\x08messages\x18\x02 \x03(\x0b\x32\x1f.google.pubsub.v1.PubsubMessage\"&\n\x0fPublishResponse\x12\x13\n\x0bmessage_ids\x18\x01 \x03(\t\"K\n\x11ListTopicsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\"U\n\x1dListTopicSubscriptionsRequest\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\"P\n\x1eListTopicSubscriptionsResponse\x12\x15\n\rsubscriptions\x18\x01 \x03(\t\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\"#\n\x12\x44\x65leteTopicRequest\x12\r\n\x05topic\x18\x01 \x01(\t\"\x84\x03\n\x0cSubscription\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\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=\n\x11\x65xpiration_policy\x18\x0b \x01(\x0b\x32\".google.pubsub.v1.ExpirationPolicy\x1a-\n\x0bLabelsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\":\n\x10\x45xpirationPolicy\x12&\n\x03ttl\x18\x01 \x01(\x0b\x32\x19.google.protobuf.Duration\"\x98\x01\n\nPushConfig\x12\x15\n\rpush_endpoint\x18\x01 \x01(\t\x12@\n\nattributes\x18\x02 \x03(\x0b\x32,.google.pubsub.v1.PushConfig.AttributesEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"S\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\".\n\x16GetSubscriptionRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\"\x82\x01\n\x19UpdateSubscriptionRequest\x12\x34\n\x0csubscription\x18\x01 \x01(\x0b\x32\x1e.google.pubsub.v1.Subscription\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"R\n\x18ListSubscriptionsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\"1\n\x19\x44\x65leteSubscriptionRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\"b\n\x17ModifyPushConfigRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x31\n\x0bpush_config\x18\x02 \x01(\x0b\x32\x1c.google.pubsub.v1.PushConfig\"U\n\x0bPullRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x1a\n\x12return_immediately\x18\x02 \x01(\x08\x12\x14\n\x0cmax_messages\x18\x03 \x01(\x05\"L\n\x0cPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage\"_\n\x18ModifyAckDeadlineRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63k_ids\x18\x04 \x03(\t\x12\x1c\n\x14\x61\x63k_deadline_seconds\x18\x03 \x01(\x05\";\n\x12\x41\x63knowledgeRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12\x0f\n\x07\x61\x63k_ids\x18\x02 \x03(\t\"\xa4\x01\n\x14StreamingPullRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\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\"U\n\x15StreamingPullResponse\x12<\n\x11received_messages\x18\x01 \x03(\x0b\x32!.google.pubsub.v1.ReceivedMessage\"\xaf\x01\n\x15\x43reateSnapshotRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x14\n\x0csubscription\x18\x02 \x01(\t\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\"v\n\x15UpdateSnapshotRequest\x12,\n\x08snapshot\x18\x01 \x01(\x0b\x32\x1a.google.pubsub.v1.Snapshot\x12/\n\x0bupdate_mask\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.FieldMask\"\xbf\x01\n\x08Snapshot\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x05topic\x18\x02 \x01(\t\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\"&\n\x12GetSnapshotRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\t\"N\n\x14ListSnapshotsRequest\x12\x0f\n\x07project\x18\x01 \x01(\t\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\")\n\x15\x44\x65leteSnapshotRequest\x12\x10\n\x08snapshot\x18\x01 \x01(\t\"m\n\x0bSeekRequest\x12\x14\n\x0csubscription\x18\x01 \x01(\t\x12*\n\x04time\x18\x02 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x12\x12\n\x08snapshot\x18\x03 \x01(\tH\x00\x42\x08\n\x06target\"\x0e\n\x0cSeekResponse2\xbf\x08\n\tPublisher\x12j\n\x0b\x43reateTopic\x12\x17.google.pubsub.v1.Topic\x1a\x17.google.pubsub.v1.Topic\")\x82\xd3\xe4\x93\x02#\x1a\x1e/v1/{name=projects/*/topics/*}:\x01*\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\x82\x01\n\x07Publish\x12 .google.pubsub.v1.PublishRequest\x1a!.google.pubsub.v1.PublishResponse\"2\x82\xd3\xe4\x93\x02,\"\'/v1/{topic=projects/*/topics/*}:publish:\x01*\x12o\n\x08GetTopic\x12!.google.pubsub.v1.GetTopicRequest\x1a\x17.google.pubsub.v1.Topic\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{topic=projects/*/topics/*}\x12\x80\x01\n\nListTopics\x12#.google.pubsub.v1.ListTopicsRequest\x1a$.google.pubsub.v1.ListTopicsResponse\"\'\x82\xd3\xe4\x93\x02!\x12\x1f/v1/{project=projects/*}/topics\x12\xb2\x01\n\x16ListTopicSubscriptions\x12/.google.pubsub.v1.ListTopicSubscriptionsRequest\x1a\x30.google.pubsub.v1.ListTopicSubscriptionsResponse\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{topic=projects/*/topics/*}/subscriptions\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\x12t\n\x0b\x44\x65leteTopic\x12$.google.pubsub.v1.DeleteTopicRequest\x1a\x16.google.protobuf.Empty\"\'\x82\xd3\xe4\x93\x02!*\x1f/v1/{topic=projects/*/topics/*}2\xf9\x11\n\nSubscriber\x12\x86\x01\n\x12\x43reateSubscription\x12\x1e.google.pubsub.v1.Subscription\x1a\x1e.google.pubsub.v1.Subscription\"0\x82\xd3\xe4\x93\x02*\x1a%/v1/{name=projects/*/subscriptions/*}:\x01*\x12\x92\x01\n\x0fGetSubscription\x12(.google.pubsub.v1.GetSubscriptionRequest\x1a\x1e.google.pubsub.v1.Subscription\"5\x82\xd3\xe4\x93\x02/\x12-/v1/{subscription=projects/*/subscriptions/*}\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\x9c\x01\n\x11ListSubscriptions\x12*.google.pubsub.v1.ListSubscriptionsRequest\x1a+.google.pubsub.v1.ListSubscriptionsResponse\".\x82\xd3\xe4\x93\x02(\x12&/v1/{project=projects/*}/subscriptions\x12\x90\x01\n\x12\x44\x65leteSubscription\x12+.google.pubsub.v1.DeleteSubscriptionRequest\x1a\x16.google.protobuf.Empty\"5\x82\xd3\xe4\x93\x02/*-/v1/{subscription=projects/*/subscriptions/*}\x12\xa3\x01\n\x11ModifyAckDeadline\x12*.google.pubsub.v1.ModifyAckDeadlineRequest\x1a\x16.google.protobuf.Empty\"J\x82\xd3\xe4\x93\x02\x44\"?/v1/{subscription=projects/*/subscriptions/*}:modifyAckDeadline:\x01*\x12\x91\x01\n\x0b\x41\x63knowledge\x12$.google.pubsub.v1.AcknowledgeRequest\x1a\x16.google.protobuf.Empty\"D\x82\xd3\xe4\x93\x02>\"9/v1/{subscription=projects/*/subscriptions/*}:acknowledge:\x01*\x12\x84\x01\n\x04Pull\x12\x1d.google.pubsub.v1.PullRequest\x1a\x1e.google.pubsub.v1.PullResponse\"=\x82\xd3\xe4\x93\x02\x37\"2/v1/{subscription=projects/*/subscriptions/*}:pull:\x01*\x12\x66\n\rStreamingPull\x12&.google.pubsub.v1.StreamingPullRequest\x1a\'.google.pubsub.v1.StreamingPullResponse\"\x00(\x01\x30\x01\x12\xa0\x01\n\x10ModifyPushConfig\x12).google.pubsub.v1.ModifyPushConfigRequest\x1a\x16.google.protobuf.Empty\"I\x82\xd3\xe4\x93\x02\x43\">/v1/{subscription=projects/*/subscriptions/*}:modifyPushConfig:\x01*\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\x8c\x01\n\rListSnapshots\x12&.google.pubsub.v1.ListSnapshotsRequest\x1a\'.google.pubsub.v1.ListSnapshotsResponse\"*\x82\xd3\xe4\x93\x02$\x12\"/v1/{project=projects/*}/snapshots\x12\x83\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*\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\x80\x01\n\x0e\x44\x65leteSnapshot\x12\'.google.pubsub.v1.DeleteSnapshotRequest\x1a\x16.google.protobuf.Empty\"-\x82\xd3\xe4\x93\x02\'*%/v1/{snapshot=projects/*/snapshots/*}\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*B\x92\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\\V1b\x06proto3') , dependencies=[google_dot_api_dot_annotations__pb2.DESCRIPTOR,google_dot_protobuf_dot_duration__pb2.DESCRIPTOR,google_dot_protobuf_dot_empty__pb2.DESCRIPTOR,google_dot_protobuf_dot_field__mask__pb2.DESCRIPTOR,google_dot_protobuf_dot_timestamp__pb2.DESCRIPTOR,]) @@ -744,6 +744,13 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None, file=DESCRIPTOR), + _descriptor.FieldDescriptor( + name='expiration_policy', full_name='google.pubsub.v1.Subscription.expiration_policy', index=7, + number=11, 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, + options=None, file=DESCRIPTOR), ], extensions=[ ], @@ -757,7 +764,38 @@ oneofs=[ ], serialized_start=1498, - serialized_end=1823, + serialized_end=1886, +) + + +_EXPIRATIONPOLICY = _descriptor.Descriptor( + name='ExpirationPolicy', + full_name='google.pubsub.v1.ExpirationPolicy', + filename=None, + file=DESCRIPTOR, + containing_type=None, + fields=[ + _descriptor.FieldDescriptor( + name='ttl', full_name='google.pubsub.v1.ExpirationPolicy.ttl', 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, + options=None, file=DESCRIPTOR), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=1888, + serialized_end=1946, ) @@ -831,8 +869,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1826, - serialized_end=1978, + serialized_start=1949, + serialized_end=2101, ) @@ -869,8 +907,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=1980, - serialized_end=2063, + serialized_start=2103, + serialized_end=2186, ) @@ -900,8 +938,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2065, - serialized_end=2111, + serialized_start=2188, + serialized_end=2234, ) @@ -938,8 +976,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2114, - serialized_end=2244, + serialized_start=2237, + serialized_end=2367, ) @@ -983,8 +1021,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2246, - serialized_end=2328, + serialized_start=2369, + serialized_end=2451, ) @@ -1021,8 +1059,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2330, - serialized_end=2437, + serialized_start=2453, + serialized_end=2560, ) @@ -1052,8 +1090,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2439, - serialized_end=2488, + serialized_start=2562, + serialized_end=2611, ) @@ -1090,8 +1128,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2490, - serialized_end=2588, + serialized_start=2613, + serialized_end=2711, ) @@ -1135,8 +1173,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2590, - serialized_end=2675, + serialized_start=2713, + serialized_end=2798, ) @@ -1166,8 +1204,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2677, - serialized_end=2753, + serialized_start=2800, + serialized_end=2876, ) @@ -1211,8 +1249,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2755, - serialized_end=2850, + serialized_start=2878, + serialized_end=2973, ) @@ -1249,8 +1287,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2852, - serialized_end=2911, + serialized_start=2975, + serialized_end=3034, ) @@ -1308,8 +1346,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=2914, - serialized_end=3078, + serialized_start=3037, + serialized_end=3201, ) @@ -1339,8 +1377,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3080, - serialized_end=3165, + serialized_start=3203, + serialized_end=3288, ) @@ -1421,8 +1459,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3168, - serialized_end=3343, + serialized_start=3291, + serialized_end=3466, ) @@ -1459,8 +1497,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3345, - serialized_end=3463, + serialized_start=3468, + serialized_end=3586, ) @@ -1548,8 +1586,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3466, - serialized_end=3657, + serialized_start=3589, + serialized_end=3780, ) @@ -1579,8 +1617,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3659, - serialized_end=3697, + serialized_start=3782, + serialized_end=3820, ) @@ -1624,8 +1662,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3699, - serialized_end=3777, + serialized_start=3822, + serialized_end=3900, ) @@ -1662,8 +1700,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3779, - serialized_end=3874, + serialized_start=3902, + serialized_end=3997, ) @@ -1693,8 +1731,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3876, - serialized_end=3917, + serialized_start=3999, + serialized_end=4040, ) @@ -1741,8 +1779,8 @@ name='target', full_name='google.pubsub.v1.SeekRequest.target', index=0, containing_type=None, fields=[]), ], - serialized_start=3919, - serialized_end=4028, + serialized_start=4042, + serialized_end=4151, ) @@ -1765,8 +1803,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=4030, - serialized_end=4044, + serialized_start=4153, + serialized_end=4167, ) _TOPIC_LABELSENTRY.containing_type = _TOPIC @@ -1783,6 +1821,8 @@ _SUBSCRIPTION.fields_by_name['push_config'].message_type = _PUSHCONFIG _SUBSCRIPTION.fields_by_name['message_retention_duration'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _SUBSCRIPTION.fields_by_name['labels'].message_type = _SUBSCRIPTION_LABELSENTRY +_SUBSCRIPTION.fields_by_name['expiration_policy'].message_type = _EXPIRATIONPOLICY +_EXPIRATIONPOLICY.fields_by_name['ttl'].message_type = google_dot_protobuf_dot_duration__pb2._DURATION _PUSHCONFIG_ATTRIBUTESENTRY.containing_type = _PUSHCONFIG _PUSHCONFIG.fields_by_name['attributes'].message_type = _PUSHCONFIG_ATTRIBUTESENTRY _RECEIVEDMESSAGE.fields_by_name['message'].message_type = _PUBSUBMESSAGE @@ -1822,6 +1862,7 @@ DESCRIPTOR.message_types_by_name['ListTopicSnapshotsResponse'] = _LISTTOPICSNAPSHOTSRESPONSE DESCRIPTOR.message_types_by_name['DeleteTopicRequest'] = _DELETETOPICREQUEST DESCRIPTOR.message_types_by_name['Subscription'] = _SUBSCRIPTION +DESCRIPTOR.message_types_by_name['ExpirationPolicy'] = _EXPIRATIONPOLICY DESCRIPTOR.message_types_by_name['PushConfig'] = _PUSHCONFIG DESCRIPTOR.message_types_by_name['ReceivedMessage'] = _RECEIVEDMESSAGE DESCRIPTOR.message_types_by_name['GetSubscriptionRequest'] = _GETSUBSCRIPTIONREQUEST @@ -1892,7 +1933,7 @@ (``%``). It must be between 3 and 255 characters in length, and it must not start with ``"goog"``. labels: - User labels. + See Creating and managing labels. message_storage_policy: Policy constraining how messages published to the topic may be stored. It is determined when the topic is created based on @@ -1918,14 +1959,16 @@ DESCRIPTOR = _PUBSUBMESSAGE, __module__ = 'google.cloud.pubsub_v1.proto.pubsub_pb2' , - __doc__ = """A message data and its attributes. The message payload must not be - empty; it must contain either a non-empty data field, or at least one - attribute. + __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. See Quotas and limits for more information about message + limits. Attributes: data: - The message payload. + The message data field. If this field is empty, the message + must contain at least one attribute. attributes: Optional attributes for this message. message_id: @@ -2026,8 +2069,8 @@ Attributes: project: - The name of the cloud project that topics belong to. Format is - ``projects/{project}``. + The name of the project in which to list topics. Format is + ``projects/{project-id}``. page_size: Maximum number of topics to return. page_token: @@ -2237,13 +2280,46 @@ recommended for production use. It is not subject to any SLA or deprecation policy. labels: - User labels. + See Creating and managing labels. + expiration_policy: + A policy that specifies the conditions for this subscription's + expiration. A subscription is considered active as long as any + connected subscriber is successfully consuming messages from + the subscription or is issuing operations on the subscription. + 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. BETA: This feature is part + of a beta 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. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.Subscription) )) _sym_db.RegisterMessage(Subscription) _sym_db.RegisterMessage(Subscription.LabelsEntry) +ExpirationPolicy = _reflection.GeneratedProtocolMessageType('ExpirationPolicy', (_message.Message,), 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). + + + Attributes: + ttl: + Specifies the "time-to-live" duration for an associated + resource. The resource expires if it is not active for a + period of ``ttl``. The definition of "activity" depends on the + type of the associated resource. The minimum and maximum + allowed values for ``ttl`` depend on the type of the + associated resource, as well. If ``ttl`` is not set, the + associated resource never expires. + """, + # @@protoc_insertion_point(class_scope:google.pubsub.v1.ExpirationPolicy) + )) +_sym_db.RegisterMessage(ExpirationPolicy) + PushConfig = _reflection.GeneratedProtocolMessageType('PushConfig', (_message.Message,), dict( AttributesEntry = _reflection.GeneratedProtocolMessageType('AttributesEntry', (_message.Message,), dict( @@ -2348,8 +2424,8 @@ Attributes: project: - The name of the cloud project that subscriptions belong to. - Format is ``projects/{project}``. + The name of the project in which to list subscriptions. Format + is ``projects/{project-id}``. page_size: Maximum number of subscriptions to return. page_token: @@ -2436,9 +2512,7 @@ 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. The client may - cancel the request if it does not wish to wait any longer for - the response. + available, rather than returning no messages. max_messages: The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified. @@ -2456,11 +2530,11 @@ Attributes: received_messages: - Received Pub/Sub messages. The Pub/Sub system will return zero - messages if there are no more available in the backlog. The - Pub/Sub system may return fewer than the ``maxMessages`` - requested even if there are more messages available in the - backlog. + Received Pub/Sub messages. The list will be empty if there are + no more messages available in the backlog. For JSON, the + response can be entirely empty. The Pub/Sub system may return + fewer than the ``maxMessages`` requested even if there are + more messages available in the backlog. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.PullResponse) )) @@ -2608,7 +2682,7 @@ 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. Format is + specify a name. See the resource name rules. Format is ``projects/{project}/snapshots/{snap}``. subscription: The subscription whose backlog the snapshot retains. @@ -2621,7 +2695,7 @@ completion of the CreateSnapshot request. Format is ``projects/{project}/subscriptions/{sub}``. labels: - User labels. + See Creating and managing labels. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.CreateSnapshotRequest) )) @@ -2686,7 +2760,7 @@ service will refuse to create a snapshot that would expire in less than 1 hour after creation. labels: - User labels. + See Creating and managing labels. """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.Snapshot) )) @@ -2724,8 +2798,8 @@ Attributes: project: - The name of the cloud project that snapshots belong to. Format - is ``projects/{project}``. + The name of the project in which to list snapshots. Format is + ``projects/{project-id}``. page_size: Maximum number of snapshots to return. page_token: @@ -2817,6 +2891,9 @@ SeekResponse = _reflection.GeneratedProtocolMessageType('SeekResponse', (_message.Message,), dict( DESCRIPTOR = _SEEKRESPONSE, __module__ = 'google.cloud.pubsub_v1.proto.pubsub_pb2' + , + __doc__ = """Response for the ``Seek`` method (this response is empty). + """, # @@protoc_insertion_point(class_scope:google.pubsub.v1.SeekResponse) )) _sym_db.RegisterMessage(SeekResponse) @@ -2843,8 +2920,8 @@ file=DESCRIPTOR, index=0, options=None, - serialized_start=4047, - serialized_end=5134, + serialized_start=4170, + serialized_end=5257, methods=[ _descriptor.MethodDescriptor( name='CreateTopic', @@ -2930,8 +3007,8 @@ file=DESCRIPTOR, index=1, options=None, - serialized_start=5137, - serialized_end=7432, + serialized_start=5260, + serialized_end=7557, methods=[ _descriptor.MethodDescriptor( name='CreateSubscription', diff --git a/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2_grpc.py b/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2_grpc.py index cbc898ec32db..98f878c83b0a 100644 --- a/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2_grpc.py +++ b/pubsub/google/cloud/pubsub_v1/proto/pubsub_pb2_grpc.py @@ -81,8 +81,7 @@ def UpdateTopic(self, request, context): def Publish(self, request, context): """Adds one or more messages to the topic. Returns `NOT_FOUND` if the topic - does not exist. The message payload must not be empty; it must contain - either a non-empty data field, or at least one attribute. + does not exist. """ context.set_code(grpc.StatusCode.UNIMPLEMENTED) context.set_details('Method not implemented!') @@ -354,8 +353,7 @@ def Acknowledge(self, request, context): raise NotImplementedError('Method not implemented!') def Pull(self, request, context): - """Pulls messages from the server. Returns an empty list if there are no - messages available in the backlog. The server may return `UNAVAILABLE` if + """Pulls messages from the server. The server may return `UNAVAILABLE` if there are too many concurrent pull requests pending for the given subscription. """ @@ -412,7 +410,7 @@ def CreateSnapshot(self, request, context): """Creates a snapshot from the requested subscription.

ALPHA: This feature is part of an 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. + use. It is not subject to any SLA or deprecation policy.

If the snapshot already exists, returns `ALREADY_EXISTS`. If the requested subscription doesn't exist, returns `NOT_FOUND`. If the backlog in the subscription is too old -- and the resulting snapshot