google.pubsub.v1.pubsub_pb2

Classes

AcknowledgeRequest Request for the Acknowledge method.
DeleteSubscriptionRequest Request for the DeleteSubscription method.
DeleteTopicRequest Request for the DeleteTopic method.
GetSubscriptionRequest Request for the GetSubscription method.
GetTopicRequest Request for the GetTopic method.
ListSubscriptionsRequest Request for the ListSubscriptions method.
ListSubscriptionsResponse Response for the ListSubscriptions method.
ListTopicSubscriptionsRequest Request for the ListTopicSubscriptions method.
ListTopicSubscriptionsResponse Response for the ListTopicSubscriptions method.
ListTopicsRequest Request for the ListTopics method.
ListTopicsResponse Response for the ListTopics method.
ModifyAckDeadlineRequest Request for the ModifyAckDeadline method.
ModifyPushConfigRequest Request for the ModifyPushConfig method.
PublishRequest Request for the Publish method.
PublishResponse Response for the Publish method.
PubsubMessage A message data and its attributes.
PullRequest Request for the Pull method.
PullResponse Response for the Pull method.
PushConfig Configuration for a push delivery endpoint.
ReceivedMessage A message and its corresponding acknowledgment ID.
Subscription A subscription resource.
Topic A topic resource.
class google.pubsub.v1.pubsub_pb2.AcknowledgeRequest[source]

Request for the Acknowledge method.

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.

class google.pubsub.v1.pubsub_pb2.DeleteSubscriptionRequest[source]

Request for the DeleteSubscription method.

subscription

string – The subscription to delete.

class google.pubsub.v1.pubsub_pb2.DeleteTopicRequest[source]

Request for the DeleteTopic method.

topic

string – Name of the topic to delete.

class google.pubsub.v1.pubsub_pb2.GetSubscriptionRequest[source]

Request for the GetSubscription method.

subscription

string – The name of the subscription to get.

class google.pubsub.v1.pubsub_pb2.GetTopicRequest[source]

Request for the GetTopic method.

topic

string – The name of the topic to get.

class google.pubsub.v1.pubsub_pb2.ListSubscriptionsRequest[source]

Request for the ListSubscriptions method.

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.

class google.pubsub.v1.pubsub_pb2.ListSubscriptionsResponse[source]

Response for the ListSubscriptions method.

subscriptions

list[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.

class google.pubsub.v1.pubsub_pb2.ListTopicSubscriptionsRequest[source]

Request for the ListTopicSubscriptions method.

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.

class google.pubsub.v1.pubsub_pb2.ListTopicSubscriptionsResponse[source]

Response for the ListTopicSubscriptions method.

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.

class google.pubsub.v1.pubsub_pb2.ListTopicsRequest[source]

Request for the ListTopics method.

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.

class google.pubsub.v1.pubsub_pb2.ListTopicsResponse[source]

Response for the ListTopics method.

topics

list[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.

class google.pubsub.v1.pubsub_pb2.ModifyAckDeadlineRequest[source]

Request for the ModifyAckDeadline method.

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.

class google.pubsub.v1.pubsub_pb2.ModifyPushConfigRequest[source]

Request for the ModifyPushConfig method.

subscription

string – The name of the subscription.

push_config

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.

class google.pubsub.v1.pubsub_pb2.PublishRequest[source]

Request for the Publish method.

topic

string – The messages in the request will be published on this topic.

messages

list[google.pubsub.v1.pubsub_pb2.PubsubMessage] – The messages to publish.

class google.pubsub.v1.pubsub_pb2.PublishResponse[source]

Response for the Publish method.

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.

class google.pubsub.v1.pubsub_pb2.PubsubMessage[source]

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.

data

bytes – The message payload. For JSON requests, the value of this field must be base64-encoded.

attributes

dict[string -> 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

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.

class google.pubsub.v1.pubsub_pb2.PullRequest[source]

Request for the Pull method.

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.

class google.pubsub.v1.pubsub_pb2.PullResponse[source]

Response for the Pull method.

received_messages

list[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.

class google.pubsub.v1.pubsub_pb2.PushConfig[source]

Configuration for a push delivery endpoint.

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 -> 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.
class google.pubsub.v1.pubsub_pb2.ReceivedMessage[source]

A message and its corresponding acknowledgment ID.

ack_id

string – This ID can be used to acknowledge the received message.

message

google.pubsub.v1.pubsub_pb2.PubsubMessage – The message.

class google.pubsub.v1.pubsub_pb2.Subscription[source]

A subscription resource.

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

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.

class google.pubsub.v1.pubsub_pb2.Topic[source]

A topic resource.

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".