java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessageV3
io.envoyproxy.envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy
All Implemented Interfaces:
com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, LocalResponsePolicyOrBuilder, Serializable

public final class LocalResponsePolicy extends com.google.protobuf.GeneratedMessageV3 implements LocalResponsePolicyOrBuilder
 Custom response policy to serve a locally stored response to the
 downstream.
 
Protobuf type envoy.extensions.http.custom_response.local_response_policy.v3.LocalResponsePolicy
See Also:
  • Field Details

    • BODY_FIELD_NUMBER

      public static final int BODY_FIELD_NUMBER
      See Also:
    • BODY_FORMAT_FIELD_NUMBER

      public static final int BODY_FORMAT_FIELD_NUMBER
      See Also:
    • STATUS_CODE_FIELD_NUMBER

      public static final int STATUS_CODE_FIELD_NUMBER
      See Also:
    • RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER

      public static final int RESPONSE_HEADERS_TO_ADD_FIELD_NUMBER
      See Also:
  • Method Details

    • newInstance

      protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
      Overrides:
      newInstance in class com.google.protobuf.GeneratedMessageV3
    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
    • hasBody

      public boolean hasBody()
       Optional new local reply body text. It will be used
       in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
       
      .envoy.config.core.v3.DataSource body = 1;
      Specified by:
      hasBody in interface LocalResponsePolicyOrBuilder
      Returns:
      Whether the body field is set.
    • getBody

      public DataSource getBody()
       Optional new local reply body text. It will be used
       in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
       
      .envoy.config.core.v3.DataSource body = 1;
      Specified by:
      getBody in interface LocalResponsePolicyOrBuilder
      Returns:
      The body.
    • getBodyOrBuilder

      public DataSourceOrBuilder getBodyOrBuilder()
       Optional new local reply body text. It will be used
       in the ``%LOCAL_REPLY_BODY%`` command operator in the ``body_format``.
       
      .envoy.config.core.v3.DataSource body = 1;
      Specified by:
      getBodyOrBuilder in interface LocalResponsePolicyOrBuilder
    • hasBodyFormat

      public boolean hasBodyFormat()
       Optional body format to be used for this response. If ``body_format`` is  not
       provided, and ``body`` is, the contents of ``body`` will be used to populate
       the body of the local reply without formatting.
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      hasBodyFormat in interface LocalResponsePolicyOrBuilder
      Returns:
      Whether the bodyFormat field is set.
    • getBodyFormat

      public SubstitutionFormatString getBodyFormat()
       Optional body format to be used for this response. If ``body_format`` is  not
       provided, and ``body`` is, the contents of ``body`` will be used to populate
       the body of the local reply without formatting.
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      getBodyFormat in interface LocalResponsePolicyOrBuilder
      Returns:
      The bodyFormat.
    • getBodyFormatOrBuilder

      public SubstitutionFormatStringOrBuilder getBodyFormatOrBuilder()
       Optional body format to be used for this response. If ``body_format`` is  not
       provided, and ``body`` is, the contents of ``body`` will be used to populate
       the body of the local reply without formatting.
       
      .envoy.config.core.v3.SubstitutionFormatString body_format = 2;
      Specified by:
      getBodyFormatOrBuilder in interface LocalResponsePolicyOrBuilder
    • hasStatusCode

      public boolean hasStatusCode()
       The new response status code if specified.
       
      .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      Specified by:
      hasStatusCode in interface LocalResponsePolicyOrBuilder
      Returns:
      Whether the statusCode field is set.
    • getStatusCode

      public com.google.protobuf.UInt32Value getStatusCode()
       The new response status code if specified.
       
      .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      Specified by:
      getStatusCode in interface LocalResponsePolicyOrBuilder
      Returns:
      The statusCode.
    • getStatusCodeOrBuilder

      public com.google.protobuf.UInt32ValueOrBuilder getStatusCodeOrBuilder()
       The new response status code if specified.
       
      .google.protobuf.UInt32Value status_code = 3 [(.validate.rules) = { ... }
      Specified by:
      getStatusCodeOrBuilder in interface LocalResponsePolicyOrBuilder
    • getResponseHeadersToAddList

      public List<HeaderValueOption> getResponseHeadersToAddList()
       HTTP headers to add to the response. This allows the
       response policy to append, to add or to override headers of
       the original response for local body, or the custom response from the
       remote body, before it is sent to a downstream client.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddList in interface LocalResponsePolicyOrBuilder
    • getResponseHeadersToAddOrBuilderList

      public List<? extends HeaderValueOptionOrBuilder> getResponseHeadersToAddOrBuilderList()
       HTTP headers to add to the response. This allows the
       response policy to append, to add or to override headers of
       the original response for local body, or the custom response from the
       remote body, before it is sent to a downstream client.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddOrBuilderList in interface LocalResponsePolicyOrBuilder
    • getResponseHeadersToAddCount

      public int getResponseHeadersToAddCount()
       HTTP headers to add to the response. This allows the
       response policy to append, to add or to override headers of
       the original response for local body, or the custom response from the
       remote body, before it is sent to a downstream client.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddCount in interface LocalResponsePolicyOrBuilder
    • getResponseHeadersToAdd

      public HeaderValueOption getResponseHeadersToAdd(int index)
       HTTP headers to add to the response. This allows the
       response policy to append, to add or to override headers of
       the original response for local body, or the custom response from the
       remote body, before it is sent to a downstream client.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAdd in interface LocalResponsePolicyOrBuilder
    • getResponseHeadersToAddOrBuilder

      public HeaderValueOptionOrBuilder getResponseHeadersToAddOrBuilder(int index)
       HTTP headers to add to the response. This allows the
       response policy to append, to add or to override headers of
       the original response for local body, or the custom response from the
       remote body, before it is sent to a downstream client.
       
      repeated .envoy.config.core.v3.HeaderValueOption response_headers_to_add = 4 [(.validate.rules) = { ... }
      Specified by:
      getResponseHeadersToAddOrBuilder in interface LocalResponsePolicyOrBuilder
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessageV3
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessageV3
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessageV3
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.google.protobuf.AbstractMessage
    • parseFrom

      public static LocalResponsePolicy parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
      Throws:
      com.google.protobuf.InvalidProtocolBufferException
    • parseFrom

      public static LocalResponsePolicy parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalResponsePolicy parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LocalResponsePolicy parseDelimitedFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static LocalResponsePolicy parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalResponsePolicy parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static LocalResponsePolicy parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • newBuilderForType

      public LocalResponsePolicy.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static LocalResponsePolicy.Builder newBuilder()
    • newBuilder

      public static LocalResponsePolicy.Builder newBuilder(LocalResponsePolicy prototype)
    • toBuilder

      public LocalResponsePolicy.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected LocalResponsePolicy.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
      Specified by:
      newBuilderForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstance

      public static LocalResponsePolicy getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<LocalResponsePolicy> parser()
    • getParserForType

      public com.google.protobuf.Parser<LocalResponsePolicy> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessageV3
    • getDefaultInstanceForType

      public LocalResponsePolicy getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder