Class Compressor.Builder

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

    public static final class Compressor.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Compressor.Builder>
    implements CompressorOrBuilder
     [#next-free-field: 6]
     
    Protobuf type envoy.config.filter.http.compressor.v2.Compressor
    • 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<Compressor.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public Compressor.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<Compressor.Builder>
        Throws:
        IOException
      • hasContentLength

        public boolean hasContentLength()
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
        Specified by:
        hasContentLength in interface CompressorOrBuilder
        Returns:
        Whether the contentLength field is set.
      • getContentLength

        public com.google.protobuf.UInt32Value getContentLength()
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
        Specified by:
        getContentLength in interface CompressorOrBuilder
        Returns:
        The contentLength.
      • setContentLength

        public Compressor.Builder setContentLength​(com.google.protobuf.UInt32Value value)
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
      • setContentLength

        public Compressor.Builder setContentLength​(com.google.protobuf.UInt32Value.Builder builderForValue)
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
      • mergeContentLength

        public Compressor.Builder mergeContentLength​(com.google.protobuf.UInt32Value value)
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
      • clearContentLength

        public Compressor.Builder clearContentLength()
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
      • getContentLengthBuilder

        public com.google.protobuf.UInt32Value.Builder getContentLengthBuilder()
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
      • getContentLengthOrBuilder

        public com.google.protobuf.UInt32ValueOrBuilder getContentLengthOrBuilder()
         Minimum response length, in bytes, which will trigger compression. The default value is 30.
         
        .google.protobuf.UInt32Value content_length = 1;
        Specified by:
        getContentLengthOrBuilder in interface CompressorOrBuilder
      • getContentTypeList

        public com.google.protobuf.ProtocolStringList getContentTypeList()
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Specified by:
        getContentTypeList in interface CompressorOrBuilder
        Returns:
        A list containing the contentType.
      • getContentTypeCount

        public int getContentTypeCount()
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Specified by:
        getContentTypeCount in interface CompressorOrBuilder
        Returns:
        The count of contentType.
      • getContentType

        public String getContentType​(int index)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Specified by:
        getContentType in interface CompressorOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The contentType at the given index.
      • getContentTypeBytes

        public com.google.protobuf.ByteString getContentTypeBytes​(int index)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Specified by:
        getContentTypeBytes in interface CompressorOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the contentType at the given index.
      • setContentType

        public Compressor.Builder setContentType​(int index,
                                                 String value)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Parameters:
        index - The index to set the value at.
        value - The contentType to set.
        Returns:
        This builder for chaining.
      • addContentType

        public Compressor.Builder addContentType​(String value)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Parameters:
        value - The contentType to add.
        Returns:
        This builder for chaining.
      • addAllContentType

        public Compressor.Builder addAllContentType​(Iterable<String> values)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Parameters:
        values - The contentType to add.
        Returns:
        This builder for chaining.
      • clearContentType

        public Compressor.Builder clearContentType()
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Returns:
        This builder for chaining.
      • addContentTypeBytes

        public Compressor.Builder addContentTypeBytes​(com.google.protobuf.ByteString value)
         Set of strings that allows specifying which mime-types yield compression; e.g.,
         application/json, text/html, etc. When this field is not defined, compression will be applied
         to the following mime-types: "application/javascript", "application/json",
         "application/xhtml+xml", "image/svg+xml", "text/css", "text/html", "text/plain", "text/xml"
         and their synonyms.
         
        repeated string content_type = 2;
        Parameters:
        value - The bytes of the contentType to add.
        Returns:
        This builder for chaining.
      • getDisableOnEtagHeader

        public boolean getDisableOnEtagHeader()
         If true, disables compression when the response contains an etag header. When it is false, the
         filter will preserve weak etags and remove the ones that require strong validation.
         
        bool disable_on_etag_header = 3;
        Specified by:
        getDisableOnEtagHeader in interface CompressorOrBuilder
        Returns:
        The disableOnEtagHeader.
      • setDisableOnEtagHeader

        public Compressor.Builder setDisableOnEtagHeader​(boolean value)
         If true, disables compression when the response contains an etag header. When it is false, the
         filter will preserve weak etags and remove the ones that require strong validation.
         
        bool disable_on_etag_header = 3;
        Parameters:
        value - The disableOnEtagHeader to set.
        Returns:
        This builder for chaining.
      • clearDisableOnEtagHeader

        public Compressor.Builder clearDisableOnEtagHeader()
         If true, disables compression when the response contains an etag header. When it is false, the
         filter will preserve weak etags and remove the ones that require strong validation.
         
        bool disable_on_etag_header = 3;
        Returns:
        This builder for chaining.
      • getRemoveAcceptEncodingHeader

        public boolean getRemoveAcceptEncodingHeader()
         If true, removes accept-encoding from the request headers before dispatching it to the upstream
         so that responses do not get compressed before reaching the filter.
         .. attention:
            To avoid interfering with other compression filters in the same chain use this option in
            the filter closest to the upstream.
         
        bool remove_accept_encoding_header = 4;
        Specified by:
        getRemoveAcceptEncodingHeader in interface CompressorOrBuilder
        Returns:
        The removeAcceptEncodingHeader.
      • setRemoveAcceptEncodingHeader

        public Compressor.Builder setRemoveAcceptEncodingHeader​(boolean value)
         If true, removes accept-encoding from the request headers before dispatching it to the upstream
         so that responses do not get compressed before reaching the filter.
         .. attention:
            To avoid interfering with other compression filters in the same chain use this option in
            the filter closest to the upstream.
         
        bool remove_accept_encoding_header = 4;
        Parameters:
        value - The removeAcceptEncodingHeader to set.
        Returns:
        This builder for chaining.
      • clearRemoveAcceptEncodingHeader

        public Compressor.Builder clearRemoveAcceptEncodingHeader()
         If true, removes accept-encoding from the request headers before dispatching it to the upstream
         so that responses do not get compressed before reaching the filter.
         .. attention:
            To avoid interfering with other compression filters in the same chain use this option in
            the filter closest to the upstream.
         
        bool remove_accept_encoding_header = 4;
        Returns:
        This builder for chaining.
      • hasRuntimeEnabled

        public boolean hasRuntimeEnabled()
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
        Specified by:
        hasRuntimeEnabled in interface CompressorOrBuilder
        Returns:
        Whether the runtimeEnabled field is set.
      • getRuntimeEnabled

        public RuntimeFeatureFlag getRuntimeEnabled()
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
        Specified by:
        getRuntimeEnabled in interface CompressorOrBuilder
        Returns:
        The runtimeEnabled.
      • setRuntimeEnabled

        public Compressor.Builder setRuntimeEnabled​(RuntimeFeatureFlag value)
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
      • setRuntimeEnabled

        public Compressor.Builder setRuntimeEnabled​(RuntimeFeatureFlag.Builder builderForValue)
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
      • mergeRuntimeEnabled

        public Compressor.Builder mergeRuntimeEnabled​(RuntimeFeatureFlag value)
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
      • clearRuntimeEnabled

        public Compressor.Builder clearRuntimeEnabled()
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
      • getRuntimeEnabledBuilder

        public RuntimeFeatureFlag.Builder getRuntimeEnabledBuilder()
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
      • getRuntimeEnabledOrBuilder

        public RuntimeFeatureFlagOrBuilder getRuntimeEnabledOrBuilder()
         Runtime flag that controls whether the filter is enabled or not. If set to false, the
         filter will operate as a pass-through filter. If not specified, defaults to enabled.
         
        .envoy.api.v2.core.RuntimeFeatureFlag runtime_enabled = 5;
        Specified by:
        getRuntimeEnabledOrBuilder in interface CompressorOrBuilder
      • setUnknownFields

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

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