Class Redirect

    • Method Detail

      • hostName

        public final String hostName()

        The host name to use in the redirect request.

        Returns:
        The host name to use in the redirect request.
      • httpRedirectCode

        public final String httpRedirectCode()

        The HTTP redirect code to use on the response. Not required if one of the siblings is present.

        Returns:
        The HTTP redirect code to use on the response. Not required if one of the siblings is present.
      • protocol

        public final Protocol protocol()

        Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

        If the service returns an enum value that is not available in the current SDK version, protocol will return Protocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

        Returns:
        Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
        See Also:
        Protocol
      • protocolAsString

        public final String protocolAsString()

        Protocol to use when redirecting requests. The default is the protocol that is used in the original request.

        If the service returns an enum value that is not available in the current SDK version, protocol will return Protocol.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from protocolAsString().

        Returns:
        Protocol to use when redirecting requests. The default is the protocol that is used in the original request.
        See Also:
        Protocol
      • replaceKeyPrefixWith

        public final String replaceKeyPrefixWith()

        The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

        Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

        Returns:
        The object key prefix to use in the redirect request. For example, to redirect requests for all pages with prefix docs/ (objects in the docs/ folder) to documents/, you can set a condition block with KeyPrefixEquals set to docs/ and in the Redirect set ReplaceKeyPrefixWith to /documents. Not required if one of the siblings is present. Can be present only if ReplaceKeyWith is not provided.

        Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

      • replaceKeyWith

        public final String replaceKeyWith()

        The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

        Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

        Returns:
        The specific object key to use in the redirect request. For example, redirect request to error.html. Not required if one of the siblings is present. Can be present only if ReplaceKeyPrefixWith is not provided.

        Replacement must be made for object keys containing special characters (such as carriage returns) when using XML requests. For more information, see XML related object key constraints.

      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object
      • equals

        public final boolean equals​(Object obj)
        Overrides:
        equals in class Object
      • toString

        public final String toString()
        Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value.
        Overrides:
        toString in class Object
      • getValueForField

        public final <T> Optional<T> getValueForField​(String fieldName,
                                                      Class<T> clazz)