public static final class PubsubTarget.Builder extends GeneratedMessageV3.Builder<PubsubTarget.Builder> implements PubsubTargetOrBuilder
Pub/Sub target. The job will be delivered by publishing a message to
the given Pub/Sub topic.
Protobuf type google.cloud.scheduler.v1.PubsubTarget
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public PubsubTarget.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
build()
public PubsubTarget build()
Returns
buildPartial()
public PubsubTarget buildPartial()
Returns
clear()
public PubsubTarget.Builder clear()
Returns
Overrides
clearAttributes()
public PubsubTarget.Builder clearAttributes()
Returns
clearData()
public PubsubTarget.Builder clearData()
The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
bytes data = 3;
Returns
clearField(Descriptors.FieldDescriptor field)
public PubsubTarget.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public PubsubTarget.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
clearTopicName()
public PubsubTarget.Builder clearTopicName()
Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
string topic_name = 1 [(.google.api.resource_reference) = { ... }
Returns
clone()
public PubsubTarget.Builder clone()
Returns
Overrides
containsAttributes(String key)
public boolean containsAttributes(String key)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameter
Returns
getAttributes()
public Map<String,String> getAttributes()
Returns
getAttributesCount()
public int getAttributesCount()
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Returns
getAttributesMap()
public Map<String,String> getAttributesMap()
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Returns
getAttributesOrDefault(String key, String defaultValue)
public String getAttributesOrDefault(String key, String defaultValue)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameters
Returns
getAttributesOrThrow(String key)
public String getAttributesOrThrow(String key)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameter
Returns
getData()
public ByteString getData()
The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
bytes data = 3;
Returns
getDefaultInstanceForType()
public PubsubTarget getDefaultInstanceForType()
Returns
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
getMutableAttributes()
public Map<String,String> getMutableAttributes()
Use alternate mutation accessors instead.
Returns
getTopicName()
public String getTopicName()
Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
string topic_name = 1 [(.google.api.resource_reference) = { ... }
Returns
Type | Description |
String | The topicName.
|
getTopicNameBytes()
public ByteString getTopicNameBytes()
Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
string topic_name = 1 [(.google.api.resource_reference) = { ... }
Returns
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Parameter
Returns
Overrides
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Parameter
Returns
Overrides
isInitialized()
public final boolean isInitialized()
Returns
Overrides
mergeFrom(PubsubTarget other)
public PubsubTarget.Builder mergeFrom(PubsubTarget other)
Parameter
Returns
public PubsubTarget.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public PubsubTarget.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final PubsubTarget.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
putAllAttributes(Map<String,String> values)
public PubsubTarget.Builder putAllAttributes(Map<String,String> values)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameter
Returns
putAttributes(String key, String value)
public PubsubTarget.Builder putAttributes(String key, String value)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameters
Returns
removeAttributes(String key)
public PubsubTarget.Builder removeAttributes(String key)
Attributes for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
map<string, string> attributes = 4;
Parameter
Returns
setData(ByteString value)
public PubsubTarget.Builder setData(ByteString value)
The message payload for PubsubMessage.
Pubsub message must contain either non-empty data, or at least one
attribute.
bytes data = 3;
Parameter
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public PubsubTarget.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public PubsubTarget.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
setTopicName(String value)
public PubsubTarget.Builder setTopicName(String value)
Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
string topic_name = 1 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | String
The topicName to set.
|
Returns
setTopicNameBytes(ByteString value)
public PubsubTarget.Builder setTopicNameBytes(ByteString value)
Required. The name of the Cloud Pub/Sub topic to which messages will
be published when a job is delivered. The topic name must be in the
same format as required by PubSub's
PublishRequest.name,
for example projects/PROJECT_ID/topics/TOPIC_ID
.
The topic must be in the same project as the Cloud Scheduler job.
string topic_name = 1 [(.google.api.resource_reference) = { ... }
Parameter
Name | Description |
value | ByteString
The bytes for topicName to set.
|
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final PubsubTarget.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides