com.amazonaws.services.simpleemailv2.model.ListSuppressedDestinationsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-sesv2 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.simpleemailv2.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* A request to obtain a list of email destinations that are on the suppression list for your account.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListSuppressedDestinationsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The factors that caused the email address to be added to .
*
*/
private java.util.List reasons;
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list after a specific date.
*
*/
private java.util.Date startDate;
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list before a specific date.
*
*/
private java.util.Date endDate;
/**
*
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position in the
* list of suppressed email addresses.
*
*/
private String nextToken;
/**
*
* The number of results to show in a single call to ListSuppressedDestinations
. If the number of
* results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*
*/
private Integer pageSize;
/**
*
* The factors that caused the email address to be added to .
*
*
* @return The factors that caused the email address to be added to .
* @see SuppressionListReason
*/
public java.util.List getReasons() {
return reasons;
}
/**
*
* The factors that caused the email address to be added to .
*
*
* @param reasons
* The factors that caused the email address to be added to .
* @see SuppressionListReason
*/
public void setReasons(java.util.Collection reasons) {
if (reasons == null) {
this.reasons = null;
return;
}
this.reasons = new java.util.ArrayList(reasons);
}
/**
*
* The factors that caused the email address to be added to .
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setReasons(java.util.Collection)} or {@link #withReasons(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param reasons
* The factors that caused the email address to be added to .
* @return Returns a reference to this object so that method calls can be chained together.
* @see SuppressionListReason
*/
public ListSuppressedDestinationsRequest withReasons(String... reasons) {
if (this.reasons == null) {
setReasons(new java.util.ArrayList(reasons.length));
}
for (String ele : reasons) {
this.reasons.add(ele);
}
return this;
}
/**
*
* The factors that caused the email address to be added to .
*
*
* @param reasons
* The factors that caused the email address to be added to .
* @return Returns a reference to this object so that method calls can be chained together.
* @see SuppressionListReason
*/
public ListSuppressedDestinationsRequest withReasons(java.util.Collection reasons) {
setReasons(reasons);
return this;
}
/**
*
* The factors that caused the email address to be added to .
*
*
* @param reasons
* The factors that caused the email address to be added to .
* @return Returns a reference to this object so that method calls can be chained together.
* @see SuppressionListReason
*/
public ListSuppressedDestinationsRequest withReasons(SuppressionListReason... reasons) {
java.util.ArrayList reasonsCopy = new java.util.ArrayList(reasons.length);
for (SuppressionListReason value : reasons) {
reasonsCopy.add(value.toString());
}
if (getReasons() == null) {
setReasons(reasonsCopy);
} else {
getReasons().addAll(reasonsCopy);
}
return this;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list after a specific date.
*
*
* @param startDate
* Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list after a specific date.
*/
public void setStartDate(java.util.Date startDate) {
this.startDate = startDate;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list after a specific date.
*
*
* @return Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list after a specific date.
*/
public java.util.Date getStartDate() {
return this.startDate;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list after a specific date.
*
*
* @param startDate
* Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list after a specific date.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListSuppressedDestinationsRequest withStartDate(java.util.Date startDate) {
setStartDate(startDate);
return this;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list before a specific date.
*
*
* @param endDate
* Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list before a specific date.
*/
public void setEndDate(java.util.Date endDate) {
this.endDate = endDate;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list before a specific date.
*
*
* @return Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list before a specific date.
*/
public java.util.Date getEndDate() {
return this.endDate;
}
/**
*
* Used to filter the list of suppressed email destinations so that it only includes addresses that were added to
* the list before a specific date.
*
*
* @param endDate
* Used to filter the list of suppressed email destinations so that it only includes addresses that were
* added to the list before a specific date.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListSuppressedDestinationsRequest withEndDate(java.util.Date endDate) {
setEndDate(endDate);
return this;
}
/**
*
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position in the
* list of suppressed email addresses.
*
*
* @param nextToken
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position
* in the list of suppressed email addresses.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position in the
* list of suppressed email addresses.
*
*
* @return A token returned from a previous call to ListSuppressedDestinations
to indicate the position
* in the list of suppressed email addresses.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position in the
* list of suppressed email addresses.
*
*
* @param nextToken
* A token returned from a previous call to ListSuppressedDestinations
to indicate the position
* in the list of suppressed email addresses.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListSuppressedDestinationsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The number of results to show in a single call to ListSuppressedDestinations
. If the number of
* results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*
*
* @param pageSize
* The number of results to show in a single call to ListSuppressedDestinations
. If the number
* of results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*/
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
*
* The number of results to show in a single call to ListSuppressedDestinations
. If the number of
* results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*
*
* @return The number of results to show in a single call to ListSuppressedDestinations
. If the number
* of results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*/
public Integer getPageSize() {
return this.pageSize;
}
/**
*
* The number of results to show in a single call to ListSuppressedDestinations
. If the number of
* results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
*
*
* @param pageSize
* The number of results to show in a single call to ListSuppressedDestinations
. If the number
* of results is larger than the number you specified in this parameter, then the response includes a
* NextToken
element, which you can use to obtain additional results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListSuppressedDestinationsRequest withPageSize(Integer pageSize) {
setPageSize(pageSize);
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 (getReasons() != null)
sb.append("Reasons: ").append(getReasons()).append(",");
if (getStartDate() != null)
sb.append("StartDate: ").append(getStartDate()).append(",");
if (getEndDate() != null)
sb.append("EndDate: ").append(getEndDate()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getPageSize() != null)
sb.append("PageSize: ").append(getPageSize());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListSuppressedDestinationsRequest == false)
return false;
ListSuppressedDestinationsRequest other = (ListSuppressedDestinationsRequest) obj;
if (other.getReasons() == null ^ this.getReasons() == null)
return false;
if (other.getReasons() != null && other.getReasons().equals(this.getReasons()) == false)
return false;
if (other.getStartDate() == null ^ this.getStartDate() == null)
return false;
if (other.getStartDate() != null && other.getStartDate().equals(this.getStartDate()) == false)
return false;
if (other.getEndDate() == null ^ this.getEndDate() == null)
return false;
if (other.getEndDate() != null && other.getEndDate().equals(this.getEndDate()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getPageSize() == null ^ this.getPageSize() == null)
return false;
if (other.getPageSize() != null && other.getPageSize().equals(this.getPageSize()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getReasons() == null) ? 0 : getReasons().hashCode());
hashCode = prime * hashCode + ((getStartDate() == null) ? 0 : getStartDate().hashCode());
hashCode = prime * hashCode + ((getEndDate() == null) ? 0 : getEndDate().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getPageSize() == null) ? 0 : getPageSize().hashCode());
return hashCode;
}
@Override
public ListSuppressedDestinationsRequest clone() {
return (ListSuppressedDestinationsRequest) super.clone();
}
}