public final class Subscription extends GeneratedMessage implements SubscriptionOrBuilder
google.pubsub.v1.Subscription
A subscription resource.
| Modifier and Type | Class and Description |
|---|---|
static class |
Subscription.Builder
Protobuf type
google.pubsub.v1.Subscription |
GeneratedMessage.ExtendableBuilder<MessageType extends GeneratedMessage.ExtendableMessage,BuilderType extends GeneratedMessage.ExtendableBuilder>, GeneratedMessage.ExtendableMessage<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.ExtendableMessageOrBuilder<MessageType extends GeneratedMessage.ExtendableMessage>, GeneratedMessage.FieldAccessorTable, GeneratedMessage.GeneratedExtension<ContainingType extends Message,Type>| Modifier and Type | Field and Description |
|---|---|
static int |
ACK_DEADLINE_SECONDS_FIELD_NUMBER |
static int |
NAME_FIELD_NUMBER |
static int |
PUSH_CONFIG_FIELD_NUMBER |
static int |
TOPIC_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
int |
getAckDeadlineSeconds()
This value is the maximum time after a subscriber receives a message
before the subscriber should acknowledge the message.
|
static Subscription |
getDefaultInstance() |
Subscription |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
java.lang.String |
getName()
The name of the subscription.
|
ByteString |
getNameBytes()
The name of the subscription.
|
Parser<Subscription> |
getParserForType()
Gets the parser for a message of the same type as this message.
|
PushConfig |
getPushConfig()
If push delivery is used with this subscription, this field is
used to configure it.
|
PushConfigOrBuilder |
getPushConfigOrBuilder()
If push delivery is used with this subscription, this field is
used to configure it.
|
int |
getSerializedSize()
Get the number of bytes required to encode this message.
|
java.lang.String |
getTopic()
The name of the topic from which this subscription is receiving messages.
|
ByteString |
getTopicBytes()
The name of the topic from which this subscription is receiving messages.
|
UnknownFieldSet |
getUnknownFields()
Get the
UnknownFieldSet for this message. |
boolean |
hasPushConfig()
If push delivery is used with this subscription, this field is
used to configure it.
|
boolean |
isInitialized()
Returns true if all required fields in the message and all embedded
messages are set, false otherwise.
|
static Subscription.Builder |
newBuilder() |
static Subscription.Builder |
newBuilder(Subscription prototype) |
Subscription.Builder |
newBuilderForType()
Constructs a new builder for a message of the same type as this message.
|
static Subscription |
parseDelimitedFrom(java.io.InputStream input) |
static Subscription |
parseDelimitedFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Subscription |
parseFrom(byte[] data) |
static Subscription |
parseFrom(byte[] data,
ExtensionRegistryLite extensionRegistry) |
static Subscription |
parseFrom(ByteString data) |
static Subscription |
parseFrom(ByteString data,
ExtensionRegistryLite extensionRegistry) |
static Subscription |
parseFrom(CodedInputStream input) |
static Subscription |
parseFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry) |
static Subscription |
parseFrom(java.io.InputStream input) |
static Subscription |
parseFrom(java.io.InputStream input,
ExtensionRegistryLite extensionRegistry) |
static Parser<Subscription> |
parser() |
Subscription.Builder |
toBuilder()
Constructs a builder initialized with the current message.
|
void |
writeTo(CodedOutputStream output)
Serializes the message and writes it to
output. |
getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, newFileScopedGeneratedExtension, newFileScopedGeneratedExtension, newMessageScopedGeneratedExtension, newMessageScopedGeneratedExtensionequals, findInitializationErrors, getInitializationErrorString, hashCode, toStringtoByteArray, toByteString, writeDelimitedTo, writeTofindInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneoftoByteArray, toByteString, writeDelimitedTo, writeTopublic static final int NAME_FIELD_NUMBER
public static final int TOPIC_FIELD_NUMBER
public static final int PUSH_CONFIG_FIELD_NUMBER
public static final int ACK_DEADLINE_SECONDS_FIELD_NUMBER
public final UnknownFieldSet getUnknownFields()
MessageOrBuilderUnknownFieldSet for this message.getUnknownFields in interface MessageOrBuildergetUnknownFields in class GeneratedMessagepublic static final Descriptors.Descriptor getDescriptor()
public java.lang.String getName()
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"`.
getName in interface SubscriptionOrBuilderpublic ByteString getNameBytes()
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"`.
getNameBytes in interface SubscriptionOrBuilderpublic java.lang.String getTopic()
The name of the topic from which this subscription is receiving messages.
getTopic in interface SubscriptionOrBuilderpublic ByteString getTopicBytes()
The name of the topic from which this subscription is receiving messages.
getTopicBytes in interface SubscriptionOrBuilderpublic boolean hasPushConfig()
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.
hasPushConfig in interface SubscriptionOrBuilderpublic PushConfig getPushConfig()
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.
getPushConfig in interface SubscriptionOrBuilderpublic PushConfigOrBuilder getPushConfigOrBuilder()
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.
getPushConfigOrBuilder in interface SubscriptionOrBuilderpublic int getAckDeadlineSeconds()
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.
getAckDeadlineSeconds in interface SubscriptionOrBuilderpublic final boolean isInitialized()
MessageLiteOrBuilderisInitialized in interface MessageLiteOrBuilderisInitialized in class GeneratedMessagepublic void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLiteoutput. This does not
flush or close the stream.writeTo in interface MessageLitewriteTo in class GeneratedMessagejava.io.IOExceptionpublic int getSerializedSize()
MessageLitegetSerializedSize in interface MessageLitegetSerializedSize in class GeneratedMessagepublic static Subscription parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Subscription parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Subscription parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Subscription parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferExceptionpublic static Subscription parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Subscription parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Subscription parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Subscription parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic static Subscription parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOExceptionpublic static Subscription parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOExceptionpublic Subscription.Builder newBuilderForType()
MessageLitenewBuilderForType in interface MessagenewBuilderForType in interface MessageLitepublic static Subscription.Builder newBuilder()
public static Subscription.Builder newBuilder(Subscription prototype)
public Subscription.Builder toBuilder()
MessageLitetoBuilder in interface MessagetoBuilder in interface MessageLitepublic static Subscription getDefaultInstance()
public static Parser<Subscription> parser()
public Parser<Subscription> getParserForType()
MessageLitegetParserForType in interface MessagegetParserForType in interface MessageLitegetParserForType in class GeneratedMessagepublic Subscription getDefaultInstanceForType()
MessageLiteOrBuildergetDefaultInstance() method of generated message classes in that
this method is an abstract method of the MessageLite interface
whereas getDefaultInstance() is a static method of a specific
class. They return the same thing.getDefaultInstanceForType in interface MessageLiteOrBuildergetDefaultInstanceForType in interface MessageOrBuilder