Class InternalRedirectPolicy

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

    public final class InternalRedirectPolicy
    extends com.google.protobuf.GeneratedMessageV3
    implements InternalRedirectPolicyOrBuilder
     HTTP Internal Redirect :ref:`architecture overview <arch_overview_internal_redirects>`.
     
    Protobuf type envoy.config.route.v3.InternalRedirectPolicy
    See Also:
    Serialized Form
    • Field Detail

      • MAX_INTERNAL_REDIRECTS_FIELD_NUMBER

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

        public static final int REDIRECT_RESPONSE_CODES_FIELD_NUMBER
        See Also:
        Constant Field Values
      • 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
    • Method Detail

      • newInstance

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

        public final com.google.protobuf.UnknownFieldSet getUnknownFields()
        Specified by:
        getUnknownFields in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getUnknownFields 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
      • 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 List<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 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 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.
      • 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 InternalRedirectPolicy parseFrom​(ByteBuffer data)
                                                throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static InternalRedirectPolicy parseFrom​(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
      • 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.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • 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.GeneratedMessageV3
      • getDefaultInstanceForType

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