All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.securityhub.model.AwsS3BucketBucketLifecycleConfigurationRulesDetails Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS SecurityHub module holds the client classes that are used for communicating with AWS SecurityHub Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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. *

*/ private String expirationDate; /** *

* 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. *

*/ private Boolean expiredObjectDeleteMarker; /** *

* 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 noncurrentVersionTransitions; /** *

* 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 transitions; /** *

* 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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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. *

* * @param 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. */ 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. *

* * @return 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. */ 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. *

* * @param 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. * @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. *

* * @return 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. */ 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 getNoncurrentVersionTransitions() { return noncurrentVersionTransitions; } /** *

* 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 noncurrentVersionTransitions) { if (noncurrentVersionTransitions == null) { this.noncurrentVersionTransitions = null; return; } this.noncurrentVersionTransitions = new java.util.ArrayList( noncurrentVersionTransitions); } /** *

* 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( noncurrentVersionTransitions.length)); } for (AwsS3BucketBucketLifecycleConfigurationRulesNoncurrentVersionTransitionsDetails ele : noncurrentVersionTransitions) { this.noncurrentVersionTransitions.add(ele); } return this; } /** *

* 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 noncurrentVersionTransitions) { setNoncurrentVersionTransitions(noncurrentVersionTransitions); return this; } /** *

* 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 getTransitions() { return transitions; } /** *

* 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 transitions) { if (transitions == null) { this.transitions = null; return; } this.transitions = new java.util.ArrayList(transitions); } /** *

* 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(transitions.length)); } for (AwsS3BucketBucketLifecycleConfigurationRulesTransitionsDetails ele : transitions) { this.transitions.add(ele); } return this; } /** *

* 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 transitions) { setTransitions(transitions); return this; } /** * 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getAbortIncompleteMultipartUpload() != null) sb.append("AbortIncompleteMultipartUpload: ").append(getAbortIncompleteMultipartUpload()).append(","); if (getExpirationDate() != null) sb.append("ExpirationDate: ").append(getExpirationDate()).append(","); if (getExpirationInDays() != null) sb.append("ExpirationInDays: ").append(getExpirationInDays()).append(","); if (getExpiredObjectDeleteMarker() != null) sb.append("ExpiredObjectDeleteMarker: ").append(getExpiredObjectDeleteMarker()).append(","); if (getFilter() != null) sb.append("Filter: ").append(getFilter()).append(","); if (getID() != null) sb.append("ID: ").append(getID()).append(","); if (getNoncurrentVersionExpirationInDays() != null) sb.append("NoncurrentVersionExpirationInDays: ").append(getNoncurrentVersionExpirationInDays()).append(","); if (getNoncurrentVersionTransitions() != null) sb.append("NoncurrentVersionTransitions: ").append(getNoncurrentVersionTransitions()).append(","); if (getPrefix() != null) sb.append("Prefix: ").append(getPrefix()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getTransitions() != null) sb.append("Transitions: ").append(getTransitions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsS3BucketBucketLifecycleConfigurationRulesDetails == false) return false; AwsS3BucketBucketLifecycleConfigurationRulesDetails other = (AwsS3BucketBucketLifecycleConfigurationRulesDetails) obj; if (other.getAbortIncompleteMultipartUpload() == null ^ this.getAbortIncompleteMultipartUpload() == null) return false; if (other.getAbortIncompleteMultipartUpload() != null && other.getAbortIncompleteMultipartUpload().equals(this.getAbortIncompleteMultipartUpload()) == false) return false; if (other.getExpirationDate() == null ^ this.getExpirationDate() == null) return false; if (other.getExpirationDate() != null && other.getExpirationDate().equals(this.getExpirationDate()) == false) return false; if (other.getExpirationInDays() == null ^ this.getExpirationInDays() == null) return false; if (other.getExpirationInDays() != null && other.getExpirationInDays().equals(this.getExpirationInDays()) == false) return false; if (other.getExpiredObjectDeleteMarker() == null ^ this.getExpiredObjectDeleteMarker() == null) return false; if (other.getExpiredObjectDeleteMarker() != null && other.getExpiredObjectDeleteMarker().equals(this.getExpiredObjectDeleteMarker()) == false) return false; if (other.getFilter() == null ^ this.getFilter() == null) return false; if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false) return false; if (other.getID() == null ^ this.getID() == null) return false; if (other.getID() != null && other.getID().equals(this.getID()) == false) return false; if (other.getNoncurrentVersionExpirationInDays() == null ^ this.getNoncurrentVersionExpirationInDays() == null) return false; if (other.getNoncurrentVersionExpirationInDays() != null && other.getNoncurrentVersionExpirationInDays().equals(this.getNoncurrentVersionExpirationInDays()) == false) return false; if (other.getNoncurrentVersionTransitions() == null ^ this.getNoncurrentVersionTransitions() == null) return false; if (other.getNoncurrentVersionTransitions() != null && other.getNoncurrentVersionTransitions().equals(this.getNoncurrentVersionTransitions()) == false) return false; if (other.getPrefix() == null ^ this.getPrefix() == null) return false; if (other.getPrefix() != null && other.getPrefix().equals(this.getPrefix()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getTransitions() == null ^ this.getTransitions() == null) return false; if (other.getTransitions() != null && other.getTransitions().equals(this.getTransitions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getAbortIncompleteMultipartUpload() == null) ? 0 : getAbortIncompleteMultipartUpload().hashCode()); hashCode = prime * hashCode + ((getExpirationDate() == null) ? 0 : getExpirationDate().hashCode()); hashCode = prime * hashCode + ((getExpirationInDays() == null) ? 0 : getExpirationInDays().hashCode()); hashCode = prime * hashCode + ((getExpiredObjectDeleteMarker() == null) ? 0 : getExpiredObjectDeleteMarker().hashCode()); hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode()); hashCode = prime * hashCode + ((getID() == null) ? 0 : getID().hashCode()); hashCode = prime * hashCode + ((getNoncurrentVersionExpirationInDays() == null) ? 0 : getNoncurrentVersionExpirationInDays().hashCode()); hashCode = prime * hashCode + ((getNoncurrentVersionTransitions() == null) ? 0 : getNoncurrentVersionTransitions().hashCode()); hashCode = prime * hashCode + ((getPrefix() == null) ? 0 : getPrefix().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getTransitions() == null) ? 0 : getTransitions().hashCode()); return hashCode; } @Override public AwsS3BucketBucketLifecycleConfigurationRulesDetails clone() { try { return (AwsS3BucketBucketLifecycleConfigurationRulesDetails) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.securityhub.model.transform.AwsS3BucketBucketLifecycleConfigurationRulesDetailsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy