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, newMessageScopedGeneratedExtension
equals, findInitializationErrors, getInitializationErrorString, hashCode, toString
toByteArray, toByteString, writeDelimitedTo, writeTo
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof
toByteArray, toByteString, writeDelimitedTo, writeTo
public 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()
MessageOrBuilder
UnknownFieldSet
for this message.getUnknownFields
in interface MessageOrBuilder
getUnknownFields
in class GeneratedMessage
public 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 SubscriptionOrBuilder
public 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 SubscriptionOrBuilder
public java.lang.String getTopic()
The name of the topic from which this subscription is receiving messages.
getTopic
in interface SubscriptionOrBuilder
public ByteString getTopicBytes()
The name of the topic from which this subscription is receiving messages.
getTopicBytes
in interface SubscriptionOrBuilder
public 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 SubscriptionOrBuilder
public 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 SubscriptionOrBuilder
public 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 SubscriptionOrBuilder
public 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 SubscriptionOrBuilder
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage
public void writeTo(CodedOutputStream output) throws java.io.IOException
MessageLite
output
. This does not
flush or close the stream.writeTo
in interface MessageLite
writeTo
in class GeneratedMessage
java.io.IOException
public int getSerializedSize()
MessageLite
getSerializedSize
in interface MessageLite
getSerializedSize
in class GeneratedMessage
public static Subscription parseFrom(ByteString data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Subscription parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Subscription parseFrom(byte[] data) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Subscription parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) throws InvalidProtocolBufferException
InvalidProtocolBufferException
public static Subscription parseFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Subscription parseFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Subscription parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException
java.io.IOException
public static Subscription parseDelimitedFrom(java.io.InputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public static Subscription parseFrom(CodedInputStream input) throws java.io.IOException
java.io.IOException
public static Subscription parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
java.io.IOException
public Subscription.Builder newBuilderForType()
MessageLite
newBuilderForType
in interface Message
newBuilderForType
in interface MessageLite
public static Subscription.Builder newBuilder()
public static Subscription.Builder newBuilder(Subscription prototype)
public Subscription.Builder toBuilder()
MessageLite
toBuilder
in interface Message
toBuilder
in interface MessageLite
public static Subscription getDefaultInstance()
public static Parser<Subscription> parser()
public Parser<Subscription> getParserForType()
MessageLite
getParserForType
in interface Message
getParserForType
in interface MessageLite
getParserForType
in class GeneratedMessage
public Subscription getDefaultInstanceForType()
MessageLiteOrBuilder
getDefaultInstance()
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 MessageLiteOrBuilder
getDefaultInstanceForType
in interface MessageOrBuilder