com.amazonaws.services.mailmanager.model.GetArchiveResult Maven / Gradle / Ivy
Show all versions of aws-java-sdk-mailmanager Show documentation
/*
* Copyright 2019-2024 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.mailmanager.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* The response containing details of the requested archive.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetArchiveResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The Amazon Resource Name (ARN) of the archive.
*
*/
private String archiveArn;
/**
*
* The unique identifier of the archive.
*
*/
private String archiveId;
/**
*
* The unique name assigned to the archive.
*
*/
private String archiveName;
/**
*
* The current state of the archive:
*
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted in 30
* days. No further modifications can be made in this state.
*
*
*
*/
private String archiveState;
/**
*
* The timestamp of when the archive was created.
*
*/
private java.util.Date createdTimestamp;
/**
*
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*
*/
private String kmsKeyArn;
/**
*
* The timestamp of when the archive was modified.
*
*/
private java.util.Date lastUpdatedTimestamp;
/**
*
* The retention period for emails in this archive.
*
*/
private ArchiveRetention retention;
/**
*
* The Amazon Resource Name (ARN) of the archive.
*
*
* @param archiveArn
* The Amazon Resource Name (ARN) of the archive.
*/
public void setArchiveArn(String archiveArn) {
this.archiveArn = archiveArn;
}
/**
*
* The Amazon Resource Name (ARN) of the archive.
*
*
* @return The Amazon Resource Name (ARN) of the archive.
*/
public String getArchiveArn() {
return this.archiveArn;
}
/**
*
* The Amazon Resource Name (ARN) of the archive.
*
*
* @param archiveArn
* The Amazon Resource Name (ARN) of the archive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withArchiveArn(String archiveArn) {
setArchiveArn(archiveArn);
return this;
}
/**
*
* The unique identifier of the archive.
*
*
* @param archiveId
* The unique identifier of the archive.
*/
public void setArchiveId(String archiveId) {
this.archiveId = archiveId;
}
/**
*
* The unique identifier of the archive.
*
*
* @return The unique identifier of the archive.
*/
public String getArchiveId() {
return this.archiveId;
}
/**
*
* The unique identifier of the archive.
*
*
* @param archiveId
* The unique identifier of the archive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withArchiveId(String archiveId) {
setArchiveId(archiveId);
return this;
}
/**
*
* The unique name assigned to the archive.
*
*
* @param archiveName
* The unique name assigned to the archive.
*/
public void setArchiveName(String archiveName) {
this.archiveName = archiveName;
}
/**
*
* The unique name assigned to the archive.
*
*
* @return The unique name assigned to the archive.
*/
public String getArchiveName() {
return this.archiveName;
}
/**
*
* The unique name assigned to the archive.
*
*
* @param archiveName
* The unique name assigned to the archive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withArchiveName(String archiveName) {
setArchiveName(archiveName);
return this;
}
/**
*
* The current state of the archive:
*
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted in 30
* days. No further modifications can be made in this state.
*
*
*
*
* @param archiveState
* The current state of the archive:
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted
* in 30 days. No further modifications can be made in this state.
*
*
* @see ArchiveState
*/
public void setArchiveState(String archiveState) {
this.archiveState = archiveState;
}
/**
*
* The current state of the archive:
*
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted in 30
* days. No further modifications can be made in this state.
*
*
*
*
* @return The current state of the archive:
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted
* in 30 days. No further modifications can be made in this state.
*
*
* @see ArchiveState
*/
public String getArchiveState() {
return this.archiveState;
}
/**
*
* The current state of the archive:
*
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted in 30
* days. No further modifications can be made in this state.
*
*
*
*
* @param archiveState
* The current state of the archive:
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted
* in 30 days. No further modifications can be made in this state.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ArchiveState
*/
public GetArchiveResult withArchiveState(String archiveState) {
setArchiveState(archiveState);
return this;
}
/**
*
* The current state of the archive:
*
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted in 30
* days. No further modifications can be made in this state.
*
*
*
*
* @param archiveState
* The current state of the archive:
*
* -
*
* ACTIVE
– The archive is ready and available for use.
*
*
* -
*
* PENDING_DELETION
– The archive has been marked for deletion and will be permanently deleted
* in 30 days. No further modifications can be made in this state.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see ArchiveState
*/
public GetArchiveResult withArchiveState(ArchiveState archiveState) {
this.archiveState = archiveState.toString();
return this;
}
/**
*
* The timestamp of when the archive was created.
*
*
* @param createdTimestamp
* The timestamp of when the archive was created.
*/
public void setCreatedTimestamp(java.util.Date createdTimestamp) {
this.createdTimestamp = createdTimestamp;
}
/**
*
* The timestamp of when the archive was created.
*
*
* @return The timestamp of when the archive was created.
*/
public java.util.Date getCreatedTimestamp() {
return this.createdTimestamp;
}
/**
*
* The timestamp of when the archive was created.
*
*
* @param createdTimestamp
* The timestamp of when the archive was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withCreatedTimestamp(java.util.Date createdTimestamp) {
setCreatedTimestamp(createdTimestamp);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*/
public void setKmsKeyArn(String kmsKeyArn) {
this.kmsKeyArn = kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*
*
* @return The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*/
public String getKmsKeyArn() {
return this.kmsKeyArn;
}
/**
*
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
*
*
* @param kmsKeyArn
* The Amazon Resource Name (ARN) of the KMS key used to encrypt the archive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withKmsKeyArn(String kmsKeyArn) {
setKmsKeyArn(kmsKeyArn);
return this;
}
/**
*
* The timestamp of when the archive was modified.
*
*
* @param lastUpdatedTimestamp
* The timestamp of when the archive was modified.
*/
public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
this.lastUpdatedTimestamp = lastUpdatedTimestamp;
}
/**
*
* The timestamp of when the archive was modified.
*
*
* @return The timestamp of when the archive was modified.
*/
public java.util.Date getLastUpdatedTimestamp() {
return this.lastUpdatedTimestamp;
}
/**
*
* The timestamp of when the archive was modified.
*
*
* @param lastUpdatedTimestamp
* The timestamp of when the archive was modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
setLastUpdatedTimestamp(lastUpdatedTimestamp);
return this;
}
/**
*
* The retention period for emails in this archive.
*
*
* @param retention
* The retention period for emails in this archive.
*/
public void setRetention(ArchiveRetention retention) {
this.retention = retention;
}
/**
*
* The retention period for emails in this archive.
*
*
* @return The retention period for emails in this archive.
*/
public ArchiveRetention getRetention() {
return this.retention;
}
/**
*
* The retention period for emails in this archive.
*
*
* @param retention
* The retention period for emails in this archive.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveResult withRetention(ArchiveRetention retention) {
setRetention(retention);
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 (getArchiveArn() != null)
sb.append("ArchiveArn: ").append(getArchiveArn()).append(",");
if (getArchiveId() != null)
sb.append("ArchiveId: ").append(getArchiveId()).append(",");
if (getArchiveName() != null)
sb.append("ArchiveName: ").append(getArchiveName()).append(",");
if (getArchiveState() != null)
sb.append("ArchiveState: ").append(getArchiveState()).append(",");
if (getCreatedTimestamp() != null)
sb.append("CreatedTimestamp: ").append(getCreatedTimestamp()).append(",");
if (getKmsKeyArn() != null)
sb.append("KmsKeyArn: ").append(getKmsKeyArn()).append(",");
if (getLastUpdatedTimestamp() != null)
sb.append("LastUpdatedTimestamp: ").append(getLastUpdatedTimestamp()).append(",");
if (getRetention() != null)
sb.append("Retention: ").append(getRetention());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetArchiveResult == false)
return false;
GetArchiveResult other = (GetArchiveResult) obj;
if (other.getArchiveArn() == null ^ this.getArchiveArn() == null)
return false;
if (other.getArchiveArn() != null && other.getArchiveArn().equals(this.getArchiveArn()) == false)
return false;
if (other.getArchiveId() == null ^ this.getArchiveId() == null)
return false;
if (other.getArchiveId() != null && other.getArchiveId().equals(this.getArchiveId()) == false)
return false;
if (other.getArchiveName() == null ^ this.getArchiveName() == null)
return false;
if (other.getArchiveName() != null && other.getArchiveName().equals(this.getArchiveName()) == false)
return false;
if (other.getArchiveState() == null ^ this.getArchiveState() == null)
return false;
if (other.getArchiveState() != null && other.getArchiveState().equals(this.getArchiveState()) == false)
return false;
if (other.getCreatedTimestamp() == null ^ this.getCreatedTimestamp() == null)
return false;
if (other.getCreatedTimestamp() != null && other.getCreatedTimestamp().equals(this.getCreatedTimestamp()) == false)
return false;
if (other.getKmsKeyArn() == null ^ this.getKmsKeyArn() == null)
return false;
if (other.getKmsKeyArn() != null && other.getKmsKeyArn().equals(this.getKmsKeyArn()) == false)
return false;
if (other.getLastUpdatedTimestamp() == null ^ this.getLastUpdatedTimestamp() == null)
return false;
if (other.getLastUpdatedTimestamp() != null && other.getLastUpdatedTimestamp().equals(this.getLastUpdatedTimestamp()) == false)
return false;
if (other.getRetention() == null ^ this.getRetention() == null)
return false;
if (other.getRetention() != null && other.getRetention().equals(this.getRetention()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArchiveArn() == null) ? 0 : getArchiveArn().hashCode());
hashCode = prime * hashCode + ((getArchiveId() == null) ? 0 : getArchiveId().hashCode());
hashCode = prime * hashCode + ((getArchiveName() == null) ? 0 : getArchiveName().hashCode());
hashCode = prime * hashCode + ((getArchiveState() == null) ? 0 : getArchiveState().hashCode());
hashCode = prime * hashCode + ((getCreatedTimestamp() == null) ? 0 : getCreatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getKmsKeyArn() == null) ? 0 : getKmsKeyArn().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTimestamp() == null) ? 0 : getLastUpdatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getRetention() == null) ? 0 : getRetention().hashCode());
return hashCode;
}
@Override
public GetArchiveResult clone() {
try {
return (GetArchiveResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}