com.amazonaws.services.mailmanager.model.GetArchiveSearchResult 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 specified archive search job.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetArchiveSearchResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The identifier of the archive the email search was performed in.
*
*/
private String archiveId;
/**
*
* The criteria used to filter emails included in the search.
*
*/
private ArchiveFilters filters;
/**
*
* The start timestamp of the range the searched emails cover.
*
*/
private java.util.Date fromTimestamp;
/**
*
* The maximum number of search results to return.
*
*/
private Integer maxResults;
/**
*
* The current status of the search job.
*
*/
private SearchStatus status;
/**
*
* The end timestamp of the range the searched emails cover.
*
*/
private java.util.Date toTimestamp;
/**
*
* The identifier of the archive the email search was performed in.
*
*
* @param archiveId
* The identifier of the archive the email search was performed in.
*/
public void setArchiveId(String archiveId) {
this.archiveId = archiveId;
}
/**
*
* The identifier of the archive the email search was performed in.
*
*
* @return The identifier of the archive the email search was performed in.
*/
public String getArchiveId() {
return this.archiveId;
}
/**
*
* The identifier of the archive the email search was performed in.
*
*
* @param archiveId
* The identifier of the archive the email search was performed in.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withArchiveId(String archiveId) {
setArchiveId(archiveId);
return this;
}
/**
*
* The criteria used to filter emails included in the search.
*
*
* @param filters
* The criteria used to filter emails included in the search.
*/
public void setFilters(ArchiveFilters filters) {
this.filters = filters;
}
/**
*
* The criteria used to filter emails included in the search.
*
*
* @return The criteria used to filter emails included in the search.
*/
public ArchiveFilters getFilters() {
return this.filters;
}
/**
*
* The criteria used to filter emails included in the search.
*
*
* @param filters
* The criteria used to filter emails included in the search.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withFilters(ArchiveFilters filters) {
setFilters(filters);
return this;
}
/**
*
* The start timestamp of the range the searched emails cover.
*
*
* @param fromTimestamp
* The start timestamp of the range the searched emails cover.
*/
public void setFromTimestamp(java.util.Date fromTimestamp) {
this.fromTimestamp = fromTimestamp;
}
/**
*
* The start timestamp of the range the searched emails cover.
*
*
* @return The start timestamp of the range the searched emails cover.
*/
public java.util.Date getFromTimestamp() {
return this.fromTimestamp;
}
/**
*
* The start timestamp of the range the searched emails cover.
*
*
* @param fromTimestamp
* The start timestamp of the range the searched emails cover.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withFromTimestamp(java.util.Date fromTimestamp) {
setFromTimestamp(fromTimestamp);
return this;
}
/**
*
* The maximum number of search results to return.
*
*
* @param maxResults
* The maximum number of search results to return.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of search results to return.
*
*
* @return The maximum number of search results to return.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of search results to return.
*
*
* @param maxResults
* The maximum number of search results to return.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* The current status of the search job.
*
*
* @param status
* The current status of the search job.
*/
public void setStatus(SearchStatus status) {
this.status = status;
}
/**
*
* The current status of the search job.
*
*
* @return The current status of the search job.
*/
public SearchStatus getStatus() {
return this.status;
}
/**
*
* The current status of the search job.
*
*
* @param status
* The current status of the search job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withStatus(SearchStatus status) {
setStatus(status);
return this;
}
/**
*
* The end timestamp of the range the searched emails cover.
*
*
* @param toTimestamp
* The end timestamp of the range the searched emails cover.
*/
public void setToTimestamp(java.util.Date toTimestamp) {
this.toTimestamp = toTimestamp;
}
/**
*
* The end timestamp of the range the searched emails cover.
*
*
* @return The end timestamp of the range the searched emails cover.
*/
public java.util.Date getToTimestamp() {
return this.toTimestamp;
}
/**
*
* The end timestamp of the range the searched emails cover.
*
*
* @param toTimestamp
* The end timestamp of the range the searched emails cover.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetArchiveSearchResult withToTimestamp(java.util.Date toTimestamp) {
setToTimestamp(toTimestamp);
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 (getArchiveId() != null)
sb.append("ArchiveId: ").append(getArchiveId()).append(",");
if (getFilters() != null)
sb.append("Filters: ").append(getFilters()).append(",");
if (getFromTimestamp() != null)
sb.append("FromTimestamp: ").append(getFromTimestamp()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getToTimestamp() != null)
sb.append("ToTimestamp: ").append(getToTimestamp());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetArchiveSearchResult == false)
return false;
GetArchiveSearchResult other = (GetArchiveSearchResult) obj;
if (other.getArchiveId() == null ^ this.getArchiveId() == null)
return false;
if (other.getArchiveId() != null && other.getArchiveId().equals(this.getArchiveId()) == false)
return false;
if (other.getFilters() == null ^ this.getFilters() == null)
return false;
if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false)
return false;
if (other.getFromTimestamp() == null ^ this.getFromTimestamp() == null)
return false;
if (other.getFromTimestamp() != null && other.getFromTimestamp().equals(this.getFromTimestamp()) == false)
return false;
if (other.getMaxResults() == null ^ this.getMaxResults() == null)
return false;
if (other.getMaxResults() != null && other.getMaxResults().equals(this.getMaxResults()) == 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.getToTimestamp() == null ^ this.getToTimestamp() == null)
return false;
if (other.getToTimestamp() != null && other.getToTimestamp().equals(this.getToTimestamp()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArchiveId() == null) ? 0 : getArchiveId().hashCode());
hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode());
hashCode = prime * hashCode + ((getFromTimestamp() == null) ? 0 : getFromTimestamp().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getToTimestamp() == null) ? 0 : getToTimestamp().hashCode());
return hashCode;
}
@Override
public GetArchiveSearchResult clone() {
try {
return (GetArchiveSearchResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}