
com.amazonaws.services.datazone.model.NotificationOutput Maven / Gradle / Ivy
/*
* 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The details of a notification generated in Amazon DataZone.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class NotificationOutput implements Serializable, Cloneable, StructuredPojo {
/**
*
* The action link included in the notification.
*
*/
private String actionLink;
/**
*
* The timestamp of when a notification was created.
*
*/
private java.util.Date creationTimestamp;
/**
*
* The identifier of a Amazon DataZone domain in which the notification exists.
*
*/
private String domainIdentifier;
/**
*
* The identifier of the notification.
*
*/
private String identifier;
/**
*
* The timestamp of when the notification was last updated.
*
*/
private java.util.Date lastUpdatedTimestamp;
/**
*
* The message included in the notification.
*
*/
private String message;
/**
*
* The metadata included in the notification.
*
*/
private java.util.Map metadata;
/**
*
* The status included in the notification.
*
*/
private String status;
/**
*
* The title of the notification.
*
*/
private String title;
/**
*
* The topic of the notification.
*
*/
private Topic topic;
/**
*
* The type of the notification.
*
*/
private String type;
/**
*
* The action link included in the notification.
*
*
* @param actionLink
* The action link included in the notification.
*/
public void setActionLink(String actionLink) {
this.actionLink = actionLink;
}
/**
*
* The action link included in the notification.
*
*
* @return The action link included in the notification.
*/
public String getActionLink() {
return this.actionLink;
}
/**
*
* The action link included in the notification.
*
*
* @param actionLink
* The action link included in the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withActionLink(String actionLink) {
setActionLink(actionLink);
return this;
}
/**
*
* The timestamp of when a notification was created.
*
*
* @param creationTimestamp
* The timestamp of when a notification was created.
*/
public void setCreationTimestamp(java.util.Date creationTimestamp) {
this.creationTimestamp = creationTimestamp;
}
/**
*
* The timestamp of when a notification was created.
*
*
* @return The timestamp of when a notification was created.
*/
public java.util.Date getCreationTimestamp() {
return this.creationTimestamp;
}
/**
*
* The timestamp of when a notification was created.
*
*
* @param creationTimestamp
* The timestamp of when a notification was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withCreationTimestamp(java.util.Date creationTimestamp) {
setCreationTimestamp(creationTimestamp);
return this;
}
/**
*
* The identifier of a Amazon DataZone domain in which the notification exists.
*
*
* @param domainIdentifier
* The identifier of a Amazon DataZone domain in which the notification exists.
*/
public void setDomainIdentifier(String domainIdentifier) {
this.domainIdentifier = domainIdentifier;
}
/**
*
* The identifier of a Amazon DataZone domain in which the notification exists.
*
*
* @return The identifier of a Amazon DataZone domain in which the notification exists.
*/
public String getDomainIdentifier() {
return this.domainIdentifier;
}
/**
*
* The identifier of a Amazon DataZone domain in which the notification exists.
*
*
* @param domainIdentifier
* The identifier of a Amazon DataZone domain in which the notification exists.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withDomainIdentifier(String domainIdentifier) {
setDomainIdentifier(domainIdentifier);
return this;
}
/**
*
* The identifier of the notification.
*
*
* @param identifier
* The identifier of the notification.
*/
public void setIdentifier(String identifier) {
this.identifier = identifier;
}
/**
*
* The identifier of the notification.
*
*
* @return The identifier of the notification.
*/
public String getIdentifier() {
return this.identifier;
}
/**
*
* The identifier of the notification.
*
*
* @param identifier
* The identifier of the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withIdentifier(String identifier) {
setIdentifier(identifier);
return this;
}
/**
*
* The timestamp of when the notification was last updated.
*
*
* @param lastUpdatedTimestamp
* The timestamp of when the notification was last updated.
*/
public void setLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
this.lastUpdatedTimestamp = lastUpdatedTimestamp;
}
/**
*
* The timestamp of when the notification was last updated.
*
*
* @return The timestamp of when the notification was last updated.
*/
public java.util.Date getLastUpdatedTimestamp() {
return this.lastUpdatedTimestamp;
}
/**
*
* The timestamp of when the notification was last updated.
*
*
* @param lastUpdatedTimestamp
* The timestamp of when the notification was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withLastUpdatedTimestamp(java.util.Date lastUpdatedTimestamp) {
setLastUpdatedTimestamp(lastUpdatedTimestamp);
return this;
}
/**
*
* The message included in the notification.
*
*
* @param message
* The message included in the notification.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* The message included in the notification.
*
*
* @return The message included in the notification.
*/
public String getMessage() {
return this.message;
}
/**
*
* The message included in the notification.
*
*
* @param message
* The message included in the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* The metadata included in the notification.
*
*
* @return The metadata included in the notification.
*/
public java.util.Map getMetadata() {
return metadata;
}
/**
*
* The metadata included in the notification.
*
*
* @param metadata
* The metadata included in the notification.
*/
public void setMetadata(java.util.Map metadata) {
this.metadata = metadata;
}
/**
*
* The metadata included in the notification.
*
*
* @param metadata
* The metadata included in the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withMetadata(java.util.Map metadata) {
setMetadata(metadata);
return this;
}
/**
* Add a single Metadata entry
*
* @see NotificationOutput#withMetadata
* @returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput addMetadataEntry(String key, String value) {
if (null == this.metadata) {
this.metadata = new java.util.HashMap();
}
if (this.metadata.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.metadata.put(key, value);
return this;
}
/**
* Removes all the entries added into Metadata.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput clearMetadataEntries() {
this.metadata = null;
return this;
}
/**
*
* The status included in the notification.
*
*
* @param status
* The status included in the notification.
* @see TaskStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status included in the notification.
*
*
* @return The status included in the notification.
* @see TaskStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The status included in the notification.
*
*
* @param status
* The status included in the notification.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStatus
*/
public NotificationOutput withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The status included in the notification.
*
*
* @param status
* The status included in the notification.
* @return Returns a reference to this object so that method calls can be chained together.
* @see TaskStatus
*/
public NotificationOutput withStatus(TaskStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The title of the notification.
*
*
* @param title
* The title of the notification.
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
* The title of the notification.
*
*
* @return The title of the notification.
*/
public String getTitle() {
return this.title;
}
/**
*
* The title of the notification.
*
*
* @param title
* The title of the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withTitle(String title) {
setTitle(title);
return this;
}
/**
*
* The topic of the notification.
*
*
* @param topic
* The topic of the notification.
*/
public void setTopic(Topic topic) {
this.topic = topic;
}
/**
*
* The topic of the notification.
*
*
* @return The topic of the notification.
*/
public Topic getTopic() {
return this.topic;
}
/**
*
* The topic of the notification.
*
*
* @param topic
* The topic of the notification.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public NotificationOutput withTopic(Topic topic) {
setTopic(topic);
return this;
}
/**
*
* The type of the notification.
*
*
* @param type
* The type of the notification.
* @see NotificationType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the notification.
*
*
* @return The type of the notification.
* @see NotificationType
*/
public String getType() {
return this.type;
}
/**
*
* The type of the notification.
*
*
* @param type
* The type of the notification.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationType
*/
public NotificationOutput withType(String type) {
setType(type);
return this;
}
/**
*
* The type of the notification.
*
*
* @param type
* The type of the notification.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationType
*/
public NotificationOutput 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 (getActionLink() != null)
sb.append("ActionLink: ").append("***Sensitive Data Redacted***").append(",");
if (getCreationTimestamp() != null)
sb.append("CreationTimestamp: ").append(getCreationTimestamp()).append(",");
if (getDomainIdentifier() != null)
sb.append("DomainIdentifier: ").append(getDomainIdentifier()).append(",");
if (getIdentifier() != null)
sb.append("Identifier: ").append(getIdentifier()).append(",");
if (getLastUpdatedTimestamp() != null)
sb.append("LastUpdatedTimestamp: ").append(getLastUpdatedTimestamp()).append(",");
if (getMessage() != null)
sb.append("Message: ").append("***Sensitive Data Redacted***").append(",");
if (getMetadata() != null)
sb.append("Metadata: ").append(getMetadata()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getTitle() != null)
sb.append("Title: ").append("***Sensitive Data Redacted***").append(",");
if (getTopic() != null)
sb.append("Topic: ").append(getTopic()).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 NotificationOutput == false)
return false;
NotificationOutput other = (NotificationOutput) obj;
if (other.getActionLink() == null ^ this.getActionLink() == null)
return false;
if (other.getActionLink() != null && other.getActionLink().equals(this.getActionLink()) == false)
return false;
if (other.getCreationTimestamp() == null ^ this.getCreationTimestamp() == null)
return false;
if (other.getCreationTimestamp() != null && other.getCreationTimestamp().equals(this.getCreationTimestamp()) == 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.getIdentifier() == null ^ this.getIdentifier() == null)
return false;
if (other.getIdentifier() != null && other.getIdentifier().equals(this.getIdentifier()) == 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.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
if (other.getMetadata() == null ^ this.getMetadata() == null)
return false;
if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == 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.getTitle() == null ^ this.getTitle() == null)
return false;
if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false)
return false;
if (other.getTopic() == null ^ this.getTopic() == null)
return false;
if (other.getTopic() != null && other.getTopic().equals(this.getTopic()) == 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 + ((getActionLink() == null) ? 0 : getActionLink().hashCode());
hashCode = prime * hashCode + ((getCreationTimestamp() == null) ? 0 : getCreationTimestamp().hashCode());
hashCode = prime * hashCode + ((getDomainIdentifier() == null) ? 0 : getDomainIdentifier().hashCode());
hashCode = prime * hashCode + ((getIdentifier() == null) ? 0 : getIdentifier().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedTimestamp() == null) ? 0 : getLastUpdatedTimestamp().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode());
hashCode = prime * hashCode + ((getTopic() == null) ? 0 : getTopic().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
return hashCode;
}
@Override
public NotificationOutput clone() {
try {
return (NotificationOutput) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.datazone.model.transform.NotificationOutputMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}