public final class LocalReplyConfig extends com.google.protobuf.GeneratedMessageV3 implements LocalReplyConfigOrBuilder
The configuration to customize local reply returned by Envoy.Protobuf type
envoy.extensions.filters.network.http_connection_manager.v4alpha.LocalReplyConfig| Modifier and Type | Class and Description |
|---|---|
static class |
LocalReplyConfig.Builder
The configuration to customize local reply returned by Envoy.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
BODY_FORMAT_FIELD_NUMBER |
static int |
MAPPERS_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
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.
|
static LocalReplyConfig |
getDefaultInstance() |
LocalReplyConfig |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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.
|
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.
|
List<? extends ResponseMapperOrBuilder> |
getMappersOrBuilderList()
Configuration of list of mappers which allows to filter and change local response.
|
com.google.protobuf.Parser<LocalReplyConfig> |
getParserForType() |
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
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.
|
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
boolean |
isInitialized() |
static LocalReplyConfig.Builder |
newBuilder() |
static LocalReplyConfig.Builder |
newBuilder(LocalReplyConfig prototype) |
LocalReplyConfig.Builder |
newBuilderForType() |
protected LocalReplyConfig.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static LocalReplyConfig |
parseDelimitedFrom(InputStream input) |
static LocalReplyConfig |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LocalReplyConfig |
parseFrom(byte[] data) |
static LocalReplyConfig |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LocalReplyConfig |
parseFrom(ByteBuffer data) |
static LocalReplyConfig |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LocalReplyConfig |
parseFrom(com.google.protobuf.ByteString data) |
static LocalReplyConfig |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LocalReplyConfig |
parseFrom(com.google.protobuf.CodedInputStream input) |
static LocalReplyConfig |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static LocalReplyConfig |
parseFrom(InputStream input) |
static LocalReplyConfig |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<LocalReplyConfig> |
parser() |
LocalReplyConfig.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int MAPPERS_FIELD_NUMBER
public static final int BODY_FORMAT_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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.v4alpha.ResponseMapper mappers = 1;getMappersList in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.ResponseMapper mappers = 1;getMappersOrBuilderList in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.ResponseMapper mappers = 1;getMappersCount in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.ResponseMapper mappers = 1;getMappers in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.ResponseMapper mappers = 1;getMappersOrBuilder in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.SubstitutionFormatString body_format = 2;hasBodyFormat in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.SubstitutionFormatString body_format = 2;getBodyFormat in interface LocalReplyConfigOrBuilderpublic 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.v4alpha.SubstitutionFormatString body_format = 2;getBodyFormatOrBuilder in interface LocalReplyConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static LocalReplyConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static LocalReplyConfig parseFrom(InputStream input) throws IOException
IOExceptionpublic static LocalReplyConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LocalReplyConfig parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static LocalReplyConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static LocalReplyConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static LocalReplyConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic LocalReplyConfig.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static LocalReplyConfig.Builder newBuilder()
public static LocalReplyConfig.Builder newBuilder(LocalReplyConfig prototype)
public LocalReplyConfig.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected LocalReplyConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static LocalReplyConfig getDefaultInstance()
public static com.google.protobuf.Parser<LocalReplyConfig> parser()
public com.google.protobuf.Parser<LocalReplyConfig> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public LocalReplyConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2018–2021 The Envoy Project. All rights reserved.