Class RuntimeFilter.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<RuntimeFilter.Builder>
io.envoyproxy.envoy.config.accesslog.v3.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 requests based on runtime-configurable sampling rates.
 
Protobuf type envoy.config.accesslog.v3.RuntimeFilter
  • Method Details

    • 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>
    • mergeFrom

      public RuntimeFilter.Builder mergeFrom(RuntimeFilter other)
    • 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()
       Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
       key, it will override the default sampling rate specified in ``percent_sampled``.
       
      string runtime_key = 1 [(.validate.rules) = { ... }
      Specified by:
      getRuntimeKey in interface RuntimeFilterOrBuilder
      Returns:
      The runtimeKey.
    • getRuntimeKeyBytes

      public com.google.protobuf.ByteString getRuntimeKeyBytes()
       Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
       key, it will override the default sampling rate specified in ``percent_sampled``.
       
      string runtime_key = 1 [(.validate.rules) = { ... }
      Specified by:
      getRuntimeKeyBytes in interface RuntimeFilterOrBuilder
      Returns:
      The bytes for runtimeKey.
    • setRuntimeKey

      public RuntimeFilter.Builder setRuntimeKey(String value)
       Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
       key, it will override the default sampling rate specified in ``percent_sampled``.
       
      string runtime_key = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The runtimeKey to set.
      Returns:
      This builder for chaining.
    • clearRuntimeKey

      public RuntimeFilter.Builder clearRuntimeKey()
       Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
       key, it will override the default sampling rate specified in ``percent_sampled``.
       
      string runtime_key = 1 [(.validate.rules) = { ... }
      Returns:
      This builder for chaining.
    • setRuntimeKeyBytes

      public RuntimeFilter.Builder setRuntimeKeyBytes(com.google.protobuf.ByteString value)
       Specifies a key used to look up a custom sampling rate from the runtime configuration. If a value is found for this
       key, it will override the default sampling rate specified in ``percent_sampled``.
       
      string runtime_key = 1 [(.validate.rules) = { ... }
      Parameters:
      value - The bytes for runtimeKey to set.
      Returns:
      This builder for chaining.
    • hasPercentSampled

      public boolean hasPercentSampled()
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
      Specified by:
      hasPercentSampled in interface RuntimeFilterOrBuilder
      Returns:
      Whether the percentSampled field is set.
    • getPercentSampled

      public FractionalPercent getPercentSampled()
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
      Specified by:
      getPercentSampled in interface RuntimeFilterOrBuilder
      Returns:
      The percentSampled.
    • setPercentSampled

      public RuntimeFilter.Builder setPercentSampled(FractionalPercent value)
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
    • setPercentSampled

      public RuntimeFilter.Builder setPercentSampled(FractionalPercent.Builder builderForValue)
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
    • mergePercentSampled

      public RuntimeFilter.Builder mergePercentSampled(FractionalPercent value)
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
    • clearPercentSampled

      public RuntimeFilter.Builder clearPercentSampled()
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
    • getPercentSampledBuilder

      public FractionalPercent.Builder getPercentSampledBuilder()
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
    • getPercentSampledOrBuilder

      public FractionalPercentOrBuilder getPercentSampledOrBuilder()
       Defines the default sampling percentage when no runtime override is present. If not specified, the default is
       **0%** (with a denominator of 100).
       
      .envoy.type.v3.FractionalPercent percent_sampled = 2;
      Specified by:
      getPercentSampledOrBuilder in interface RuntimeFilterOrBuilder
    • getUseIndependentRandomness

      public boolean getUseIndependentRandomness()
       Controls how sampling decisions are made.
      
       - Default behavior (``false``):
      
         * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot.
         * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent
           across multiple hosts based on both the ``runtime_key`` and
           :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`.
         * Useful for tracking related requests across a distributed system.
      
       - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing:
      
         * Sampling decisions are made randomly based only on the ``runtime_key``.
         * Useful in complex filter configurations (like nested
           :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/
           :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability
           calculations are desired.
         * Can be used to implement logging kill switches with predictable probability distributions.
       
      bool use_independent_randomness = 3;
      Specified by:
      getUseIndependentRandomness in interface RuntimeFilterOrBuilder
      Returns:
      The useIndependentRandomness.
    • setUseIndependentRandomness

      public RuntimeFilter.Builder setUseIndependentRandomness(boolean value)
       Controls how sampling decisions are made.
      
       - Default behavior (``false``):
      
         * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot.
         * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent
           across multiple hosts based on both the ``runtime_key`` and
           :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`.
         * Useful for tracking related requests across a distributed system.
      
       - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing:
      
         * Sampling decisions are made randomly based only on the ``runtime_key``.
         * Useful in complex filter configurations (like nested
           :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/
           :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability
           calculations are desired.
         * Can be used to implement logging kill switches with predictable probability distributions.
       
      bool use_independent_randomness = 3;
      Parameters:
      value - The useIndependentRandomness to set.
      Returns:
      This builder for chaining.
    • clearUseIndependentRandomness

      public RuntimeFilter.Builder clearUseIndependentRandomness()
       Controls how sampling decisions are made.
      
       - Default behavior (``false``):
      
         * Uses the :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` as a consistent sampling pivot.
         * When :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is present, sampling will be consistent
           across multiple hosts based on both the ``runtime_key`` and
           :ref:`x-request-id<config_http_conn_man_headers_x-request-id>`.
         * Useful for tracking related requests across a distributed system.
      
       - When set to ``true`` or :ref:`x-request-id<config_http_conn_man_headers_x-request-id>` is missing:
      
         * Sampling decisions are made randomly based only on the ``runtime_key``.
         * Useful in complex filter configurations (like nested
           :ref:`AndFilter<envoy_v3_api_msg_config.accesslog.v3.AndFilter>`/
           :ref:`OrFilter<envoy_v3_api_msg_config.accesslog.v3.OrFilter>` blocks) where independent probability
           calculations are desired.
         * Can be used to implement logging kill switches with predictable probability distributions.
       
      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>