Class InternalRedirectPolicy

  • All Implemented Interfaces:
    com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, InternalRedirectPolicyOrBuilder, java.io.Serializable

    public final class InternalRedirectPolicy
    extends com.google.protobuf.GeneratedMessage
    implements InternalRedirectPolicyOrBuilder
     HTTP Internal Redirect :ref:`architecture overview <arch_overview_internal_redirects>`.
     [#next-free-field: 6]
     
    Protobuf type envoy.config.route.v3.InternalRedirectPolicy
    See Also:
    Serialized Form
    • Field Detail

      • bitField0_

        private int bitField0_
      • MAX_INTERNAL_REDIRECTS_FIELD_NUMBER

        public static final int MAX_INTERNAL_REDIRECTS_FIELD_NUMBER
        See Also:
        Constant Field Values
      • maxInternalRedirects_

        private com.google.protobuf.UInt32Value maxInternalRedirects_
      • REDIRECT_RESPONSE_CODES_FIELD_NUMBER

        public static final int REDIRECT_RESPONSE_CODES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • redirectResponseCodes_

        private com.google.protobuf.Internal.IntList redirectResponseCodes_
      • redirectResponseCodesMemoizedSerializedSize

        private int redirectResponseCodesMemoizedSerializedSize
      • PREDICATES_FIELD_NUMBER

        public static final int PREDICATES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ALLOW_CROSS_SCHEME_REDIRECT_FIELD_NUMBER

        public static final int ALLOW_CROSS_SCHEME_REDIRECT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • allowCrossSchemeRedirect_

        private boolean allowCrossSchemeRedirect_
      • RESPONSE_HEADERS_TO_COPY_FIELD_NUMBER

        public static final int RESPONSE_HEADERS_TO_COPY_FIELD_NUMBER
        See Also:
        Constant Field Values
      • responseHeadersToCopy_

        private com.google.protobuf.LazyStringArrayList responseHeadersToCopy_
      • memoizedIsInitialized

        private byte memoizedIsInitialized
    • Constructor Detail

      • InternalRedirectPolicy

        private InternalRedirectPolicy​(com.google.protobuf.GeneratedMessage.Builder<?> builder)
      • InternalRedirectPolicy

        private InternalRedirectPolicy()
    • Method Detail

      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage
      • hasMaxInternalRedirects

        public boolean hasMaxInternalRedirects()
         An internal redirect is not handled, unless the number of previous internal redirects that a
         downstream request has encountered is lower than this value.
         In the case where a downstream request is bounced among multiple routes by internal redirect,
         the first route that hits this threshold, or does not set :ref:`internal_redirect_policy
         <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_policy>`
         will pass the redirect back to downstream.
        
         If not specified, at most one redirect will be followed.
         
        .google.protobuf.UInt32Value max_internal_redirects = 1;
        Specified by:
        hasMaxInternalRedirects in interface InternalRedirectPolicyOrBuilder
        Returns:
        Whether the maxInternalRedirects field is set.
      • getMaxInternalRedirects

        public com.google.protobuf.UInt32Value getMaxInternalRedirects()
         An internal redirect is not handled, unless the number of previous internal redirects that a
         downstream request has encountered is lower than this value.
         In the case where a downstream request is bounced among multiple routes by internal redirect,
         the first route that hits this threshold, or does not set :ref:`internal_redirect_policy
         <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_policy>`
         will pass the redirect back to downstream.
        
         If not specified, at most one redirect will be followed.
         
        .google.protobuf.UInt32Value max_internal_redirects = 1;
        Specified by:
        getMaxInternalRedirects in interface InternalRedirectPolicyOrBuilder
        Returns:
        The maxInternalRedirects.
      • getMaxInternalRedirectsOrBuilder

        public com.google.protobuf.UInt32ValueOrBuilder getMaxInternalRedirectsOrBuilder()
         An internal redirect is not handled, unless the number of previous internal redirects that a
         downstream request has encountered is lower than this value.
         In the case where a downstream request is bounced among multiple routes by internal redirect,
         the first route that hits this threshold, or does not set :ref:`internal_redirect_policy
         <envoy_v3_api_field_config.route.v3.RouteAction.internal_redirect_policy>`
         will pass the redirect back to downstream.
        
         If not specified, at most one redirect will be followed.
         
        .google.protobuf.UInt32Value max_internal_redirects = 1;
        Specified by:
        getMaxInternalRedirectsOrBuilder in interface InternalRedirectPolicyOrBuilder
      • getRedirectResponseCodesList

        public java.util.List<java.lang.Integer> getRedirectResponseCodesList()
         Defines what upstream response codes are allowed to trigger internal redirect. If unspecified,
         only 302 will be treated as internal redirect.
         Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored.
         
        repeated uint32 redirect_response_codes = 2 [(.validate.rules) = { ... }
        Specified by:
        getRedirectResponseCodesList in interface InternalRedirectPolicyOrBuilder
        Returns:
        A list containing the redirectResponseCodes.
      • getRedirectResponseCodesCount

        public int getRedirectResponseCodesCount()
         Defines what upstream response codes are allowed to trigger internal redirect. If unspecified,
         only 302 will be treated as internal redirect.
         Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored.
         
        repeated uint32 redirect_response_codes = 2 [(.validate.rules) = { ... }
        Specified by:
        getRedirectResponseCodesCount in interface InternalRedirectPolicyOrBuilder
        Returns:
        The count of redirectResponseCodes.
      • getRedirectResponseCodes

        public int getRedirectResponseCodes​(int index)
         Defines what upstream response codes are allowed to trigger internal redirect. If unspecified,
         only 302 will be treated as internal redirect.
         Only 301, 302, 303, 307 and 308 are valid values. Any other codes will be ignored.
         
        repeated uint32 redirect_response_codes = 2 [(.validate.rules) = { ... }
        Specified by:
        getRedirectResponseCodes in interface InternalRedirectPolicyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The redirectResponseCodes at the given index.
      • getPredicatesList

        public java.util.List<TypedExtensionConfig> getPredicatesList()
         Specifies a list of predicates that are queried when an upstream response is deemed
         to trigger an internal redirect by all other criteria. Any predicate in the list can reject
         the redirect, causing the response to be proxied to downstream.
         [#extension-category: envoy.internal_redirect_predicates]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig predicates = 3;
        Specified by:
        getPredicatesList in interface InternalRedirectPolicyOrBuilder
      • getPredicatesOrBuilderList

        public java.util.List<? extends TypedExtensionConfigOrBuilder> getPredicatesOrBuilderList()
         Specifies a list of predicates that are queried when an upstream response is deemed
         to trigger an internal redirect by all other criteria. Any predicate in the list can reject
         the redirect, causing the response to be proxied to downstream.
         [#extension-category: envoy.internal_redirect_predicates]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig predicates = 3;
        Specified by:
        getPredicatesOrBuilderList in interface InternalRedirectPolicyOrBuilder
      • getPredicatesCount

        public int getPredicatesCount()
         Specifies a list of predicates that are queried when an upstream response is deemed
         to trigger an internal redirect by all other criteria. Any predicate in the list can reject
         the redirect, causing the response to be proxied to downstream.
         [#extension-category: envoy.internal_redirect_predicates]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig predicates = 3;
        Specified by:
        getPredicatesCount in interface InternalRedirectPolicyOrBuilder
      • getPredicates

        public TypedExtensionConfig getPredicates​(int index)
         Specifies a list of predicates that are queried when an upstream response is deemed
         to trigger an internal redirect by all other criteria. Any predicate in the list can reject
         the redirect, causing the response to be proxied to downstream.
         [#extension-category: envoy.internal_redirect_predicates]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig predicates = 3;
        Specified by:
        getPredicates in interface InternalRedirectPolicyOrBuilder
      • getPredicatesOrBuilder

        public TypedExtensionConfigOrBuilder getPredicatesOrBuilder​(int index)
         Specifies a list of predicates that are queried when an upstream response is deemed
         to trigger an internal redirect by all other criteria. Any predicate in the list can reject
         the redirect, causing the response to be proxied to downstream.
         [#extension-category: envoy.internal_redirect_predicates]
         
        repeated .envoy.config.core.v3.TypedExtensionConfig predicates = 3;
        Specified by:
        getPredicatesOrBuilder in interface InternalRedirectPolicyOrBuilder
      • getAllowCrossSchemeRedirect

        public boolean getAllowCrossSchemeRedirect()
         Allow internal redirect to follow a target URI with a different scheme than the value of
         x-forwarded-proto. The default is false.
         
        bool allow_cross_scheme_redirect = 4;
        Specified by:
        getAllowCrossSchemeRedirect in interface InternalRedirectPolicyOrBuilder
        Returns:
        The allowCrossSchemeRedirect.
      • getResponseHeadersToCopyList

        public com.google.protobuf.ProtocolStringList getResponseHeadersToCopyList()
         Specifies a list of headers, by name, to copy from the internal redirect into the subsequent
         request. If a header is specified here but not present in the redirect, it will be cleared in
         the subsequent request.
         
        repeated string response_headers_to_copy = 5 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToCopyList in interface InternalRedirectPolicyOrBuilder
        Returns:
        A list containing the responseHeadersToCopy.
      • getResponseHeadersToCopyCount

        public int getResponseHeadersToCopyCount()
         Specifies a list of headers, by name, to copy from the internal redirect into the subsequent
         request. If a header is specified here but not present in the redirect, it will be cleared in
         the subsequent request.
         
        repeated string response_headers_to_copy = 5 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToCopyCount in interface InternalRedirectPolicyOrBuilder
        Returns:
        The count of responseHeadersToCopy.
      • getResponseHeadersToCopy

        public java.lang.String getResponseHeadersToCopy​(int index)
         Specifies a list of headers, by name, to copy from the internal redirect into the subsequent
         request. If a header is specified here but not present in the redirect, it will be cleared in
         the subsequent request.
         
        repeated string response_headers_to_copy = 5 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToCopy in interface InternalRedirectPolicyOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The responseHeadersToCopy at the given index.
      • getResponseHeadersToCopyBytes

        public com.google.protobuf.ByteString getResponseHeadersToCopyBytes​(int index)
         Specifies a list of headers, by name, to copy from the internal redirect into the subsequent
         request. If a header is specified here but not present in the redirect, it will be cleared in
         the subsequent request.
         
        repeated string response_headers_to_copy = 5 [(.validate.rules) = { ... }
        Specified by:
        getResponseHeadersToCopyBytes in interface InternalRedirectPolicyOrBuilder
        Parameters:
        index - The index of the value to return.
        Returns:
        The bytes of the responseHeadersToCopy at the given index.
      • isInitialized

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

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

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

        public boolean equals​(java.lang.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 InternalRedirectPolicy parseFrom​(java.nio.ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InternalRedirectPolicy parseFrom​(java.nio.ByteBuffer data,
                                                       com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

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

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

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

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

        public static InternalRedirectPolicy parseFrom​(java.io.InputStream input)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

        public static InternalRedirectPolicy parseDelimitedFrom​(java.io.InputStream input)
                                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • parseDelimitedFrom

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

        public static InternalRedirectPolicy parseFrom​(com.google.protobuf.CodedInputStream input)
                                                throws java.io.IOException
        Throws:
        java.io.IOException
      • parseFrom

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

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

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

        protected InternalRedirectPolicy.Builder newBuilderForType​(com.google.protobuf.AbstractMessage.BuilderParent parent)
        Overrides:
        newBuilderForType in class com.google.protobuf.AbstractMessage
      • getParserForType

        public com.google.protobuf.Parser<InternalRedirectPolicy> 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.GeneratedMessage
      • getDefaultInstanceForType

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