Source code for google.pubsub.v1.pubsub_pb2

# Copyright 2016 Google Inc. All rights reserved.
#
# 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
#
# http://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.

from google.protobuf import timestamp_pb2


[docs]class Topic(object): """ A topic resource. Attributes: name (string): The name of the topic. It must have the format ``"projects/{project}/topics/{topic}"``. ``{topic}`` must start with a letter, and contain only letters (``[A-Za-z]``), numbers (``[0-9]``), dashes (``-``), underscores (``_``), periods (``.``), tildes (``~``), plus (``+``) or percent signs (``%``). It must be between 3 and 255 characters in length, and it must not start with ``"goog"``. """ pass
[docs]class PubsubMessage(object): """ 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. Attributes: data (bytes): The message payload. For JSON requests, the value of this field must be base64-encoded. attributes (dict[string -> :class:`google.pubsub.v1.pubsub_pb2.PubsubMessage.AttributesEntry`]): Optional attributes for this message. message_id (string): ID of this message, assigned by the server when the message is published. Guaranteed to be unique within the topic. This value may be read by a subscriber that receives a ``PubsubMessage`` via a ``Pull`` call or a push delivery. It must not be populated by the publisher in a ``Publish`` call. publish_time (:class:`google.protobuf.timestamp_pb2.Timestamp`): The time at which the message was published, populated by the server when it receives the ``Publish`` call. It must not be populated by the publisher in a ``Publish`` call. """ pass
[docs]class GetTopicRequest(object): """ Request for the GetTopic method. Attributes: topic (string): The name of the topic to get. """ pass
[docs]class PublishRequest(object): """ Request for the Publish method. Attributes: topic (string): The messages in the request will be published on this topic. messages (list[:class:`google.pubsub.v1.pubsub_pb2.PubsubMessage`]): The messages to publish. """ pass
[docs]class PublishResponse(object): """ Response for the ``Publish`` method. Attributes: message_ids (list[string]): The server-assigned ID of each published message, in the same order as the messages in the request. IDs are guaranteed to be unique within the topic. """ pass
[docs]class ListTopicsRequest(object): """ Request for the ``ListTopics`` method. Attributes: project (string): The name of the cloud project that topics belong to. page_size (int): Maximum number of topics to return. page_token (string): The value returned by the last ``ListTopicsResponse``; indicates that this is a continuation of a prior ``ListTopics`` call, and that the system should return the next page of data. """ pass
[docs]class ListTopicsResponse(object): """ Response for the ``ListTopics`` method. Attributes: topics (list[:class:`google.pubsub.v1.pubsub_pb2.Topic`]): The resulting topics. next_page_token (string): If not empty, indicates that there may be more topics that match the request; this value should be passed in a new ``ListTopicsRequest``. """ pass
[docs]class ListTopicSubscriptionsRequest(object): """ Request for the ``ListTopicSubscriptions`` method. Attributes: topic (string): The name of the topic that subscriptions are attached to. page_size (int): Maximum number of subscription names to return. page_token (string): The value returned by the last ``ListTopicSubscriptionsResponse``; indicates that this is a continuation of a prior ``ListTopicSubscriptions`` call, and that the system should return the next page of data. """ pass
[docs]class ListTopicSubscriptionsResponse(object): """ Response for the ``ListTopicSubscriptions`` method. Attributes: subscriptions (list[string]): The names of the subscriptions that match the request. next_page_token (string): If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ``ListTopicSubscriptionsRequest`` to get more subscriptions. """ pass
[docs]class DeleteTopicRequest(object): """ Request for the ``DeleteTopic`` method. Attributes: topic (string): Name of the topic to delete. """ pass
[docs]class Subscription(object): """ A subscription resource. Attributes: name (string): The name of the subscription. It must have the format ``"projects/{project}/subscriptions/{subscription}"``. ``{subscription}`` must start with a letter, and contain only letters (``[A-Za-z]``), numbers (``[0-9]``), dashes (``-``), underscores (``_``), periods (``.``), tildes (``~``), plus (``+``) or percent signs (``%``). It must be between 3 and 255 characters in length, and it must not start with ``"goog"``. topic (string): The name of the topic from which this subscription is receiving messages. The value of this field will be ``_deleted-topic_`` if the topic has been deleted. push_config (:class:`google.pubsub.v1.pubsub_pb2.PushConfig`): If push delivery is used with this subscription, this field is used to configure it. An empty ``pushConfig`` signifies that the subscriber will pull and ack messages using API methods. ack_deadline_seconds (int): This value is the maximum time after a subscriber receives a message before the subscriber should acknowledge the message. After message delivery but before the ack deadline expires and before the message is acknowledged, it is an outstanding message and will not be delivered again during that time (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call ``ModifyAckDeadline`` with the corresponding ``ack_id`` if using pull. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message. If this parameter is not set, the default value of 10 seconds is used. """ pass
[docs]class PushConfig(object): """ Configuration for a push delivery endpoint. Attributes: push_endpoint (string): A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use "https://example.com/push". attributes (dict[string -> :class:`google.pubsub.v1.pubsub_pb2.PushConfig.AttributesEntry`]): Endpoint configuration attributes. Every endpoint has a set of API supported attributes that can be used to control different aspects of the message delivery. The currently supported attribute is ``x-goog-version``, which you can use to change the format of the push message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the envelope (i.e. its fields and metadata). The endpoint version is based on the version of the Pub/Sub API. If not present during the ``CreateSubscription`` call, it will default to the version of the API used to make such call. If not present during a ``ModifyPushConfig`` call, its value will not be changed. ``GetSubscription`` calls will always return a valid version, even if the subscription was created without this attribute. The possible values for this attribute are: * ``v1beta1``: uses the push format defined in the v1beta1 Pub/Sub API. * ``v1`` or ``v1beta2``: uses the push format defined in the v1 Pub/Sub API. """ pass
[docs]class ReceivedMessage(object): """ A message and its corresponding acknowledgment ID. Attributes: ack_id (string): This ID can be used to acknowledge the received message. message (:class:`google.pubsub.v1.pubsub_pb2.PubsubMessage`): The message. """ pass
[docs]class GetSubscriptionRequest(object): """ Request for the GetSubscription method. Attributes: subscription (string): The name of the subscription to get. """ pass
[docs]class ListSubscriptionsRequest(object): """ Request for the ``ListSubscriptions`` method. Attributes: project (string): The name of the cloud project that subscriptions belong to. page_size (int): Maximum number of subscriptions to return. page_token (string): The value returned by the last ``ListSubscriptionsResponse``; indicates that this is a continuation of a prior ``ListSubscriptions`` call, and that the system should return the next page of data. """ pass
[docs]class ListSubscriptionsResponse(object): """ Response for the ``ListSubscriptions`` method. Attributes: subscriptions (list[:class:`google.pubsub.v1.pubsub_pb2.Subscription`]): The subscriptions that match the request. next_page_token (string): If not empty, indicates that there may be more subscriptions that match the request; this value should be passed in a new ``ListSubscriptionsRequest`` to get more subscriptions. """ pass
[docs]class DeleteSubscriptionRequest(object): """ Request for the DeleteSubscription method. Attributes: subscription (string): The subscription to delete. """ pass
[docs]class ModifyPushConfigRequest(object): """ Request for the ModifyPushConfig method. Attributes: subscription (string): The name of the subscription. push_config (:class:`google.pubsub.v1.pubsub_pb2.PushConfig`): The push configuration for future deliveries. An empty ``pushConfig`` indicates that the Pub/Sub system should stop pushing messages from the given subscription and allow messages to be pulled and acknowledged - effectively pausing the subscription if ``Pull`` is not called. """ pass
[docs]class PullRequest(object): """ Request for the ``Pull`` method. Attributes: subscription (string): The subscription from which messages should be pulled. return_immediately (bool): If this is specified as true the system will respond immediately even if it is not able to return a message in the ``Pull`` response. Otherwise the system is allowed to wait 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. max_messages (int): The maximum number of messages returned for this request. The Pub/Sub system may return fewer than the number specified. """ pass
[docs]class PullResponse(object): """ Response for the ``Pull`` method. Attributes: received_messages (list[:class:`google.pubsub.v1.pubsub_pb2.ReceivedMessage`]): 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. """ pass
[docs]class ModifyAckDeadlineRequest(object): """ Request for the ModifyAckDeadline method. Attributes: subscription (string): The name of the subscription. ack_ids (list[string]): List of acknowledgment IDs. ack_deadline_seconds (int): The new ack deadline with respect to the time this request was sent to the Pub/Sub system. Must be >= 0. For example, if the value is 10, the new ack deadline will expire 10 seconds after the ``ModifyAckDeadline`` call was made. Specifying zero may immediately make the message available for another pull request. """ pass
[docs]class AcknowledgeRequest(object): """ Request for the Acknowledge method. Attributes: subscription (string): The subscription whose message is being acknowledged. ack_ids (list[string]): The acknowledgment ID for the messages being acknowledged that was returned by the Pub/Sub system in the ``Pull`` response. Must not be empty. """ pass