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 intbitField0_private SubstitutionFormatStringbodyFormat_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.BuilderaddAllMappers(java.lang.Iterable<? extends ResponseMapper> values)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuilderaddMappers(int index, ResponseMapper value)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuilderaddMappers(int index, ResponseMapper.Builder builderForValue)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuilderaddMappers(ResponseMapper value)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuilderaddMappers(ResponseMapper.Builder builderForValue)Configuration of list of mappers which allows to filter and change local response.ResponseMapper.BuilderaddMappersBuilder()Configuration of list of mappers which allows to filter and change local response.ResponseMapper.BuilderaddMappersBuilder(int index)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfigbuild()LocalReplyConfigbuildPartial()private voidbuildPartial0(LocalReplyConfig result)private voidbuildPartialRepeatedFields(LocalReplyConfig result)LocalReplyConfig.Builderclear()LocalReplyConfig.BuilderclearBodyFormat()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.BuilderclearMappers()Configuration of list of mappers which allows to filter and change local response.private voidensureMappersIsMutable()SubstitutionFormatStringgetBodyFormat()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.BuildergetBodyFormatBuilder()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.SubstitutionFormatStringOrBuildergetBodyFormatOrBuilder()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.LocalReplyConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()ResponseMappergetMappers(int index)Configuration of list of mappers which allows to filter and change local response.ResponseMapper.BuildergetMappersBuilder(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.intgetMappersCount()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.ResponseMapperOrBuildergetMappersOrBuilder(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.booleanhasBodyFormat()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.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()private voidmaybeForceBuilderInitialization()LocalReplyConfig.BuildermergeBodyFormat(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.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)LocalReplyConfig.BuildermergeFrom(com.google.protobuf.Message other)LocalReplyConfig.BuildermergeFrom(LocalReplyConfig other)LocalReplyConfig.BuilderremoveMappers(int index)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuildersetBodyFormat(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.BuildersetBodyFormat(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.BuildersetMappers(int index, ResponseMapper value)Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuildersetMappers(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
maybeForceBuilderInitialization
private void maybeForceBuilderInitialization()
-
clear
public LocalReplyConfig.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<LocalReplyConfig.Builder>
-
getDefaultInstanceForType
public LocalReplyConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public LocalReplyConfig build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public LocalReplyConfig buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<LocalReplyConfig.Builder>
-
mergeFrom
public LocalReplyConfig.Builder mergeFrom(LocalReplyConfig other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin 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:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin 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:
getMappersListin 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:
getMappersCountin 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:
getMappersin 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:
getMappersOrBuilderin 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:
getMappersOrBuilderListin 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:
hasBodyFormatin 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:
getBodyFormatin 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:
getBodyFormatOrBuilderin 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;
-
-