Class LocalReplyConfig.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- 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
,java.lang.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 typeenvoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
-
-
Field Summary
Fields Modifier and Type Field Description private int
bitField0_
private SubstitutionFormatString
bodyFormat_
private com.google.protobuf.SingleFieldBuilder<SubstitutionFormatString,SubstitutionFormatString.Builder,SubstitutionFormatStringOrBuilder>
bodyFormatBuilder_
private java.util.List<ResponseMapper>
mappers_
private com.google.protobuf.RepeatedFieldBuilder<ResponseMapper,ResponseMapper.Builder,ResponseMapperOrBuilder>
mappersBuilder_
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalReplyConfig.Builder
addAllMappers(java.lang.Iterable<? extends ResponseMapper> values)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.Builder
addMappers(int index, ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.Builder
addMappers(int index, ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.Builder
addMappers(ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.Builder
addMappers(ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.ResponseMapper.Builder
addMappersBuilder()
Configuration of list of mappers which allows to filter and change local response.ResponseMapper.Builder
addMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig
build()
LocalReplyConfig
buildPartial()
private void
buildPartial0(LocalReplyConfig result)
private void
buildPartialRepeatedFields(LocalReplyConfig result)
LocalReplyConfig.Builder
clear()
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.LocalReplyConfig.Builder
clearMappers()
Configuration of list of mappers which allows to filter and change local response.private void
ensureMappersIsMutable()
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.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.private com.google.protobuf.SingleFieldBuilder<SubstitutionFormatString,SubstitutionFormatString.Builder,SubstitutionFormatStringOrBuilder>
getBodyFormatFieldBuilder()
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.LocalReplyConfig
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
ResponseMapper
getMappers(int index)
Configuration of list of mappers which allows to filter and change local response.ResponseMapper.Builder
getMappersBuilder(int index)
Configuration of list of mappers which allows to filter and change local response.java.util.List<ResponseMapper.Builder>
getMappersBuilderList()
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.private com.google.protobuf.RepeatedFieldBuilder<ResponseMapper,ResponseMapper.Builder,ResponseMapperOrBuilder>
getMappersFieldBuilder()
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.protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
private void
maybeForceBuilderInitialization()
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.LocalReplyConfig.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
LocalReplyConfig.Builder
mergeFrom(com.google.protobuf.Message other)
LocalReplyConfig.Builder
mergeFrom(LocalReplyConfig other)
LocalReplyConfig.Builder
removeMappers(int index)
Configuration of list of mappers which allows to filter and change local response.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.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.LocalReplyConfig.Builder
setMappers(int index, ResponseMapper value)
Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.Builder
setMappers(int index, ResponseMapper.Builder builderForValue)
Configuration of list of mappers which allows to filter and change local response.-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
bitField0_
private int bitField0_
-
mappers_
private java.util.List<ResponseMapper> mappers_
-
mappersBuilder_
private com.google.protobuf.RepeatedFieldBuilder<ResponseMapper,ResponseMapper.Builder,ResponseMapperOrBuilder> mappersBuilder_
-
bodyFormat_
private SubstitutionFormatString bodyFormat_
-
bodyFormatBuilder_
private com.google.protobuf.SingleFieldBuilder<SubstitutionFormatString,SubstitutionFormatString.Builder,SubstitutionFormatStringOrBuilder> bodyFormatBuilder_
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization()
-
clear
public LocalReplyConfig.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
getDefaultInstanceForType
public LocalReplyConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public LocalReplyConfig build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LocalReplyConfig buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.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 interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>
-
mergeFrom
public LocalReplyConfig.Builder mergeFrom(LocalReplyConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
mergeFrom
public LocalReplyConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>
- Throws:
java.io.IOException
-
ensureMappersIsMutable
private void ensureMappersIsMutable()
-
getMappersList
public 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;
- Specified by:
getMappersList
in interfaceLocalReplyConfigOrBuilder
-
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 interfaceLocalReplyConfigOrBuilder
-
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 interfaceLocalReplyConfigOrBuilder
-
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(java.lang.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 interfaceLocalReplyConfigOrBuilder
-
getMappersOrBuilderList
public 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;
- Specified by:
getMappersOrBuilderList
in interfaceLocalReplyConfigOrBuilder
-
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 java.util.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;
-
getMappersFieldBuilder
private com.google.protobuf.RepeatedFieldBuilder<ResponseMapper,ResponseMapper.Builder,ResponseMapperOrBuilder> getMappersFieldBuilder()
-
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 interfaceLocalReplyConfigOrBuilder
- 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 interfaceLocalReplyConfigOrBuilder
- 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 interfaceLocalReplyConfigOrBuilder
-
getBodyFormatFieldBuilder
private com.google.protobuf.SingleFieldBuilder<SubstitutionFormatString,SubstitutionFormatString.Builder,SubstitutionFormatStringOrBuilder> getBodyFormatFieldBuilder()
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;
-
-