java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>
com.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.Builder
All Implemented Interfaces:
com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, LocalReplyConfigOrBuilder, Cloneable
Enclosing class:
LocalReplyConfig

public static final class LocalReplyConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder> implements LocalReplyConfigOrBuilder
 The configuration to customize local reply returned by Envoy.
 
Protobuf type envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
  • Field Details

  • Constructor Details

    • Builder

      private Builder()
    • Builder

      private Builder(com.google.protobuf.AbstractMessage.BuilderParent parent)
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
    • maybeForceBuilderInitialization

      private void maybeForceBuilderInitialization()
    • clear

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

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

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

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

      private void buildPartialRepeatedFields(LocalReplyConfig result)
    • buildPartial0

      private void buildPartial0(LocalReplyConfig result)
    • mergeFrom

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

      public LocalReplyConfig.Builder mergeFrom(LocalReplyConfig other)
    • isInitialized

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

      public LocalReplyConfig.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<LocalReplyConfig.Builder>
      Throws:
      IOException
    • ensureMappersIsMutable

      private void ensureMappersIsMutable()
    • getMappersList

      public List<ResponseMapper> getMappersList()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
      Specified by:
      getMappersList in interface LocalReplyConfigOrBuilder
    • getMappersCount

      public int getMappersCount()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
      Specified by:
      getMappersCount in interface LocalReplyConfigOrBuilder
    • getMappers

      public ResponseMapper getMappers(int index)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
      Specified by:
      getMappers in interface LocalReplyConfigOrBuilder
    • setMappers

      public LocalReplyConfig.Builder setMappers(int index, ResponseMapper value)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • setMappers

      public LocalReplyConfig.Builder setMappers(int index, ResponseMapper.Builder builderForValue)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addMappers

      public LocalReplyConfig.Builder addMappers(ResponseMapper value)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addMappers

      public LocalReplyConfig.Builder addMappers(int index, ResponseMapper value)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addMappers

      public LocalReplyConfig.Builder addMappers(ResponseMapper.Builder builderForValue)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addMappers

      public LocalReplyConfig.Builder addMappers(int index, ResponseMapper.Builder builderForValue)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addAllMappers

      public LocalReplyConfig.Builder addAllMappers(Iterable<? extends ResponseMapper> values)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • clearMappers

      public LocalReplyConfig.Builder clearMappers()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • removeMappers

      public LocalReplyConfig.Builder removeMappers(int index)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • getMappersBuilder

      public ResponseMapper.Builder getMappersBuilder(int index)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • getMappersOrBuilder

      public ResponseMapperOrBuilder getMappersOrBuilder(int index)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
      Specified by:
      getMappersOrBuilder in interface LocalReplyConfigOrBuilder
    • getMappersOrBuilderList

      public List<? extends ResponseMapperOrBuilder> getMappersOrBuilderList()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
      Specified by:
      getMappersOrBuilderList in interface LocalReplyConfigOrBuilder
    • addMappersBuilder

      public ResponseMapper.Builder addMappersBuilder()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • addMappersBuilder

      public ResponseMapper.Builder addMappersBuilder(int index)
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • getMappersBuilderList

      public List<ResponseMapper.Builder> getMappersBuilderList()
       Configuration of list of mappers which allows to filter and change local response.
       The mappers will be checked by the specified order until one is matched.
       
      repeated .envoy.extensions.filters.network.http_connection_manager.v3.ResponseMapper mappers = 1;
    • internalGetMappersFieldBuilder

      private com.google.protobuf.RepeatedFieldBuilder<ResponseMapper,ResponseMapper.Builder,ResponseMapperOrBuilder> internalGetMappersFieldBuilder()
    • hasBodyFormat

      public boolean hasBodyFormat()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      hasBodyFormat in interface LocalReplyConfigOrBuilder
      Returns:
      Whether the bodyFormat field is set.
    • getBodyFormat

      public SubstitutionFormatString getBodyFormat()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      getBodyFormat in interface LocalReplyConfigOrBuilder
      Returns:
      The bodyFormat.
    • setBodyFormat

      public LocalReplyConfig.Builder setBodyFormat(SubstitutionFormatString value)
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
    • setBodyFormat

      public LocalReplyConfig.Builder setBodyFormat(SubstitutionFormatString.Builder builderForValue)
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
    • mergeBodyFormat

      public LocalReplyConfig.Builder mergeBodyFormat(SubstitutionFormatString value)
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
    • clearBodyFormat

      public LocalReplyConfig.Builder clearBodyFormat()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
    • getBodyFormatBuilder

      public SubstitutionFormatString.Builder getBodyFormatBuilder()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
    • getBodyFormatOrBuilder

      public SubstitutionFormatStringOrBuilder getBodyFormatOrBuilder()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      getBodyFormatOrBuilder in interface LocalReplyConfigOrBuilder
    • internalGetBodyFormatFieldBuilder

      private com.google.protobuf.SingleFieldBuilder<SubstitutionFormatString,SubstitutionFormatString.Builder,SubstitutionFormatStringOrBuilder> internalGetBodyFormatFieldBuilder()
       The configuration to form response body from the :ref:`command operators <config_access_log_command_operators>`
       and to specify response content type as one of: plain/text or application/json.
      
       Example one: "plain/text" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       text_format: "%LOCAL_REPLY_BODY%:%RESPONSE_CODE%:path=%REQ(:path)%\n"
      
       The following response body in "plain/text" format will be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: text
      
       upstream connect error:503:path=/foo
      
       Example two: "application/json" ``body_format``.
      
       .. validated-code-block:: yaml
       :type-name: envoy.config.core.v3.SubstitutionFormatString
      
       json_format:
       status: "%RESPONSE_CODE%"
       message: "%LOCAL_REPLY_BODY%"
       path: "%REQ(:path)%"
      
       The following response body in "application/json" format would be generated for a request with
       local reply body of "upstream connection error", response_code=503 and path=/foo.
      
       .. code-block:: json
      
       {
       "status": 503,
       "message": "upstream connection error",
       "path": "/foo"
       }
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;