com.amazonaws.services.datazone.model.ListNotificationsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-datazoneexternal 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.datazone.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 ListNotificationsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The time after which you want to list notifications.
*
*/
private java.util.Date afterTimestamp;
/**
*
* The time before which you want to list notifications.
*
*/
private java.util.Date beforeTimestamp;
/**
*
* The identifier of the Amazon DataZone domain.
*
*/
private String domainIdentifier;
/**
*
* The maximum number of notifications to return in a single call to ListNotifications
. When the number
* of notifications to be listed is greater than the value of MaxResults
, the response contains a
* NextToken
value that you can use in a subsequent call to ListNotifications
to list the
* next set of notifications.
*
*/
private Integer maxResults;
/**
*
* When the number of notifications is greater than the default value for the MaxResults
parameter, or
* if you explicitly specify a value for MaxResults
that is less than the number of notifications, the
* response includes a pagination token named NextToken
. You can specify this NextToken
* value in a subsequent call to ListNotifications
to list the next set of notifications.
*
*/
private String nextToken;
/**
*
* The subjects of notifications.
*
*/
private java.util.List subjects;
/**
*
* The task status of notifications.
*
*/
private String taskStatus;
/**
*
* The type of notifications.
*
*/
private String type;
/**
*
* The time after which you want to list notifications.
*
*
* @param afterTimestamp
* The time after which you want to list notifications.
*/
public void setAfterTimestamp(java.util.Date afterTimestamp) {
this.afterTimestamp = afterTimestamp;
}
/**
*
* The time after which you want to list notifications.
*
*
* @return The time after which you want to list notifications.
*/
public java.util.Date getAfterTimestamp() {
return this.afterTimestamp;
}
/**
*
* The time after which you want to list notifications.
*
*
* @param afterTimestamp
* The time after which you want to list notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withAfterTimestamp(java.util.Date afterTimestamp) {
setAfterTimestamp(afterTimestamp);
return this;
}
/**
*
* The time before which you want to list notifications.
*
*
* @param beforeTimestamp
* The time before which you want to list notifications.
*/
public void setBeforeTimestamp(java.util.Date beforeTimestamp) {
this.beforeTimestamp = beforeTimestamp;
}
/**
*
* The time before which you want to list notifications.
*
*
* @return The time before which you want to list notifications.
*/
public java.util.Date getBeforeTimestamp() {
return this.beforeTimestamp;
}
/**
*
* The time before which you want to list notifications.
*
*
* @param beforeTimestamp
* The time before which you want to list notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withBeforeTimestamp(java.util.Date beforeTimestamp) {
setBeforeTimestamp(beforeTimestamp);
return this;
}
/**
*
* The identifier of the Amazon DataZone domain.
*
*
* @param domainIdentifier
* The identifier of the Amazon DataZone domain.
*/
public void setDomainIdentifier(String domainIdentifier) {
this.domainIdentifier = domainIdentifier;
}
/**
*
* The identifier of the Amazon DataZone domain.
*
*
* @return The identifier of the Amazon DataZone domain.
*/
public String getDomainIdentifier() {
return this.domainIdentifier;
}
/**
*
* The identifier of the Amazon DataZone domain.
*
*
* @param domainIdentifier
* The identifier of the Amazon DataZone domain.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withDomainIdentifier(String domainIdentifier) {
setDomainIdentifier(domainIdentifier);
return this;
}
/**
*
* The maximum number of notifications to return in a single call to ListNotifications
. When the number
* of notifications to be listed is greater than the value of MaxResults
, the response contains a
* NextToken
value that you can use in a subsequent call to ListNotifications
to list the
* next set of notifications.
*
*
* @param maxResults
* The maximum number of notifications to return in a single call to ListNotifications
. When the
* number of notifications to be listed is greater than the value of MaxResults
, the response
* contains a NextToken
value that you can use in a subsequent call to
* ListNotifications
to list the next set of notifications.
*/
public void setMaxResults(Integer maxResults) {
this.maxResults = maxResults;
}
/**
*
* The maximum number of notifications to return in a single call to ListNotifications
. When the number
* of notifications to be listed is greater than the value of MaxResults
, the response contains a
* NextToken
value that you can use in a subsequent call to ListNotifications
to list the
* next set of notifications.
*
*
* @return The maximum number of notifications to return in a single call to ListNotifications
. When
* the number of notifications to be listed is greater than the value of MaxResults
, the
* response contains a NextToken
value that you can use in a subsequent call to
* ListNotifications
to list the next set of notifications.
*/
public Integer getMaxResults() {
return this.maxResults;
}
/**
*
* The maximum number of notifications to return in a single call to ListNotifications
. When the number
* of notifications to be listed is greater than the value of MaxResults
, the response contains a
* NextToken
value that you can use in a subsequent call to ListNotifications
to list the
* next set of notifications.
*
*
* @param maxResults
* The maximum number of notifications to return in a single call to ListNotifications
. When the
* number of notifications to be listed is greater than the value of MaxResults
, the response
* contains a NextToken
value that you can use in a subsequent call to
* ListNotifications
to list the next set of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withMaxResults(Integer maxResults) {
setMaxResults(maxResults);
return this;
}
/**
*
* When the number of notifications is greater than the default value for the MaxResults
parameter, or
* if you explicitly specify a value for MaxResults
that is less than the number of notifications, the
* response includes a pagination token named NextToken
. You can specify this NextToken
* value in a subsequent call to ListNotifications
to list the next set of notifications.
*
*
* @param nextToken
* When the number of notifications is greater than the default value for the MaxResults
* parameter, or if you explicitly specify a value for MaxResults
that is less than the number
* of notifications, the response includes a pagination token named NextToken
. You can specify
* this NextToken
value in a subsequent call to ListNotifications
to list the next
* set of notifications.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* When the number of notifications is greater than the default value for the MaxResults
parameter, or
* if you explicitly specify a value for MaxResults
that is less than the number of notifications, the
* response includes a pagination token named NextToken
. You can specify this NextToken
* value in a subsequent call to ListNotifications
to list the next set of notifications.
*
*
* @return When the number of notifications is greater than the default value for the MaxResults
* parameter, or if you explicitly specify a value for MaxResults
that is less than the number
* of notifications, the response includes a pagination token named NextToken
. You can specify
* this NextToken
value in a subsequent call to ListNotifications
to list the next
* set of notifications.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* When the number of notifications is greater than the default value for the MaxResults
parameter, or
* if you explicitly specify a value for MaxResults
that is less than the number of notifications, the
* response includes a pagination token named NextToken
. You can specify this NextToken
* value in a subsequent call to ListNotifications
to list the next set of notifications.
*
*
* @param nextToken
* When the number of notifications is greater than the default value for the MaxResults
* parameter, or if you explicitly specify a value for MaxResults
that is less than the number
* of notifications, the response includes a pagination token named NextToken
. You can specify
* this NextToken
value in a subsequent call to ListNotifications
to list the next
* set of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withNextToken(String nextToken) {
setNextToken(nextToken);
return this;
}
/**
*
* The subjects of notifications.
*
*
* @return The subjects of notifications.
*/
public java.util.List getSubjects() {
return subjects;
}
/**
*
* The subjects of notifications.
*
*
* @param subjects
* The subjects of notifications.
*/
public void setSubjects(java.util.Collection subjects) {
if (subjects == null) {
this.subjects = null;
return;
}
this.subjects = new java.util.ArrayList(subjects);
}
/**
*
* The subjects of notifications.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSubjects(java.util.Collection)} or {@link #withSubjects(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param subjects
* The subjects of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withSubjects(String... subjects) {
if (this.subjects == null) {
setSubjects(new java.util.ArrayList(subjects.length));
}
for (String ele : subjects) {
this.subjects.add(ele);
}
return this;
}
/**
*
* The subjects of notifications.
*
*
* @param subjects
* The subjects of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListNotificationsRequest withSubjects(java.util.Collection subjects) {
setSubjects(subjects);
return this;
}
/**
*
* The task status of notifications.
*
*
* @param taskStatus
* The task status of notifications.
* @see TaskStatus
*/
public void setTaskStatus(String taskStatus) {
this.taskStatus = taskStatus;
}
/**
*
* The task status of notifications.
*
*
* @return The task status of notifications.
* @see TaskStatus
*/
public String getTaskStatus() {
return this.taskStatus;
}
/**
*
* The task status of notifications.
*
*
* @param taskStatus
* The task status of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStatus
*/
public ListNotificationsRequest withTaskStatus(String taskStatus) {
setTaskStatus(taskStatus);
return this;
}
/**
*
* The task status of notifications.
*
*
* @param taskStatus
* The task status of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStatus
*/
public ListNotificationsRequest withTaskStatus(TaskStatus taskStatus) {
this.taskStatus = taskStatus.toString();
return this;
}
/**
*
* The type of notifications.
*
*
* @param type
* The type of notifications.
* @see NotificationType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of notifications.
*
*
* @return The type of notifications.
* @see NotificationType
*/
public String getType() {
return this.type;
}
/**
*
* The type of notifications.
*
*
* @param type
* The type of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationType
*/
public ListNotificationsRequest withType(String type) {
setType(type);
return this;
}
/**
*
* The type of notifications.
*
*
* @param type
* The type of notifications.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationType
*/
public ListNotificationsRequest withType(NotificationType type) {
this.type = type.toString();
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 (getAfterTimestamp() != null)
sb.append("AfterTimestamp: ").append(getAfterTimestamp()).append(",");
if (getBeforeTimestamp() != null)
sb.append("BeforeTimestamp: ").append(getBeforeTimestamp()).append(",");
if (getDomainIdentifier() != null)
sb.append("DomainIdentifier: ").append(getDomainIdentifier()).append(",");
if (getMaxResults() != null)
sb.append("MaxResults: ").append(getMaxResults()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken()).append(",");
if (getSubjects() != null)
sb.append("Subjects: ").append(getSubjects()).append(",");
if (getTaskStatus() != null)
sb.append("TaskStatus: ").append(getTaskStatus()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListNotificationsRequest == false)
return false;
ListNotificationsRequest other = (ListNotificationsRequest) obj;
if (other.getAfterTimestamp() == null ^ this.getAfterTimestamp() == null)
return false;
if (other.getAfterTimestamp() != null && other.getAfterTimestamp().equals(this.getAfterTimestamp()) == false)
return false;
if (other.getBeforeTimestamp() == null ^ this.getBeforeTimestamp() == null)
return false;
if (other.getBeforeTimestamp() != null && other.getBeforeTimestamp().equals(this.getBeforeTimestamp()) == false)
return false;
if (other.getDomainIdentifier() == null ^ this.getDomainIdentifier() == null)
return false;
if (other.getDomainIdentifier() != null && other.getDomainIdentifier().equals(this.getDomainIdentifier()) == 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.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
if (other.getSubjects() == null ^ this.getSubjects() == null)
return false;
if (other.getSubjects() != null && other.getSubjects().equals(this.getSubjects()) == false)
return false;
if (other.getTaskStatus() == null ^ this.getTaskStatus() == null)
return false;
if (other.getTaskStatus() != null && other.getTaskStatus().equals(this.getTaskStatus()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAfterTimestamp() == null) ? 0 : getAfterTimestamp().hashCode());
hashCode = prime * hashCode + ((getBeforeTimestamp() == null) ? 0 : getBeforeTimestamp().hashCode());
hashCode = prime * hashCode + ((getDomainIdentifier() == null) ? 0 : getDomainIdentifier().hashCode());
hashCode = prime * hashCode + ((getMaxResults() == null) ? 0 : getMaxResults().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
hashCode = prime * hashCode + ((getSubjects() == null) ? 0 : getSubjects().hashCode());
hashCode = prime * hashCode + ((getTaskStatus() == null) ? 0 : getTaskStatus().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public ListNotificationsRequest clone() {
return (ListNotificationsRequest) super.clone();
}
}