Class Condition
- java.lang.Object
-
- software.amazon.awssdk.services.s3.model.Condition
-
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Condition.Builder,Condition>
@Generated("software.amazon.awssdk:codegen") public final class Condition extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Condition.Builder,Condition>
A container for describing a condition that must be met for the specified redirect to apply. For example, 1. If request is for pages in the
/docs
folder, redirect to the/documents
folder. 2. If request results in HTTP error 4xx, redirect request to another host where you might process the error.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
Condition.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Condition.Builder
builder()
boolean
equals(Object obj)
boolean
equalsBySdkFields(Object obj)
<T> Optional<T>
getValueForField(String fieldName, Class<T> clazz)
int
hashCode()
String
httpErrorCodeReturnedEquals()
The HTTP error code when the redirect is applied.String
keyPrefixEquals()
The object key name prefix when the redirect is applied.List<SdkField<?>>
sdkFields()
static Class<? extends Condition.Builder>
serializableBuilderClass()
Condition.Builder
toBuilder()
String
toString()
Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
httpErrorCodeReturnedEquals
public final String httpErrorCodeReturnedEquals()
The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this value, then the specified redirect is applied. Required when parent element
Condition
is specified and siblingKeyPrefixEquals
is not specified. If both are specified, then both must be true for the redirect to be applied.- Returns:
- The HTTP error code when the redirect is applied. In the event of an error, if the error code equals this
value, then the specified redirect is applied. Required when parent element
Condition
is specified and siblingKeyPrefixEquals
is not specified. If both are specified, then both must be true for the redirect to be applied.
-
keyPrefixEquals
public final String keyPrefixEquals()
The object key name prefix when the redirect is applied. For example, to redirect requests for
ExamplePage.html
, the key prefix will beExamplePage.html
. To redirect request for all pages with the prefixdocs/
, the key prefix will be/docs
, which identifies all objects in thedocs/
folder. Required when the parent elementCondition
is specified and siblingHttpErrorCodeReturnedEquals
is not specified. If both conditions are specified, both must be true for the redirect to be applied.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 name prefix when the redirect is applied. For example, to redirect requests for
ExamplePage.html
, the key prefix will beExamplePage.html
. To redirect request for all pages with the prefixdocs/
, the key prefix will be/docs
, which identifies all objects in thedocs/
folder. Required when the parent elementCondition
is specified and siblingHttpErrorCodeReturnedEquals
is not specified. If both conditions are specified, both must be true for the redirect to be applied.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.
-
toBuilder
public Condition.Builder toBuilder()
- Specified by:
toBuilder
in interfaceToCopyableBuilder<Condition.Builder,Condition>
-
builder
public static Condition.Builder builder()
-
serializableBuilderClass
public static Class<? extends Condition.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFields
in interfaceSdkPojo
-
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.
-
-