Class LocalReplyConfig.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
- io.envoyproxy.envoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,LocalReplyConfigOrBuilder,Cloneable
- Enclosing class:
- LocalReplyConfig
public static final class LocalReplyConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder> implements LocalReplyConfigOrBuilder
The configuration to customize local reply returned by Envoy.
Protobuf typeenvoy.extensions.filters.network.http_connection_manager.v3.LocalReplyConfig
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description LocalReplyConfig.BuilderaddAllMappers(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.LocalReplyConfig.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)LocalReplyConfigbuild()LocalReplyConfigbuildPartial()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.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)LocalReplyConfig.BuilderclearMappers()Configuration of list of mappers which allows to filter and change local response.LocalReplyConfig.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)LocalReplyConfig.Builderclone()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.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.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.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.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.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()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.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)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.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)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.LocalReplyConfig.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)LocalReplyConfig.BuildersetUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
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.GeneratedMessageV3.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.GeneratedMessageV3.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
-
clone
public LocalReplyConfig.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
setField
public LocalReplyConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
clearField
public LocalReplyConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
clearOneof
public LocalReplyConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
setRepeatedField
public LocalReplyConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
addRepeatedField
public LocalReplyConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
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.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
mergeFrom
public LocalReplyConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws 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:
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:
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(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 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 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:
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
-
setUnknownFields
public final LocalReplyConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
mergeUnknownFields
public final LocalReplyConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<LocalReplyConfig.Builder>
-
-