com.amazonaws.services.simpleemailv2.model.ListContactsRequest 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;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListContactsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the contact list.
*
*/
private String contactListName;
/**
*
* A filter that can be applied to a list of contacts.
*
*/
private ListContactsFilter filter;
/**
*
* The number of contacts that may be returned at once, which is dependent on if there are more or less contacts
* than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the
* specified limit, the NextToken
element is sent in the response. Use the NextToken
value
* in subsequent requests to retrieve additional contacts.
*
*/
private Integer pageSize;
/**
*
* A string token indicating that there might be additional contacts available to be listed. Use the token provided
* in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page
* of contacts.
*
*/
private String nextToken;
/**
*
* The name of the contact list.
*
*
* @param contactListName
* The name of the contact list.
*/
public void setContactListName(String contactListName) {
this.contactListName = contactListName;
}
/**
*
* The name of the contact list.
*
*
* @return The name of the contact list.
*/
public String getContactListName() {
return this.contactListName;
}
/**
*
* The name of the contact list.
*
*
* @param contactListName
* The name of the contact list.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListContactsRequest withContactListName(String contactListName) {
setContactListName(contactListName);
return this;
}
/**
*
* A filter that can be applied to a list of contacts.
*
*
* @param filter
* A filter that can be applied to a list of contacts.
*/
public void setFilter(ListContactsFilter filter) {
this.filter = filter;
}
/**
*
* A filter that can be applied to a list of contacts.
*
*
* @return A filter that can be applied to a list of contacts.
*/
public ListContactsFilter getFilter() {
return this.filter;
}
/**
*
* A filter that can be applied to a list of contacts.
*
*
* @param filter
* A filter that can be applied to a list of contacts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListContactsRequest withFilter(ListContactsFilter filter) {
setFilter(filter);
return this;
}
/**
*
* The number of contacts that may be returned at once, which is dependent on if there are more or less contacts
* than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the
* specified limit, the NextToken
element is sent in the response. Use the NextToken
value
* in subsequent requests to retrieve additional contacts.
*
*
* @param pageSize
* The number of contacts that may be returned at once, which is dependent on if there are more or less
* contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts
* exist beyond the specified limit, the NextToken
element is sent in the response. Use the
* NextToken
value in subsequent requests to retrieve additional contacts.
*/
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
*
* The number of contacts that may be returned at once, which is dependent on if there are more or less contacts
* than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the
* specified limit, the NextToken
element is sent in the response. Use the NextToken
value
* in subsequent requests to retrieve additional contacts.
*
*
* @return The number of contacts that may be returned at once, which is dependent on if there are more or less
* contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts
* exist beyond the specified limit, the NextToken
element is sent in the response. Use the
* NextToken
value in subsequent requests to retrieve additional contacts.
*/
public Integer getPageSize() {
return this.pageSize;
}
/**
*
* The number of contacts that may be returned at once, which is dependent on if there are more or less contacts
* than the value of the PageSize. Use this parameter to paginate results. If additional contacts exist beyond the
* specified limit, the NextToken
element is sent in the response. Use the NextToken
value
* in subsequent requests to retrieve additional contacts.
*
*
* @param pageSize
* The number of contacts that may be returned at once, which is dependent on if there are more or less
* contacts than the value of the PageSize. Use this parameter to paginate results. If additional contacts
* exist beyond the specified limit, the NextToken
element is sent in the response. Use the
* NextToken
value in subsequent requests to retrieve additional contacts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListContactsRequest withPageSize(Integer pageSize) {
setPageSize(pageSize);
return this;
}
/**
*
* A string token indicating that there might be additional contacts available to be listed. Use the token provided
* in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page
* of contacts.
*
*
* @param nextToken
* A string token indicating that there might be additional contacts available to be listed. Use the token
* provided in the Response to use in the subsequent call to ListContacts with the same parameters to
* retrieve the next page of contacts.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* A string token indicating that there might be additional contacts available to be listed. Use the token provided
* in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page
* of contacts.
*
*
* @return A string token indicating that there might be additional contacts available to be listed. Use the token
* provided in the Response to use in the subsequent call to ListContacts with the same parameters to
* retrieve the next page of contacts.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* A string token indicating that there might be additional contacts available to be listed. Use the token provided
* in the Response to use in the subsequent call to ListContacts with the same parameters to retrieve the next page
* of contacts.
*
*
* @param nextToken
* A string token indicating that there might be additional contacts available to be listed. Use the token
* provided in the Response to use in the subsequent call to ListContacts with the same parameters to
* retrieve the next page of contacts.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListContactsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getContactListName() != null)
sb.append("ContactListName: ").append(getContactListName()).append(",");
if (getFilter() != null)
sb.append("Filter: ").append(getFilter()).append(",");
if (getPageSize() != null)
sb.append("PageSize: ").append(getPageSize()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListContactsRequest == false)
return false;
ListContactsRequest other = (ListContactsRequest) obj;
if (other.getContactListName() == null ^ this.getContactListName() == null)
return false;
if (other.getContactListName() != null && other.getContactListName().equals(this.getContactListName()) == 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.getPageSize() == null ^ this.getPageSize() == null)
return false;
if (other.getPageSize() != null && other.getPageSize().equals(this.getPageSize()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getContactListName() == null) ? 0 : getContactListName().hashCode());
hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode());
hashCode = prime * hashCode + ((getPageSize() == null) ? 0 : getPageSize().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListContactsRequest clone() {
return (ListContactsRequest) super.clone();
}
}