public static final class Subscription.Builder extends GeneratedMessage.Builder<Subscription.Builder> implements SubscriptionOrBuilder
google.pubsub.v1.Subscription
A subscription resource.
Modifier and Type | Method and Description |
---|---|
Subscription |
build()
Constructs the message based on the state of the Builder.
|
Subscription |
buildPartial()
Like
MessageLite.Builder.build() , but does not throw an exception if the message
is missing required fields. |
Subscription.Builder |
clear()
Called by the initialization and clear code paths to allow subclasses to
reset any of their builtin fields back to the initial values.
|
Subscription.Builder |
clearAckDeadlineSeconds()
This value is the maximum time after a subscriber receives a message
before the subscriber should acknowledge the message.
|
Subscription.Builder |
clearName()
The name of the subscription.
|
Subscription.Builder |
clearPushConfig()
If push delivery is used with this subscription, this field is
used to configure it.
|
Subscription.Builder |
clearTopic()
The name of the topic from which this subscription is receiving messages.
|
int |
getAckDeadlineSeconds()
This value is the maximum time after a subscriber receives a message
before the subscriber should acknowledge the message.
|
Subscription |
getDefaultInstanceForType()
Get an instance of the type with no fields set.
|
static Descriptors.Descriptor |
getDescriptor() |
Descriptors.Descriptor |
getDescriptorForType()
Get the message's type's descriptor.
|
java.lang.String |
getName()
The name of the subscription.
|
ByteString |
getNameBytes()
The name of the subscription.
|
PushConfig |
getPushConfig()
If push delivery is used with this subscription, this field is
used to configure it.
|
PushConfig.Builder |
getPushConfigBuilder()
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.
|
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.
|
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.
|
Subscription.Builder |
mergeFrom(CodedInputStream input,
ExtensionRegistryLite extensionRegistry)
Like
MessageLite.Builder.mergeFrom(CodedInputStream) , but also
parses extensions. |
Subscription.Builder |
mergeFrom(Message other)
Merge
other into the message being built. |
Subscription.Builder |
mergeFrom(Subscription other) |
Subscription.Builder |
mergePushConfig(PushConfig value)
If push delivery is used with this subscription, this field is
used to configure it.
|
Subscription.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
Merge some unknown fields into the
UnknownFieldSet for this
message. |
Subscription.Builder |
setAckDeadlineSeconds(int value)
This value is the maximum time after a subscriber receives a message
before the subscriber should acknowledge the message.
|
Subscription.Builder |
setName(java.lang.String value)
The name of the subscription.
|
Subscription.Builder |
setNameBytes(ByteString value)
The name of the subscription.
|
Subscription.Builder |
setPushConfig(PushConfig.Builder builderForValue)
If push delivery is used with this subscription, this field is
used to configure it.
|
Subscription.Builder |
setPushConfig(PushConfig value)
If push delivery is used with this subscription, this field is
used to configure it.
|
Subscription.Builder |
setTopic(java.lang.String value)
The name of the topic from which this subscription is receiving messages.
|
Subscription.Builder |
setTopicBytes(ByteString value)
The name of the topic from which this subscription is receiving messages.
|
Subscription.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
Set the
UnknownFieldSet for this message. |
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, newBuilderForField, setField, setRepeatedField
findInitializationErrors, getInitializationErrorString, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
public static final Descriptors.Descriptor getDescriptor()
public Subscription.Builder clear()
GeneratedMessage.Builder
clear
in interface Message.Builder
clear
in interface MessageLite.Builder
clear
in class GeneratedMessage.Builder<Subscription.Builder>
public Descriptors.Descriptor getDescriptorForType()
Message.Builder
MessageOrBuilder.getDescriptorForType()
.getDescriptorForType
in interface Message.Builder
getDescriptorForType
in interface MessageOrBuilder
getDescriptorForType
in class GeneratedMessage.Builder<Subscription.Builder>
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
public Subscription build()
MessageLite.Builder
build
in interface Message.Builder
build
in interface MessageLite.Builder
public Subscription buildPartial()
MessageLite.Builder
MessageLite.Builder.build()
, but does not throw an exception if the message
is missing required fields. Instead, a partial message is returned.
Subsequent changes to the Builder will not affect the returned message.buildPartial
in interface Message.Builder
buildPartial
in interface MessageLite.Builder
public Subscription.Builder mergeFrom(Message other)
Message.Builder
other
into the message being built. other
must
have the exact same type as this
(i.e.
getDescriptorForType() == other.getDescriptorForType()
).
Merging occurs as follows. For each field:other
,
then other
's value overwrites the value in this message.other
,
it is merged into the corresponding sub-message of this message
using the same merging rules.other
are concatenated
with the elements in this message.
* For oneof groups, if the other message has one of the fields set,
the group of this message is cleared and replaced by the field
of the other message, so that the oneof constraint is preserved.
This is equivalent to the Message::MergeFrom
method in C++.mergeFrom
in interface Message.Builder
mergeFrom
in class AbstractMessage.Builder<Subscription.Builder>
public Subscription.Builder mergeFrom(Subscription other)
public final boolean isInitialized()
MessageLiteOrBuilder
isInitialized
in interface MessageLiteOrBuilder
isInitialized
in class GeneratedMessage.Builder<Subscription.Builder>
public Subscription.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry) throws java.io.IOException
MessageLite.Builder
MessageLite.Builder.mergeFrom(CodedInputStream)
, but also
parses extensions. The extensions that you want to be able to parse
must be registered in extensionRegistry
. Extensions not in
the registry will be treated as unknown fields.mergeFrom
in interface Message.Builder
mergeFrom
in interface MessageLite.Builder
mergeFrom
in class AbstractMessage.Builder<Subscription.Builder>
java.io.IOException
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 Subscription.Builder setName(java.lang.String value)
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"`.
public Subscription.Builder clearName()
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"`.
public Subscription.Builder setNameBytes(ByteString value)
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"`.
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 Subscription.Builder setTopic(java.lang.String value)
The name of the topic from which this subscription is receiving messages.
public Subscription.Builder clearTopic()
The name of the topic from which this subscription is receiving messages.
public Subscription.Builder setTopicBytes(ByteString value)
The name of the topic from which this subscription is receiving messages.
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 Subscription.Builder setPushConfig(PushConfig value)
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.
public Subscription.Builder setPushConfig(PushConfig.Builder builderForValue)
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.
public Subscription.Builder mergePushConfig(PushConfig value)
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.
public Subscription.Builder clearPushConfig()
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.
public PushConfig.Builder getPushConfigBuilder()
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.
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 Subscription.Builder setAckDeadlineSeconds(int value)
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.
public Subscription.Builder clearAckDeadlineSeconds()
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.
public final Subscription.Builder setUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this message.setUnknownFields
in interface Message.Builder
setUnknownFields
in class GeneratedMessage.Builder<Subscription.Builder>
public final Subscription.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Message.Builder
UnknownFieldSet
for this
message.mergeUnknownFields
in interface Message.Builder
mergeUnknownFields
in class GeneratedMessage.Builder<Subscription.Builder>