public final class Subscription extends GenericJson
This is the Java data model class that specifies how to parse/serialize into the JSON that is transmitted over HTTP when working with the Cloud Pub/Sub API. For a detailed explanation see: https://developers.google.com/api-client-library/java/google-http-java-client/json
GenericData.FlagsAbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>| Constructor and Description |
|---|
Subscription() |
| Modifier and Type | Method and Description |
|---|---|
Subscription |
clone() |
Integer |
getAckDeadlineSeconds()
The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to
acknowledge receipt before resending the message.
|
BigQueryConfig |
getBigqueryConfig()
If delivery to BigQuery is used with this subscription, this field is used to configure it.
|
DeadLetterPolicy |
getDeadLetterPolicy()
A policy that specifies the conditions for dead lettering messages in this subscription.
|
Boolean |
getDetached()
Indicates whether the subscription is detached from its topic.
|
Boolean |
getEnableExactlyOnceDelivery()
If true, Pub/Sub provides the following guarantees for the delivery of a message with a given
value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed
not to be resent before the message's acknowledgement deadline expires.
|
Boolean |
getEnableMessageOrdering()
If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered
to the subscribers in the order in which they are received by the Pub/Sub system.
|
ExpirationPolicy |
getExpirationPolicy()
A policy that specifies the conditions for this subscription's expiration.
|
String |
getFilter()
An expression written in the Pub/Sub [filter
language](https://cloud.google.com/pubsub/docs/filtering).
|
Map<String,String> |
getLabels()
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
|
String |
getMessageRetentionDuration()
How long to retain unacknowledged messages in the subscription's backlog, from the moment a
message is published.
|
String |
getName()
Required.
|
PushConfig |
getPushConfig()
If push delivery is used with this subscription, this field is used to configure it.
|
Boolean |
getRetainAckedMessages()
Indicates whether to retain acknowledged messages.
|
RetryPolicy |
getRetryPolicy()
A policy that specifies how Pub/Sub retries message delivery for this subscription.
|
String |
getState()
Output only.
|
String |
getTopic()
Required.
|
String |
getTopicMessageRetentionDuration()
Output only.
|
Subscription |
set(String fieldName,
Object value) |
Subscription |
setAckDeadlineSeconds(Integer ackDeadlineSeconds)
The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to
acknowledge receipt before resending the message.
|
Subscription |
setBigqueryConfig(BigQueryConfig bigqueryConfig)
If delivery to BigQuery is used with this subscription, this field is used to configure it.
|
Subscription |
setDeadLetterPolicy(DeadLetterPolicy deadLetterPolicy)
A policy that specifies the conditions for dead lettering messages in this subscription.
|
Subscription |
setDetached(Boolean detached)
Indicates whether the subscription is detached from its topic.
|
Subscription |
setEnableExactlyOnceDelivery(Boolean enableExactlyOnceDelivery)
If true, Pub/Sub provides the following guarantees for the delivery of a message with a given
value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed
not to be resent before the message's acknowledgement deadline expires.
|
Subscription |
setEnableMessageOrdering(Boolean enableMessageOrdering)
If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered
to the subscribers in the order in which they are received by the Pub/Sub system.
|
Subscription |
setExpirationPolicy(ExpirationPolicy expirationPolicy)
A policy that specifies the conditions for this subscription's expiration.
|
Subscription |
setFilter(String filter)
An expression written in the Pub/Sub [filter
language](https://cloud.google.com/pubsub/docs/filtering).
|
Subscription |
setLabels(Map<String,String> labels)
See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).
|
Subscription |
setMessageRetentionDuration(String messageRetentionDuration)
How long to retain unacknowledged messages in the subscription's backlog, from the moment a
message is published.
|
Subscription |
setName(String name)
Required.
|
Subscription |
setPushConfig(PushConfig pushConfig)
If push delivery is used with this subscription, this field is used to configure it.
|
Subscription |
setRetainAckedMessages(Boolean retainAckedMessages)
Indicates whether to retain acknowledged messages.
|
Subscription |
setRetryPolicy(RetryPolicy retryPolicy)
A policy that specifies how Pub/Sub retries message delivery for this subscription.
|
Subscription |
setState(String state)
Output only.
|
Subscription |
setTopic(String topic)
Required.
|
Subscription |
setTopicMessageRetentionDuration(String topicMessageRetentionDuration)
Output only.
|
getFactory, setFactory, toPrettyString, toStringentrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeysclear, containsKey, containsValue, isEmpty, keySet, size, valuesfinalize, getClass, notify, notifyAll, wait, wait, waitcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAllpublic Integer getAckDeadlineSeconds()
null for nonepublic Subscription setAckDeadlineSeconds(Integer ackDeadlineSeconds)
ackDeadlineSeconds - ackDeadlineSeconds or null for nonepublic BigQueryConfig getBigqueryConfig()
null for nonepublic Subscription setBigqueryConfig(BigQueryConfig bigqueryConfig)
bigqueryConfig - bigqueryConfig or null for nonepublic DeadLetterPolicy getDeadLetterPolicy()
null for nonepublic Subscription setDeadLetterPolicy(DeadLetterPolicy deadLetterPolicy)
deadLetterPolicy - deadLetterPolicy or null for nonepublic Boolean getDetached()
null for nonepublic Subscription setDetached(Boolean detached)
detached - detached or null for nonepublic Boolean getEnableExactlyOnceDelivery()
null for nonepublic Subscription setEnableExactlyOnceDelivery(Boolean enableExactlyOnceDelivery)
enableExactlyOnceDelivery - enableExactlyOnceDelivery or null for nonepublic Boolean getEnableMessageOrdering()
null for nonepublic Subscription setEnableMessageOrdering(Boolean enableMessageOrdering)
enableMessageOrdering - enableMessageOrdering or null for nonepublic ExpirationPolicy getExpirationPolicy()
null for nonepublic Subscription setExpirationPolicy(ExpirationPolicy expirationPolicy)
expirationPolicy - expirationPolicy or null for nonepublic String getFilter()
null for nonepublic Subscription setFilter(String filter)
filter - filter or null for nonepublic Map<String,String> getLabels()
null for nonepublic Subscription setLabels(Map<String,String> labels)
labels - labels or null for nonepublic String getMessageRetentionDuration()
null for nonepublic Subscription setMessageRetentionDuration(String messageRetentionDuration)
messageRetentionDuration - messageRetentionDuration or null for nonepublic String getName()
null for nonepublic Subscription setName(String name)
name - name or null for nonepublic PushConfig getPushConfig()
null for nonepublic Subscription setPushConfig(PushConfig pushConfig)
pushConfig - pushConfig or null for nonepublic Boolean getRetainAckedMessages()
null for nonepublic Subscription setRetainAckedMessages(Boolean retainAckedMessages)
retainAckedMessages - retainAckedMessages or null for nonepublic RetryPolicy getRetryPolicy()
null for nonepublic Subscription setRetryPolicy(RetryPolicy retryPolicy)
retryPolicy - retryPolicy or null for nonepublic String getState()
null for nonepublic Subscription setState(String state)
state - state or null for nonepublic String getTopic()
null for nonepublic Subscription setTopic(String topic)
topic - topic or null for nonepublic String getTopicMessageRetentionDuration()
null for nonepublic Subscription setTopicMessageRetentionDuration(String topicMessageRetentionDuration)
topicMessageRetentionDuration - topicMessageRetentionDuration or null for nonepublic Subscription set(String fieldName, Object value)
set in class GenericJsonpublic Subscription clone()
clone in class GenericJsonCopyright © 2011–2022 Google. All rights reserved.