Class PubsubTarget (2.52.0)

publicfinalclass PubsubTargetextendsGeneratedMessageV3implementsPubsubTargetOrBuilder

Pub/Sub target. The job will be delivered by publishing a message to the given Pub/Sub topic.

Protobuf type google.cloud.scheduler.v1beta1.PubsubTarget

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

ATTRIBUTES_FIELD_NUMBER

publicstaticfinalintATTRIBUTES_FIELD_NUMBER
Field Value
Type Description
int

DATA_FIELD_NUMBER

publicstaticfinalintDATA_FIELD_NUMBER
Field Value
Type Description
int

TOPIC_NAME_FIELD_NUMBER

publicstaticfinalintTOPIC_NAME_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticPubsubTargetgetDefaultInstance()
Returns
Type Description
PubsubTarget

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticPubsubTarget.BuildernewBuilder()
Returns
Type Description
PubsubTarget.Builder

newBuilder(PubsubTarget prototype)

publicstaticPubsubTarget.BuildernewBuilder(PubsubTargetprototype)
Parameter
Name Description
prototype PubsubTarget
Returns
Type Description
PubsubTarget.Builder

parseDelimitedFrom(InputStream input)

publicstaticPubsubTargetparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticPubsubTargetparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticPubsubTargetparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticPubsubTargetparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticPubsubTargetparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticPubsubTargetparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticPubsubTargetparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
PubsubTarget
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<PubsubTarget>parser()
Returns
Type Description
Parser<PubsubTarget>

Methods

containsAttributes(String key)

publicbooleancontainsAttributes(Stringkey)

Attributes for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one attribute.

map<string, string> attributes = 4;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAttributes() (deprecated)

publicMap<String,String>getAttributes()

Use #getAttributesMap() instead.

Returns
Type Description
Map<String,String>

getAttributesCount()

publicintgetAttributesCount()

Attributes for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one attribute.

map<string, string> attributes = 4;

Returns
Type Description
int

getAttributesMap()

publicMap<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
Type Description
Map<String,String>

getAttributesOrDefault(String key, String defaultValue)

publicStringgetAttributesOrDefault(Stringkey,StringdefaultValue)

Attributes for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one attribute.

map<string, string> attributes = 4;

Parameters
Name Description
key String
defaultValue String
Returns
Type Description
String

getAttributesOrThrow(String key)

publicStringgetAttributesOrThrow(Stringkey)

Attributes for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one attribute.

map<string, string> attributes = 4;

Parameter
Name Description
key String
Returns
Type Description
String

getData()

publicByteStringgetData()

The message payload for PubsubMessage.

Pubsub message must contain either non-empty data, or at least one attribute.

bytes data = 3;

Returns
Type Description
ByteString

The data.

getDefaultInstanceForType()

publicPubsubTargetgetDefaultInstanceForType()
Returns
Type Description
PubsubTarget

getParserForType()

publicParser<PubsubTarget>getParserForType()
Returns
Type Description
Parser<PubsubTarget>
Overrides

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

getTopicName()

publicStringgetTopicName()

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 Pub/Sub'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()

publicByteStringgetTopicNameBytes()

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 Pub/Sub'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
ByteString

The bytes for topicName.

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicPubsubTarget.BuildernewBuilderForType()
Returns
Type Description
PubsubTarget.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedPubsubTarget.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
PubsubTarget.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicPubsubTarget.BuildertoBuilder()
Returns
Type Description
PubsubTarget.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025年10月30日 UTC.