Interface LocalReplyConfigOrBuilder

  • All Superinterfaces:
    com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder
    All Known Implementing Classes:
    LocalReplyConfig, LocalReplyConfig.Builder

    public interface LocalReplyConfigOrBuilder
    extends com.google.protobuf.MessageOrBuilder
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      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.
      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.
      ResponseMapper getMappers​(int index)
      Configuration of list of mappers which allows to filter and change local response.
      int getMappersCount()
      Configuration of list of mappers which allows to filter and change local response.
      java.util.List<ResponseMapper> getMappersList()
      Configuration of list of mappers which allows to filter and change local response.
      ResponseMapperOrBuilder getMappersOrBuilder​(int index)
      Configuration of list of mappers which allows to filter and change local response.
      java.util.List<? extends ResponseMapperOrBuilder> getMappersOrBuilderList()
      Configuration of list of mappers which allows to filter and change local response.
      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.
      • Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder

        isInitialized
      • Methods inherited from interface com.google.protobuf.MessageOrBuilder

        findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
    • Method Detail

      • getMappersList

        java.util.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;
      • getMappers

        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;
      • getMappersCount

        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;
      • getMappersOrBuilderList

        java.util.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;
      • getMappersOrBuilder

        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;
      • hasBodyFormat

        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;
        Returns:
        Whether the bodyFormat field is set.
      • getBodyFormat

        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;
        Returns:
        The bodyFormat.
      • getBodyFormatOrBuilder

        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;