Class ExportConfig.Builder

  • All Implemented Interfaces:
    ExportConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    ExportConfig

    public static final class ExportConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
    implements ExportConfigOrBuilder
     Configuration for a Pub/Sub Lite subscription that writes messages to a
     destination. User subscriber clients must not connect to this subscription.
     
    Protobuf type google.cloud.pubsublite.v1.ExportConfig
    • Method Detail

      • getDescriptor

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

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

        public ExportConfig.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.GeneratedMessageV3.Builder<ExportConfig.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.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • getDefaultInstanceForType

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

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

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

        public ExportConfig.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • setField

        public ExportConfig.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                             Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • clearField

        public ExportConfig.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • clearOneof

        public ExportConfig.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • setRepeatedField

        public ExportConfig.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     int index,
                                                     Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • addRepeatedField

        public ExportConfig.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                     Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • mergeFrom

        public ExportConfig.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<ExportConfig.Builder>
      • isInitialized

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

        public ExportConfig.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<ExportConfig.Builder>
        Throws:
        IOException
      • getDesiredStateValue

        public int getDesiredStateValue()
         The desired state of this export. Setting this to values other than
         `ACTIVE` and `PAUSED` will result in an error.
         
        .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1;
        Specified by:
        getDesiredStateValue in interface ExportConfigOrBuilder
        Returns:
        The enum numeric value on the wire for desiredState.
      • setDesiredStateValue

        public ExportConfig.Builder setDesiredStateValue​(int value)
         The desired state of this export. Setting this to values other than
         `ACTIVE` and `PAUSED` will result in an error.
         
        .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1;
        Parameters:
        value - The enum numeric value on the wire for desiredState to set.
        Returns:
        This builder for chaining.
      • getDesiredState

        public ExportConfig.State getDesiredState()
         The desired state of this export. Setting this to values other than
         `ACTIVE` and `PAUSED` will result in an error.
         
        .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1;
        Specified by:
        getDesiredState in interface ExportConfigOrBuilder
        Returns:
        The desiredState.
      • setDesiredState

        public ExportConfig.Builder setDesiredState​(ExportConfig.State value)
         The desired state of this export. Setting this to values other than
         `ACTIVE` and `PAUSED` will result in an error.
         
        .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1;
        Parameters:
        value - The desiredState to set.
        Returns:
        This builder for chaining.
      • clearDesiredState

        public ExportConfig.Builder clearDesiredState()
         The desired state of this export. Setting this to values other than
         `ACTIVE` and `PAUSED` will result in an error.
         
        .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1;
        Returns:
        This builder for chaining.
      • getCurrentStateValue

        public int getCurrentStateValue()
         Output only. The current state of the export, which may be different to the
         desired state due to errors. This field is output only.
         
        .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCurrentStateValue in interface ExportConfigOrBuilder
        Returns:
        The enum numeric value on the wire for currentState.
      • setCurrentStateValue

        public ExportConfig.Builder setCurrentStateValue​(int value)
         Output only. The current state of the export, which may be different to the
         desired state due to errors. This field is output only.
         
        .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for currentState to set.
        Returns:
        This builder for chaining.
      • getCurrentState

        public ExportConfig.State getCurrentState()
         Output only. The current state of the export, which may be different to the
         desired state due to errors. This field is output only.
         
        .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getCurrentState in interface ExportConfigOrBuilder
        Returns:
        The currentState.
      • setCurrentState

        public ExportConfig.Builder setCurrentState​(ExportConfig.State value)
         Output only. The current state of the export, which may be different to the
         desired state due to errors. This field is output only.
         
        .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The currentState to set.
        Returns:
        This builder for chaining.
      • clearCurrentState

        public ExportConfig.Builder clearCurrentState()
         Output only. The current state of the export, which may be different to the
         desired state due to errors. This field is output only.
         
        .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • getDeadLetterTopic

        public String getDeadLetterTopic()
         Optional. The name of an optional Pub/Sub Lite topic to publish messages
         that can not be exported to the destination. For example, the message can
         not be published to the Pub/Sub service because it does not satisfy the
         constraints documented at https://cloud.google.com/pubsub/docs/publisher.
        
         Structured like:
         projects/{project_number}/locations/{location}/topics/{topic_id}.
         Must be within the same project and location as the subscription. The topic
         may be changed or removed.
         
        string dead_letter_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getDeadLetterTopic in interface ExportConfigOrBuilder
        Returns:
        The deadLetterTopic.
      • getDeadLetterTopicBytes

        public com.google.protobuf.ByteString getDeadLetterTopicBytes()
         Optional. The name of an optional Pub/Sub Lite topic to publish messages
         that can not be exported to the destination. For example, the message can
         not be published to the Pub/Sub service because it does not satisfy the
         constraints documented at https://cloud.google.com/pubsub/docs/publisher.
        
         Structured like:
         projects/{project_number}/locations/{location}/topics/{topic_id}.
         Must be within the same project and location as the subscription. The topic
         may be changed or removed.
         
        string dead_letter_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Specified by:
        getDeadLetterTopicBytes in interface ExportConfigOrBuilder
        Returns:
        The bytes for deadLetterTopic.
      • setDeadLetterTopic

        public ExportConfig.Builder setDeadLetterTopic​(String value)
         Optional. The name of an optional Pub/Sub Lite topic to publish messages
         that can not be exported to the destination. For example, the message can
         not be published to the Pub/Sub service because it does not satisfy the
         constraints documented at https://cloud.google.com/pubsub/docs/publisher.
        
         Structured like:
         projects/{project_number}/locations/{location}/topics/{topic_id}.
         Must be within the same project and location as the subscription. The topic
         may be changed or removed.
         
        string dead_letter_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The deadLetterTopic to set.
        Returns:
        This builder for chaining.
      • clearDeadLetterTopic

        public ExportConfig.Builder clearDeadLetterTopic()
         Optional. The name of an optional Pub/Sub Lite topic to publish messages
         that can not be exported to the destination. For example, the message can
         not be published to the Pub/Sub service because it does not satisfy the
         constraints documented at https://cloud.google.com/pubsub/docs/publisher.
        
         Structured like:
         projects/{project_number}/locations/{location}/topics/{topic_id}.
         Must be within the same project and location as the subscription. The topic
         may be changed or removed.
         
        string dead_letter_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Returns:
        This builder for chaining.
      • setDeadLetterTopicBytes

        public ExportConfig.Builder setDeadLetterTopicBytes​(com.google.protobuf.ByteString value)
         Optional. The name of an optional Pub/Sub Lite topic to publish messages
         that can not be exported to the destination. For example, the message can
         not be published to the Pub/Sub service because it does not satisfy the
         constraints documented at https://cloud.google.com/pubsub/docs/publisher.
        
         Structured like:
         projects/{project_number}/locations/{location}/topics/{topic_id}.
         Must be within the same project and location as the subscription. The topic
         may be changed or removed.
         
        string dead_letter_topic = 5 [(.google.api.field_behavior) = OPTIONAL, (.google.api.resource_reference) = { ... }
        Parameters:
        value - The bytes for deadLetterTopic to set.
        Returns:
        This builder for chaining.
      • hasPubsubConfig

        public boolean hasPubsubConfig()
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
        Specified by:
        hasPubsubConfig in interface ExportConfigOrBuilder
        Returns:
        Whether the pubsubConfig field is set.
      • getPubsubConfig

        public ExportConfig.PubSubConfig getPubsubConfig()
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
        Specified by:
        getPubsubConfig in interface ExportConfigOrBuilder
        Returns:
        The pubsubConfig.
      • setPubsubConfig

        public ExportConfig.Builder setPubsubConfig​(ExportConfig.PubSubConfig value)
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
      • setPubsubConfig

        public ExportConfig.Builder setPubsubConfig​(ExportConfig.PubSubConfig.Builder builderForValue)
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
      • mergePubsubConfig

        public ExportConfig.Builder mergePubsubConfig​(ExportConfig.PubSubConfig value)
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
      • clearPubsubConfig

        public ExportConfig.Builder clearPubsubConfig()
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
      • getPubsubConfigBuilder

        public ExportConfig.PubSubConfig.Builder getPubsubConfigBuilder()
         Messages are automatically written from the Pub/Sub Lite topic associated
         with this subscription to a Pub/Sub topic.
         
        .google.cloud.pubsublite.v1.ExportConfig.PubSubConfig pubsub_config = 3;
      • setUnknownFields

        public final ExportConfig.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>
      • mergeUnknownFields

        public final ExportConfig.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<ExportConfig.Builder>