Class 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.GeneratedMessageV3.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
    • 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<LocalReplyConfig.Builder>
      • 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

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

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

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

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

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

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

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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
      • 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;
      • 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
      • setUnknownFields

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

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