Class RuntimeFilter.Builder

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

    public static final class RuntimeFilter.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
    implements RuntimeFilterOrBuilder
     Filters for random sampling of requests.
     
    Protobuf type envoy.config.filter.accesslog.v2.RuntimeFilter
    • 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<RuntimeFilter.Builder>
      • clear

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

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

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

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

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

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

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

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

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

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

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

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

        public RuntimeFilter.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<RuntimeFilter.Builder>
        Throws:
        IOException
      • getRuntimeKey

        public String getRuntimeKey()
         Runtime key to get an optional overridden numerator for use in the *percent_sampled* field.
         If found in runtime, this value will replace the default numerator.
         
        string runtime_key = 1 [(.validate.rules) = { ... }
        Specified by:
        getRuntimeKey in interface RuntimeFilterOrBuilder
        Returns:
        The runtimeKey.
      • getRuntimeKeyBytes

        public com.google.protobuf.ByteString getRuntimeKeyBytes()
         Runtime key to get an optional overridden numerator for use in the *percent_sampled* field.
         If found in runtime, this value will replace the default numerator.
         
        string runtime_key = 1 [(.validate.rules) = { ... }
        Specified by:
        getRuntimeKeyBytes in interface RuntimeFilterOrBuilder
        Returns:
        The bytes for runtimeKey.
      • setRuntimeKey

        public RuntimeFilter.Builder setRuntimeKey​(String value)
         Runtime key to get an optional overridden numerator for use in the *percent_sampled* field.
         If found in runtime, this value will replace the default numerator.
         
        string runtime_key = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The runtimeKey to set.
        Returns:
        This builder for chaining.
      • clearRuntimeKey

        public RuntimeFilter.Builder clearRuntimeKey()
         Runtime key to get an optional overridden numerator for use in the *percent_sampled* field.
         If found in runtime, this value will replace the default numerator.
         
        string runtime_key = 1 [(.validate.rules) = { ... }
        Returns:
        This builder for chaining.
      • setRuntimeKeyBytes

        public RuntimeFilter.Builder setRuntimeKeyBytes​(com.google.protobuf.ByteString value)
         Runtime key to get an optional overridden numerator for use in the *percent_sampled* field.
         If found in runtime, this value will replace the default numerator.
         
        string runtime_key = 1 [(.validate.rules) = { ... }
        Parameters:
        value - The bytes for runtimeKey to set.
        Returns:
        This builder for chaining.
      • hasPercentSampled

        public boolean hasPercentSampled()
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
        Specified by:
        hasPercentSampled in interface RuntimeFilterOrBuilder
        Returns:
        Whether the percentSampled field is set.
      • getPercentSampled

        public FractionalPercent getPercentSampled()
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
        Specified by:
        getPercentSampled in interface RuntimeFilterOrBuilder
        Returns:
        The percentSampled.
      • setPercentSampled

        public RuntimeFilter.Builder setPercentSampled​(FractionalPercent value)
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
      • setPercentSampled

        public RuntimeFilter.Builder setPercentSampled​(FractionalPercent.Builder builderForValue)
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
      • mergePercentSampled

        public RuntimeFilter.Builder mergePercentSampled​(FractionalPercent value)
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
      • clearPercentSampled

        public RuntimeFilter.Builder clearPercentSampled()
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
      • getPercentSampledBuilder

        public FractionalPercent.Builder getPercentSampledBuilder()
         The default sampling percentage. If not specified, defaults to 0% with denominator of 100.
         
        .envoy.type.FractionalPercent percent_sampled = 2;
      • getUseIndependentRandomness

        public boolean getUseIndependentRandomness()
         By default, sampling pivots on the header
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being present. If
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, the filter will
         consistently sample across multiple hosts based on the runtime key value and the value
         extracted from :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
         missing, or *use_independent_randomness* is set to true, the filter will randomly sample based
         on the runtime key value alone. *use_independent_randomness* can be used for logging kill
         switches within complex nested :ref:`AndFilter
         <envoy_api_msg_config.filter.accesslog.v2.AndFilter>` and :ref:`OrFilter
         <envoy_api_msg_config.filter.accesslog.v2.OrFilter>` blocks that are easier to reason about
         from a probability perspective (i.e., setting to true will cause the filter to behave like
         an independent random variable when composed within logical operator filters).
         
        bool use_independent_randomness = 3;
        Specified by:
        getUseIndependentRandomness in interface RuntimeFilterOrBuilder
        Returns:
        The useIndependentRandomness.
      • setUseIndependentRandomness

        public RuntimeFilter.Builder setUseIndependentRandomness​(boolean value)
         By default, sampling pivots on the header
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being present. If
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, the filter will
         consistently sample across multiple hosts based on the runtime key value and the value
         extracted from :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
         missing, or *use_independent_randomness* is set to true, the filter will randomly sample based
         on the runtime key value alone. *use_independent_randomness* can be used for logging kill
         switches within complex nested :ref:`AndFilter
         <envoy_api_msg_config.filter.accesslog.v2.AndFilter>` and :ref:`OrFilter
         <envoy_api_msg_config.filter.accesslog.v2.OrFilter>` blocks that are easier to reason about
         from a probability perspective (i.e., setting to true will cause the filter to behave like
         an independent random variable when composed within logical operator filters).
         
        bool use_independent_randomness = 3;
        Parameters:
        value - The useIndependentRandomness to set.
        Returns:
        This builder for chaining.
      • clearUseIndependentRandomness

        public RuntimeFilter.Builder clearUseIndependentRandomness()
         By default, sampling pivots on the header
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` being present. If
         :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, the filter will
         consistently sample across multiple hosts based on the runtime key value and the value
         extracted from :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`. If it is
         missing, or *use_independent_randomness* is set to true, the filter will randomly sample based
         on the runtime key value alone. *use_independent_randomness* can be used for logging kill
         switches within complex nested :ref:`AndFilter
         <envoy_api_msg_config.filter.accesslog.v2.AndFilter>` and :ref:`OrFilter
         <envoy_api_msg_config.filter.accesslog.v2.OrFilter>` blocks that are easier to reason about
         from a probability perspective (i.e., setting to true will cause the filter to behave like
         an independent random variable when composed within logical operator filters).
         
        bool use_independent_randomness = 3;
        Returns:
        This builder for chaining.
      • setUnknownFields

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

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