Class FilterConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<FilterConfig.Builder>
io.envoyproxy.envoy.extensions.filters.http.grpc_stats.v3.FilterConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, FilterConfigOrBuilder, Cloneable
Enclosing class:
FilterConfig

public static final class FilterConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<FilterConfig.Builder> implements FilterConfigOrBuilder
 gRPC statistics filter configuration
 [#next-free-field: 6]
 
Protobuf type envoy.extensions.filters.http.grpc_stats.v3.FilterConfig
  • 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<FilterConfig.Builder>
    • clear

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

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

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

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

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

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

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

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

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

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

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

      public FilterConfig.Builder mergeFrom(FilterConfig other)
    • isInitialized

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

      public FilterConfig.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<FilterConfig.Builder>
      Throws:
      IOException
    • getPerMethodStatSpecifierCase

      public FilterConfig.PerMethodStatSpecifierCase getPerMethodStatSpecifierCase()
      Specified by:
      getPerMethodStatSpecifierCase in interface FilterConfigOrBuilder
    • clearPerMethodStatSpecifier

      public FilterConfig.Builder clearPerMethodStatSpecifier()
    • getEmitFilterState

      public boolean getEmitFilterState()
       If true, the filter maintains a filter state object with the request and response message
       counts.
       
      bool emit_filter_state = 1;
      Specified by:
      getEmitFilterState in interface FilterConfigOrBuilder
      Returns:
      The emitFilterState.
    • setEmitFilterState

      public FilterConfig.Builder setEmitFilterState(boolean value)
       If true, the filter maintains a filter state object with the request and response message
       counts.
       
      bool emit_filter_state = 1;
      Parameters:
      value - The emitFilterState to set.
      Returns:
      This builder for chaining.
    • clearEmitFilterState

      public FilterConfig.Builder clearEmitFilterState()
       If true, the filter maintains a filter state object with the request and response message
       counts.
       
      bool emit_filter_state = 1;
      Returns:
      This builder for chaining.
    • hasIndividualMethodStatsAllowlist

      public boolean hasIndividualMethodStatsAllowlist()
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
      Specified by:
      hasIndividualMethodStatsAllowlist in interface FilterConfigOrBuilder
      Returns:
      Whether the individualMethodStatsAllowlist field is set.
    • getIndividualMethodStatsAllowlist

      public GrpcMethodList getIndividualMethodStatsAllowlist()
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
      Specified by:
      getIndividualMethodStatsAllowlist in interface FilterConfigOrBuilder
      Returns:
      The individualMethodStatsAllowlist.
    • setIndividualMethodStatsAllowlist

      public FilterConfig.Builder setIndividualMethodStatsAllowlist(GrpcMethodList value)
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
    • setIndividualMethodStatsAllowlist

      public FilterConfig.Builder setIndividualMethodStatsAllowlist(GrpcMethodList.Builder builderForValue)
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
    • mergeIndividualMethodStatsAllowlist

      public FilterConfig.Builder mergeIndividualMethodStatsAllowlist(GrpcMethodList value)
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
    • clearIndividualMethodStatsAllowlist

      public FilterConfig.Builder clearIndividualMethodStatsAllowlist()
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
    • getIndividualMethodStatsAllowlistBuilder

      public GrpcMethodList.Builder getIndividualMethodStatsAllowlistBuilder()
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
    • getIndividualMethodStatsAllowlistOrBuilder

      public GrpcMethodListOrBuilder getIndividualMethodStatsAllowlistOrBuilder()
       If set, specifies an allowlist of service/methods that will have individual stats
       emitted for them. Any call that does not match the allowlist will be counted
       in a stat with no method specifier: ``cluster.<name>.grpc.*``.
       
      .envoy.config.core.v3.GrpcMethodList individual_method_stats_allowlist = 2;
      Specified by:
      getIndividualMethodStatsAllowlistOrBuilder in interface FilterConfigOrBuilder
    • hasStatsForAllMethods

      public boolean hasStatsForAllMethods()
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
      Specified by:
      hasStatsForAllMethods in interface FilterConfigOrBuilder
      Returns:
      Whether the statsForAllMethods field is set.
    • getStatsForAllMethods

      public com.google.protobuf.BoolValue getStatsForAllMethods()
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
      Specified by:
      getStatsForAllMethods in interface FilterConfigOrBuilder
      Returns:
      The statsForAllMethods.
    • setStatsForAllMethods

      public FilterConfig.Builder setStatsForAllMethods(com.google.protobuf.BoolValue value)
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
    • setStatsForAllMethods

      public FilterConfig.Builder setStatsForAllMethods(com.google.protobuf.BoolValue.Builder builderForValue)
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
    • mergeStatsForAllMethods

      public FilterConfig.Builder mergeStatsForAllMethods(com.google.protobuf.BoolValue value)
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
    • clearStatsForAllMethods

      public FilterConfig.Builder clearStatsForAllMethods()
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
    • getStatsForAllMethodsBuilder

      public com.google.protobuf.BoolValue.Builder getStatsForAllMethodsBuilder()
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
    • getStatsForAllMethodsOrBuilder

      public com.google.protobuf.BoolValueOrBuilder getStatsForAllMethodsOrBuilder()
       If set to true, emit stats for all service/method names.
      
       If set to false, emit stats for all service/message types to the same stats without including
       the service/method in the name, with prefix ``cluster.<name>.grpc``. This can be useful if
       service/method granularity is not needed, or if each cluster only receives a single method.
      
       .. attention::
         This option is only safe if all clients are trusted. If this option is enabled
         with untrusted clients, the clients could cause unbounded growth in the number of stats in
         Envoy, using unbounded memory and potentially slowing down stats pipelines.
      
       .. attention::
         If neither ``individual_method_stats_allowlist`` nor ``stats_for_all_methods`` is set, the
         behavior will default to ``stats_for_all_methods=false``.
       
      .google.protobuf.BoolValue stats_for_all_methods = 3;
      Specified by:
      getStatsForAllMethodsOrBuilder in interface FilterConfigOrBuilder
    • getEnableUpstreamStats

      public boolean getEnableUpstreamStats()
       If true, the filter will gather a histogram for the request time of the upstream.
       It works with :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       and :ref:`individual_method_stats_allowlist
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.individual_method_stats_allowlist>` the same way
       request_message_count and response_message_count works.
       
      bool enable_upstream_stats = 4;
      Specified by:
      getEnableUpstreamStats in interface FilterConfigOrBuilder
      Returns:
      The enableUpstreamStats.
    • setEnableUpstreamStats

      public FilterConfig.Builder setEnableUpstreamStats(boolean value)
       If true, the filter will gather a histogram for the request time of the upstream.
       It works with :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       and :ref:`individual_method_stats_allowlist
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.individual_method_stats_allowlist>` the same way
       request_message_count and response_message_count works.
       
      bool enable_upstream_stats = 4;
      Parameters:
      value - The enableUpstreamStats to set.
      Returns:
      This builder for chaining.
    • clearEnableUpstreamStats

      public FilterConfig.Builder clearEnableUpstreamStats()
       If true, the filter will gather a histogram for the request time of the upstream.
       It works with :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       and :ref:`individual_method_stats_allowlist
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.individual_method_stats_allowlist>` the same way
       request_message_count and response_message_count works.
       
      bool enable_upstream_stats = 4;
      Returns:
      This builder for chaining.
    • getReplaceDotsInGrpcServiceName

      public boolean getReplaceDotsInGrpcServiceName()
       If true, the filter will replace dots in the grpc_service_name with underscores before emitting
       the metrics. Only works when :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       is set to true. It could cause metrics to be merged if the edited service name conflicts with
       an existing service. For example there are both service "foo.bar" & "foo_bar" running.
       This config can fix incorrect gRPC metrics with dots because the existing stats tag extractor
       assumes no dots in the gRPC service name. By default this is set as false.
       
      bool replace_dots_in_grpc_service_name = 5;
      Specified by:
      getReplaceDotsInGrpcServiceName in interface FilterConfigOrBuilder
      Returns:
      The replaceDotsInGrpcServiceName.
    • setReplaceDotsInGrpcServiceName

      public FilterConfig.Builder setReplaceDotsInGrpcServiceName(boolean value)
       If true, the filter will replace dots in the grpc_service_name with underscores before emitting
       the metrics. Only works when :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       is set to true. It could cause metrics to be merged if the edited service name conflicts with
       an existing service. For example there are both service "foo.bar" & "foo_bar" running.
       This config can fix incorrect gRPC metrics with dots because the existing stats tag extractor
       assumes no dots in the gRPC service name. By default this is set as false.
       
      bool replace_dots_in_grpc_service_name = 5;
      Parameters:
      value - The replaceDotsInGrpcServiceName to set.
      Returns:
      This builder for chaining.
    • clearReplaceDotsInGrpcServiceName

      public FilterConfig.Builder clearReplaceDotsInGrpcServiceName()
       If true, the filter will replace dots in the grpc_service_name with underscores before emitting
       the metrics. Only works when :ref:`stats_for_all_methods
       <envoy_v3_api_field_extensions.filters.http.grpc_stats.v3.FilterConfig.stats_for_all_methods>`
       is set to true. It could cause metrics to be merged if the edited service name conflicts with
       an existing service. For example there are both service "foo.bar" & "foo_bar" running.
       This config can fix incorrect gRPC metrics with dots because the existing stats tag extractor
       assumes no dots in the gRPC service name. By default this is set as false.
       
      bool replace_dots_in_grpc_service_name = 5;
      Returns:
      This builder for chaining.
    • setUnknownFields

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

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