/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Configuration for a lifecycle rule. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class AwsS3BucketBucketLifecycleConfigurationRulesDetails implements Serializable, Cloneable, StructuredPojo { /** ** How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days before * Amazon S3 cancels the entire upload. *
*/ private AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails abortIncompleteMultipartUpload; /** ** The date when objects are moved or deleted. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* The length in days of the lifetime for objects that are subject to the rule. *
*/ private Integer expirationInDays; /** *
* Whether Amazon S3 removes a delete marker that has no noncurrent versions. If set to true
, the
* delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*
* Identifies the objects that a rule applies to. *
*/ private AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails filter; /** ** The unique identifier of the rule. *
*/ private String iD; /** ** The number of days that an object is noncurrent before Amazon S3 can perform the associated action. *
*/ private Integer noncurrentVersionExpirationInDays; /** ** Transition rules that describe when noncurrent objects transition to a specified storage class. *
*/ private java.util.List* A prefix that identifies one or more objects that the rule applies to. *
*/ private String prefix; /** ** The current status of the rule. Indicates whether the rule is currently being applied. *
*/ private String status; /** ** Transition rules that indicate when objects transition to a specified storage class. *
*/ private java.util.List* How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days before * Amazon S3 cancels the entire upload. *
* * @param abortIncompleteMultipartUpload * How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days * before Amazon S3 cancels the entire upload. */ public void setAbortIncompleteMultipartUpload( AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails abortIncompleteMultipartUpload) { this.abortIncompleteMultipartUpload = abortIncompleteMultipartUpload; } /** ** How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days before * Amazon S3 cancels the entire upload. *
* * @return How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days * before Amazon S3 cancels the entire upload. */ public AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails getAbortIncompleteMultipartUpload() { return this.abortIncompleteMultipartUpload; } /** ** How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days before * Amazon S3 cancels the entire upload. *
* * @param abortIncompleteMultipartUpload * How Amazon S3 responds when a multipart upload is incomplete. Specifically, provides a number of days * before Amazon S3 cancels the entire upload. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withAbortIncompleteMultipartUpload( AwsS3BucketBucketLifecycleConfigurationRulesAbortIncompleteMultipartUploadDetails abortIncompleteMultipartUpload) { setAbortIncompleteMultipartUpload(abortIncompleteMultipartUpload); return this; } /** ** The date when objects are moved or deleted. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setExpirationDate(String expirationDate) {
this.expirationDate = expirationDate;
}
/**
*
* The date when objects are moved or deleted. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getExpirationDate() {
return this.expirationDate;
}
/**
*
* The date when objects are moved or deleted. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketBucketLifecycleConfigurationRulesDetails withExpirationDate(String expirationDate) {
setExpirationDate(expirationDate);
return this;
}
/**
*
* The length in days of the lifetime for objects that are subject to the rule. *
* * @param expirationInDays * The length in days of the lifetime for objects that are subject to the rule. */ public void setExpirationInDays(Integer expirationInDays) { this.expirationInDays = expirationInDays; } /** ** The length in days of the lifetime for objects that are subject to the rule. *
* * @return The length in days of the lifetime for objects that are subject to the rule. */ public Integer getExpirationInDays() { return this.expirationInDays; } /** ** The length in days of the lifetime for objects that are subject to the rule. *
* * @param expirationInDays * The length in days of the lifetime for objects that are subject to the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withExpirationInDays(Integer expirationInDays) { setExpirationInDays(expirationInDays); return this; } /** *
* Whether Amazon S3 removes a delete marker that has no noncurrent versions. If set to true
, the
* delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*
true
,
* the delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*/
public void setExpiredObjectDeleteMarker(Boolean expiredObjectDeleteMarker) {
this.expiredObjectDeleteMarker = expiredObjectDeleteMarker;
}
/**
*
* Whether Amazon S3 removes a delete marker that has no noncurrent versions. If set to true
, the
* delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*
true
,
* the delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
* or ExpirationDate
.
*/
public Boolean getExpiredObjectDeleteMarker() {
return this.expiredObjectDeleteMarker;
}
/**
*
* Whether Amazon S3 removes a delete marker that has no noncurrent versions. If set to true
, the
* delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*
true
,
* the delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public AwsS3BucketBucketLifecycleConfigurationRulesDetails withExpiredObjectDeleteMarker(Boolean expiredObjectDeleteMarker) {
setExpiredObjectDeleteMarker(expiredObjectDeleteMarker);
return this;
}
/**
*
* Whether Amazon S3 removes a delete marker that has no noncurrent versions. If set to true
, the
* delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
or
* ExpirationDate
.
*
true
,
* the delete marker is expired. If set to false
, the policy takes no action.
*
* If you provide ExpiredObjectDeleteMarker
, you cannot provide ExpirationInDays
* or ExpirationDate
.
*/
public Boolean isExpiredObjectDeleteMarker() {
return this.expiredObjectDeleteMarker;
}
/**
*
* Identifies the objects that a rule applies to. *
* * @param filter * Identifies the objects that a rule applies to. */ public void setFilter(AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails filter) { this.filter = filter; } /** ** Identifies the objects that a rule applies to. *
* * @return Identifies the objects that a rule applies to. */ public AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails getFilter() { return this.filter; } /** ** Identifies the objects that a rule applies to. *
* * @param filter * Identifies the objects that a rule applies to. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withFilter(AwsS3BucketBucketLifecycleConfigurationRulesFilterDetails filter) { setFilter(filter); return this; } /** ** The unique identifier of the rule. *
* * @param iD * The unique identifier of the rule. */ public void setID(String iD) { this.iD = iD; } /** ** The unique identifier of the rule. *
* * @return The unique identifier of the rule. */ public String getID() { return this.iD; } /** ** The unique identifier of the rule. *
* * @param iD * The unique identifier of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withID(String iD) { setID(iD); return this; } /** ** The number of days that an object is noncurrent before Amazon S3 can perform the associated action. *
* * @param noncurrentVersionExpirationInDays * The number of days that an object is noncurrent before Amazon S3 can perform the associated action. */ public void setNoncurrentVersionExpirationInDays(Integer noncurrentVersionExpirationInDays) { this.noncurrentVersionExpirationInDays = noncurrentVersionExpirationInDays; } /** ** The number of days that an object is noncurrent before Amazon S3 can perform the associated action. *
* * @return The number of days that an object is noncurrent before Amazon S3 can perform the associated action. */ public Integer getNoncurrentVersionExpirationInDays() { return this.noncurrentVersionExpirationInDays; } /** ** The number of days that an object is noncurrent before Amazon S3 can perform the associated action. *
* * @param noncurrentVersionExpirationInDays * The number of days that an object is noncurrent before Amazon S3 can perform the associated action. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withNoncurrentVersionExpirationInDays(Integer noncurrentVersionExpirationInDays) { setNoncurrentVersionExpirationInDays(noncurrentVersionExpirationInDays); return this; } /** ** Transition rules that describe when noncurrent objects transition to a specified storage class. *
* * @return Transition rules that describe when noncurrent objects transition to a specified storage class. */ public java.util.List* Transition rules that describe when noncurrent objects transition to a specified storage class. *
* * @param noncurrentVersionTransitions * Transition rules that describe when noncurrent objects transition to a specified storage class. */ public void setNoncurrentVersionTransitions( java.util.Collection* Transition rules that describe when noncurrent objects transition to a specified storage class. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setNoncurrentVersionTransitions(java.util.Collection)} or * {@link #withNoncurrentVersionTransitions(java.util.Collection)} if you want to override the existing values. *
* * @param noncurrentVersionTransitions * Transition rules that describe when noncurrent objects transition to a specified storage class. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withNoncurrentVersionTransitions( AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails... noncurrentVersionTransitions) { if (this.noncurrentVersionTransitions == null) { setNoncurrentVersionTransitions(new java.util.ArrayList* Transition rules that describe when noncurrent objects transition to a specified storage class. *
* * @param noncurrentVersionTransitions * Transition rules that describe when noncurrent objects transition to a specified storage class. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withNoncurrentVersionTransitions( java.util.Collection* A prefix that identifies one or more objects that the rule applies to. *
* * @param prefix * A prefix that identifies one or more objects that the rule applies to. */ public void setPrefix(String prefix) { this.prefix = prefix; } /** ** A prefix that identifies one or more objects that the rule applies to. *
* * @return A prefix that identifies one or more objects that the rule applies to. */ public String getPrefix() { return this.prefix; } /** ** A prefix that identifies one or more objects that the rule applies to. *
* * @param prefix * A prefix that identifies one or more objects that the rule applies to. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withPrefix(String prefix) { setPrefix(prefix); return this; } /** ** The current status of the rule. Indicates whether the rule is currently being applied. *
* * @param status * The current status of the rule. Indicates whether the rule is currently being applied. */ public void setStatus(String status) { this.status = status; } /** ** The current status of the rule. Indicates whether the rule is currently being applied. *
* * @return The current status of the rule. Indicates whether the rule is currently being applied. */ public String getStatus() { return this.status; } /** ** The current status of the rule. Indicates whether the rule is currently being applied. *
* * @param status * The current status of the rule. Indicates whether the rule is currently being applied. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withStatus(String status) { setStatus(status); return this; } /** ** Transition rules that indicate when objects transition to a specified storage class. *
* * @return Transition rules that indicate when objects transition to a specified storage class. */ public java.util.List* Transition rules that indicate when objects transition to a specified storage class. *
* * @param transitions * Transition rules that indicate when objects transition to a specified storage class. */ public void setTransitions(java.util.Collection* Transition rules that indicate when objects transition to a specified storage class. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTransitions(java.util.Collection)} or {@link #withTransitions(java.util.Collection)} if you want to * override the existing values. *
* * @param transitions * Transition rules that indicate when objects transition to a specified storage class. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withTransitions(AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails... transitions) { if (this.transitions == null) { setTransitions(new java.util.ArrayList* Transition rules that indicate when objects transition to a specified storage class. *
* * @param transitions * Transition rules that indicate when objects transition to a specified storage class. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketBucketLifecycleConfigurationRulesDetails withTransitions( java.util.Collection