Class PubsubTarget.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
com.google.cloud.scheduler.v1.PubsubTarget.Builder
All Implemented Interfaces:
PubsubTargetOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
PubsubTarget

public static final class PubsubTarget.Builder extends com.google.protobuf.GeneratedMessage.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
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • clear

      public PubsubTarget.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • getDefaultInstanceForType

      public PubsubTarget getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public PubsubTarget build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public PubsubTarget buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public PubsubTarget.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubTarget.Builder>
    • mergeFrom

      public PubsubTarget.Builder mergeFrom(PubsubTarget other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<PubsubTarget.Builder>
    • mergeFrom

      public PubsubTarget.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<PubsubTarget.Builder>
      Throws:
      IOException
    • 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 Pub/Sub's
       [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
       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) = { ... }
      Specified by:
      getTopicName in interface PubsubTargetOrBuilder
      Returns:
      The topicName.
    • getTopicNameBytes

      public com.google.protobuf.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 Pub/Sub's
       [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
       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) = { ... }
      Specified by:
      getTopicNameBytes in interface PubsubTargetOrBuilder
      Returns:
      The bytes for topicName.
    • setTopicName

      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 Pub/Sub's
       [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
       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) = { ... }
      Parameters:
      value - The topicName to set.
      Returns:
      This builder for chaining.
    • 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 Pub/Sub's
       [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
       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:
      This builder for chaining.
    • setTopicNameBytes

      public PubsubTarget.Builder setTopicNameBytes(com.google.protobuf.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 Pub/Sub's
       [PublishRequest.name](https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#publishrequest),
       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) = { ... }
      Parameters:
      value - The bytes for topicName to set.
      Returns:
      This builder for chaining.
    • getData

      public com.google.protobuf.ByteString getData()
       The message payload for PubsubMessage.
      
       Pubsub message must contain either non-empty data, or at least one
       attribute.
       
      bytes data = 3;
      Specified by:
      getData in interface PubsubTargetOrBuilder
      Returns:
      The data.
    • setData

      public PubsubTarget.Builder setData(com.google.protobuf.ByteString value)
       The message payload for PubsubMessage.
      
       Pubsub message must contain either non-empty data, or at least one
       attribute.
       
      bytes data = 3;
      Parameters:
      value - The data to set.
      Returns:
      This builder for chaining.
    • 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:
      This builder for chaining.
    • getAttributesCount

      public int getAttributesCount()
      Description copied from interface: PubsubTargetOrBuilder
       Attributes for PubsubMessage.
      
       Pubsub message must contain either non-empty data, or at least one
       attribute.
       
      map<string, string> attributes = 4;
      Specified by:
      getAttributesCount in interface PubsubTargetOrBuilder
    • containsAttributes

      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;
      Specified by:
      containsAttributes in interface PubsubTargetOrBuilder
    • getAttributes

      @Deprecated public Map<String,String> getAttributes()
      Deprecated.
      Use getAttributesMap() instead.
      Specified by:
      getAttributes in interface PubsubTargetOrBuilder
    • 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;
      Specified by:
      getAttributesMap in interface PubsubTargetOrBuilder
    • getAttributesOrDefault

      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;
      Specified by:
      getAttributesOrDefault in interface PubsubTargetOrBuilder
    • getAttributesOrThrow

      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;
      Specified by:
      getAttributesOrThrow in interface PubsubTargetOrBuilder
    • clearAttributes

      public PubsubTarget.Builder clearAttributes()
    • removeAttributes

      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;
    • getMutableAttributes

      @Deprecated public Map<String,String> getMutableAttributes()
      Deprecated.
      Use alternate mutation accessors instead.
    • putAttributes

      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;
    • putAllAttributes

      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;