Class CloudStorageConfig.Builder

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

    public static final class CloudStorageConfig.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<CloudStorageConfig.Builder>
    implements CloudStorageConfigOrBuilder
     Configuration for a Cloud Storage subscription.
     
    Protobuf type google.pubsub.v1.CloudStorageConfig
    • 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<CloudStorageConfig.Builder>
      • clear

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

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

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

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

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • setField

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • clearField

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • clearOneof

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • setRepeatedField

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • addRepeatedField

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
      • mergeFrom

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

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

        public CloudStorageConfig.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<CloudStorageConfig.Builder>
        Throws:
        IOException
      • getBucket

        public String getBucket()
         Required. User-provided name for the Cloud Storage bucket.
         The bucket must be created by the user. The bucket name must be without
         any prefix like "gs://". See the [bucket naming
         requirements] (https://cloud.google.com/storage/docs/buckets#naming).
         
        string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getBucket in interface CloudStorageConfigOrBuilder
        Returns:
        The bucket.
      • getBucketBytes

        public com.google.protobuf.ByteString getBucketBytes()
         Required. User-provided name for the Cloud Storage bucket.
         The bucket must be created by the user. The bucket name must be without
         any prefix like "gs://". See the [bucket naming
         requirements] (https://cloud.google.com/storage/docs/buckets#naming).
         
        string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
        Specified by:
        getBucketBytes in interface CloudStorageConfigOrBuilder
        Returns:
        The bytes for bucket.
      • setBucket

        public CloudStorageConfig.Builder setBucket​(String value)
         Required. User-provided name for the Cloud Storage bucket.
         The bucket must be created by the user. The bucket name must be without
         any prefix like "gs://". See the [bucket naming
         requirements] (https://cloud.google.com/storage/docs/buckets#naming).
         
        string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bucket to set.
        Returns:
        This builder for chaining.
      • clearBucket

        public CloudStorageConfig.Builder clearBucket()
         Required. User-provided name for the Cloud Storage bucket.
         The bucket must be created by the user. The bucket name must be without
         any prefix like "gs://". See the [bucket naming
         requirements] (https://cloud.google.com/storage/docs/buckets#naming).
         
        string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
        Returns:
        This builder for chaining.
      • setBucketBytes

        public CloudStorageConfig.Builder setBucketBytes​(com.google.protobuf.ByteString value)
         Required. User-provided name for the Cloud Storage bucket.
         The bucket must be created by the user. The bucket name must be without
         any prefix like "gs://". See the [bucket naming
         requirements] (https://cloud.google.com/storage/docs/buckets#naming).
         
        string bucket = 1 [(.google.api.field_behavior) = REQUIRED];
        Parameters:
        value - The bytes for bucket to set.
        Returns:
        This builder for chaining.
      • getFilenamePrefix

        public String getFilenamePrefix()
         User-provided prefix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming).
         
        string filename_prefix = 2;
        Specified by:
        getFilenamePrefix in interface CloudStorageConfigOrBuilder
        Returns:
        The filenamePrefix.
      • getFilenamePrefixBytes

        public com.google.protobuf.ByteString getFilenamePrefixBytes()
         User-provided prefix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming).
         
        string filename_prefix = 2;
        Specified by:
        getFilenamePrefixBytes in interface CloudStorageConfigOrBuilder
        Returns:
        The bytes for filenamePrefix.
      • setFilenamePrefix

        public CloudStorageConfig.Builder setFilenamePrefix​(String value)
         User-provided prefix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming).
         
        string filename_prefix = 2;
        Parameters:
        value - The filenamePrefix to set.
        Returns:
        This builder for chaining.
      • clearFilenamePrefix

        public CloudStorageConfig.Builder clearFilenamePrefix()
         User-provided prefix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming).
         
        string filename_prefix = 2;
        Returns:
        This builder for chaining.
      • setFilenamePrefixBytes

        public CloudStorageConfig.Builder setFilenamePrefixBytes​(com.google.protobuf.ByteString value)
         User-provided prefix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming).
         
        string filename_prefix = 2;
        Parameters:
        value - The bytes for filenamePrefix to set.
        Returns:
        This builder for chaining.
      • getFilenameSuffix

        public String getFilenameSuffix()
         User-provided suffix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming). Must
         not end in "/".
         
        string filename_suffix = 3;
        Specified by:
        getFilenameSuffix in interface CloudStorageConfigOrBuilder
        Returns:
        The filenameSuffix.
      • getFilenameSuffixBytes

        public com.google.protobuf.ByteString getFilenameSuffixBytes()
         User-provided suffix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming). Must
         not end in "/".
         
        string filename_suffix = 3;
        Specified by:
        getFilenameSuffixBytes in interface CloudStorageConfigOrBuilder
        Returns:
        The bytes for filenameSuffix.
      • setFilenameSuffix

        public CloudStorageConfig.Builder setFilenameSuffix​(String value)
         User-provided suffix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming). Must
         not end in "/".
         
        string filename_suffix = 3;
        Parameters:
        value - The filenameSuffix to set.
        Returns:
        This builder for chaining.
      • clearFilenameSuffix

        public CloudStorageConfig.Builder clearFilenameSuffix()
         User-provided suffix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming). Must
         not end in "/".
         
        string filename_suffix = 3;
        Returns:
        This builder for chaining.
      • setFilenameSuffixBytes

        public CloudStorageConfig.Builder setFilenameSuffixBytes​(com.google.protobuf.ByteString value)
         User-provided suffix for Cloud Storage filename. See the [object naming
         requirements](https://cloud.google.com/storage/docs/objects#naming). Must
         not end in "/".
         
        string filename_suffix = 3;
        Parameters:
        value - The bytes for filenameSuffix to set.
        Returns:
        This builder for chaining.
      • hasTextConfig

        public boolean hasTextConfig()
         If set, message data will be written to Cloud Storage in text format.
         
        .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4;
        Specified by:
        hasTextConfig in interface CloudStorageConfigOrBuilder
        Returns:
        Whether the textConfig field is set.
      • clearTextConfig

        public CloudStorageConfig.Builder clearTextConfig()
         If set, message data will be written to Cloud Storage in text format.
         
        .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4;
      • getTextConfigBuilder

        public CloudStorageConfig.TextConfig.Builder getTextConfigBuilder()
         If set, message data will be written to Cloud Storage in text format.
         
        .google.pubsub.v1.CloudStorageConfig.TextConfig text_config = 4;
      • hasAvroConfig

        public boolean hasAvroConfig()
         If set, message data will be written to Cloud Storage in Avro format.
         
        .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5;
        Specified by:
        hasAvroConfig in interface CloudStorageConfigOrBuilder
        Returns:
        Whether the avroConfig field is set.
      • clearAvroConfig

        public CloudStorageConfig.Builder clearAvroConfig()
         If set, message data will be written to Cloud Storage in Avro format.
         
        .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5;
      • getAvroConfigBuilder

        public CloudStorageConfig.AvroConfig.Builder getAvroConfigBuilder()
         If set, message data will be written to Cloud Storage in Avro format.
         
        .google.pubsub.v1.CloudStorageConfig.AvroConfig avro_config = 5;
      • hasMaxDuration

        public boolean hasMaxDuration()
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
        Specified by:
        hasMaxDuration in interface CloudStorageConfigOrBuilder
        Returns:
        Whether the maxDuration field is set.
      • getMaxDuration

        public com.google.protobuf.Duration getMaxDuration()
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
        Specified by:
        getMaxDuration in interface CloudStorageConfigOrBuilder
        Returns:
        The maxDuration.
      • setMaxDuration

        public CloudStorageConfig.Builder setMaxDuration​(com.google.protobuf.Duration value)
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
      • setMaxDuration

        public CloudStorageConfig.Builder setMaxDuration​(com.google.protobuf.Duration.Builder builderForValue)
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
      • mergeMaxDuration

        public CloudStorageConfig.Builder mergeMaxDuration​(com.google.protobuf.Duration value)
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
      • clearMaxDuration

        public CloudStorageConfig.Builder clearMaxDuration()
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
      • getMaxDurationBuilder

        public com.google.protobuf.Duration.Builder getMaxDurationBuilder()
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
      • getMaxDurationOrBuilder

        public com.google.protobuf.DurationOrBuilder getMaxDurationOrBuilder()
         The maximum duration that can elapse before a new Cloud Storage file is
         created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed
         the subscription's acknowledgement deadline.
         
        .google.protobuf.Duration max_duration = 6;
        Specified by:
        getMaxDurationOrBuilder in interface CloudStorageConfigOrBuilder
      • getMaxBytes

        public long getMaxBytes()
         The maximum bytes that can be written to a Cloud Storage file before a new
         file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
         in cases where messages are larger than the limit.
         
        int64 max_bytes = 7;
        Specified by:
        getMaxBytes in interface CloudStorageConfigOrBuilder
        Returns:
        The maxBytes.
      • setMaxBytes

        public CloudStorageConfig.Builder setMaxBytes​(long value)
         The maximum bytes that can be written to a Cloud Storage file before a new
         file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
         in cases where messages are larger than the limit.
         
        int64 max_bytes = 7;
        Parameters:
        value - The maxBytes to set.
        Returns:
        This builder for chaining.
      • clearMaxBytes

        public CloudStorageConfig.Builder clearMaxBytes()
         The maximum bytes that can be written to a Cloud Storage file before a new
         file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded
         in cases where messages are larger than the limit.
         
        int64 max_bytes = 7;
        Returns:
        This builder for chaining.
      • getStateValue

        public int getStateValue()
         Output only. An output-only field that indicates whether or not the
         subscription can receive messages.
         
        .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getStateValue in interface CloudStorageConfigOrBuilder
        Returns:
        The enum numeric value on the wire for state.
      • setStateValue

        public CloudStorageConfig.Builder setStateValue​(int value)
         Output only. An output-only field that indicates whether or not the
         subscription can receive messages.
         
        .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The enum numeric value on the wire for state to set.
        Returns:
        This builder for chaining.
      • getState

        public CloudStorageConfig.State getState()
         Output only. An output-only field that indicates whether or not the
         subscription can receive messages.
         
        .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Specified by:
        getState in interface CloudStorageConfigOrBuilder
        Returns:
        The state.
      • setState

        public CloudStorageConfig.Builder setState​(CloudStorageConfig.State value)
         Output only. An output-only field that indicates whether or not the
         subscription can receive messages.
         
        .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Parameters:
        value - The state to set.
        Returns:
        This builder for chaining.
      • clearState

        public CloudStorageConfig.Builder clearState()
         Output only. An output-only field that indicates whether or not the
         subscription can receive messages.
         
        .google.pubsub.v1.CloudStorageConfig.State state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final CloudStorageConfig.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<CloudStorageConfig.Builder>
      • mergeUnknownFields

        public final CloudStorageConfig.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<CloudStorageConfig.Builder>