Class ArchiveRetention
- java.lang.Object
-
- software.amazon.awssdk.services.mailmanager.model.ArchiveRetention
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<ArchiveRetention.Builder,ArchiveRetention>
@Generated("software.amazon.awssdk:codegen") public final class ArchiveRetention extends Object implements SdkPojo, Serializable, ToCopyableBuilder<ArchiveRetention.Builder,ArchiveRetention>
The retention policy for an email archive that specifies how long emails are kept before being automatically deleted.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceArchiveRetention.Builderstatic classArchiveRetention.Type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArchiveRetention.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)static ArchiveRetentionfromRetentionPeriod(String retentionPeriod)Create an instance of this class withretentionPeriodAsString()initialized to the given value.static ArchiveRetentionfromRetentionPeriod(RetentionPeriod retentionPeriod)Create an instance of this class withretentionPeriodAsString()initialized to the given value.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()RetentionPeriodretentionPeriod()The enum value sets the period for retaining emails in an archive.StringretentionPeriodAsString()The enum value sets the period for retaining emails in an archive.List<SdkField<?>>sdkFields()static Class<? extends ArchiveRetention.Builder>serializableBuilderClass()ArchiveRetention.BuildertoBuilder()StringtoString()Returns a string representation of this object.ArchiveRetention.Typetype()Retrieve an enum value representing which member of this object is populated.-
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
-
retentionPeriod
public final RetentionPeriod retentionPeriod()
The enum value sets the period for retaining emails in an archive.
If the service returns an enum value that is not available in the current SDK version,
retentionPeriodwill returnRetentionPeriod.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromretentionPeriodAsString().- Returns:
- The enum value sets the period for retaining emails in an archive.
- See Also:
RetentionPeriod
-
retentionPeriodAsString
public final String retentionPeriodAsString()
The enum value sets the period for retaining emails in an archive.
If the service returns an enum value that is not available in the current SDK version,
retentionPeriodwill returnRetentionPeriod.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromretentionPeriodAsString().- Returns:
- The enum value sets the period for retaining emails in an archive.
- See Also:
RetentionPeriod
-
toBuilder
public ArchiveRetention.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<ArchiveRetention.Builder,ArchiveRetention>
-
builder
public static ArchiveRetention.Builder builder()
-
serializableBuilderClass
public static Class<? extends ArchiveRetention.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin 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.
-
fromRetentionPeriod
public static ArchiveRetention fromRetentionPeriod(String retentionPeriod)
Create an instance of this class withretentionPeriodAsString()initialized to the given value.The enum value sets the period for retaining emails in an archive.
- Parameters:
retentionPeriod- The enum value sets the period for retaining emails in an archive.- See Also:
RetentionPeriod
-
fromRetentionPeriod
public static ArchiveRetention fromRetentionPeriod(RetentionPeriod retentionPeriod)
Create an instance of this class withretentionPeriodAsString()initialized to the given value.The enum value sets the period for retaining emails in an archive.
- Parameters:
retentionPeriod- The enum value sets the period for retaining emails in an archive.- See Also:
RetentionPeriod
-
type
public ArchiveRetention.Type type()
Retrieve an enum value representing which member of this object is populated. When this class is returned in a service response, this will beArchiveRetention.Type.UNKNOWN_TO_SDK_VERSIONif the service returned a member that is only known to a newer SDK version. When this class is created directly in your code, this will beArchiveRetention.Type.UNKNOWN_TO_SDK_VERSIONif zero members are set, andnullif more than one member is set.
-
-