/* * Copyright 2010-2023 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.connect.model; import java.io.Serializable; /** *
* Information about the send notification action. *
*/ public class SendNotificationActionDefinition implements Serializable { /** ** Notification delivery method. *
*
* Constraints:
* Allowed Values: EMAIL
*/
private String deliveryMethod;
/**
*
* The subject of the email if the delivery method is EMAIL
.
* Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators
* Guide.
*
* Constraints:
* Length: 1 - 200
*/
private String subject;
/**
*
* Notification content. Supports variable injection. For more information, * see JSONPath reference in the Amazon Connect Administrators * Guide. *
*
* Constraints:
* Length: 1 - 1024
*/
private String content;
/**
*
* Content type format. *
*
* Constraints:
* Allowed Values: PLAIN_TEXT
*/
private String contentType;
/**
*
* Notification recipient. *
*/ private NotificationRecipientType recipient; /** ** Notification delivery method. *
*
* Constraints:
* Allowed Values: EMAIL
*
* @return
* Notification delivery method. *
* @see NotificationDeliveryType */ public String getDeliveryMethod() { return deliveryMethod; } /** ** Notification delivery method. *
*
* Constraints:
* Allowed Values: EMAIL
*
* @param deliveryMethod
* Notification delivery method. *
* @see NotificationDeliveryType */ public void setDeliveryMethod(String deliveryMethod) { this.deliveryMethod = deliveryMethod; } /** ** Notification delivery method. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: EMAIL
*
* @param deliveryMethod
* Notification delivery method. *
* @return A reference to this updated object so that method calls can be * chained together. * @see NotificationDeliveryType */ public SendNotificationActionDefinition withDeliveryMethod(String deliveryMethod) { this.deliveryMethod = deliveryMethod; return this; } /** ** Notification delivery method. *
*
* Constraints:
* Allowed Values: EMAIL
*
* @param deliveryMethod
* Notification delivery method. *
* @see NotificationDeliveryType */ public void setDeliveryMethod(NotificationDeliveryType deliveryMethod) { this.deliveryMethod = deliveryMethod.toString(); } /** ** Notification delivery method. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: EMAIL
*
* @param deliveryMethod
* Notification delivery method. *
* @return A reference to this updated object so that method calls can be * chained together. * @see NotificationDeliveryType */ public SendNotificationActionDefinition withDeliveryMethod( NotificationDeliveryType deliveryMethod) { this.deliveryMethod = deliveryMethod.toString(); return this; } /** *
* The subject of the email if the delivery method is EMAIL
.
* Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators
* Guide.
*
* Constraints:
* Length: 1 - 200
*
* @return
* The subject of the email if the delivery method is
* EMAIL
. Supports variable injection. For more
* information, see JSONPath reference in the Amazon Connect Administrators
* Guide.
*
* The subject of the email if the delivery method is EMAIL
.
* Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators
* Guide.
*
* Constraints:
* Length: 1 - 200
*
* @param subject
* The subject of the email if the delivery method is
* EMAIL
. Supports variable injection. For more
* information, see JSONPath reference in the Amazon Connect
* Administrators Guide.
*
* The subject of the email if the delivery method is EMAIL
.
* Supports variable injection. For more information, see JSONPath reference in the Amazon Connect Administrators
* Guide.
*
* Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 200
*
* @param subject
* The subject of the email if the delivery method is
* EMAIL
. Supports variable injection. For more
* information, see JSONPath reference in the Amazon Connect
* Administrators Guide.
*
* Notification content. Supports variable injection. For more information, * see JSONPath reference in the Amazon Connect Administrators * Guide. *
*
* Constraints:
* Length: 1 - 1024
*
* @return
* Notification content. Supports variable injection. For more * information, see JSONPath reference in the Amazon Connect Administrators * Guide. *
*/ public String getContent() { return content; } /** ** Notification content. Supports variable injection. For more information, * see JSONPath reference in the Amazon Connect Administrators * Guide. *
*
* Constraints:
* Length: 1 - 1024
*
* @param content
* Notification content. Supports variable injection. For more * information, see JSONPath reference in the Amazon Connect * Administrators Guide. *
*/ public void setContent(String content) { this.content = content; } /** ** Notification content. Supports variable injection. For more information, * see JSONPath reference in the Amazon Connect Administrators * Guide. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 1024
*
* @param content
* Notification content. Supports variable injection. For more * information, see JSONPath reference in the Amazon Connect * Administrators Guide. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SendNotificationActionDefinition withContent(String content) { this.content = content; return this; } /** ** Content type format. *
*
* Constraints:
* Allowed Values: PLAIN_TEXT
*
* @return
* Content type format. *
* @see NotificationContentType */ public String getContentType() { return contentType; } /** ** Content type format. *
*
* Constraints:
* Allowed Values: PLAIN_TEXT
*
* @param contentType
* Content type format. *
* @see NotificationContentType */ public void setContentType(String contentType) { this.contentType = contentType; } /** ** Content type format. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PLAIN_TEXT
*
* @param contentType
* Content type format. *
* @return A reference to this updated object so that method calls can be * chained together. * @see NotificationContentType */ public SendNotificationActionDefinition withContentType(String contentType) { this.contentType = contentType; return this; } /** ** Content type format. *
*
* Constraints:
* Allowed Values: PLAIN_TEXT
*
* @param contentType
* Content type format. *
* @see NotificationContentType */ public void setContentType(NotificationContentType contentType) { this.contentType = contentType.toString(); } /** ** Content type format. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: PLAIN_TEXT
*
* @param contentType
* Content type format. *
* @return A reference to this updated object so that method calls can be * chained together. * @see NotificationContentType */ public SendNotificationActionDefinition withContentType(NotificationContentType contentType) { this.contentType = contentType.toString(); return this; } /** ** Notification recipient. *
* * @return* Notification recipient. *
*/ public NotificationRecipientType getRecipient() { return recipient; } /** ** Notification recipient. *
* * @param recipient* Notification recipient. *
*/ public void setRecipient(NotificationRecipientType recipient) { this.recipient = recipient; } /** ** Notification recipient. *
** Returns a reference to this object so that method calls can be chained * together. * * @param recipient
* Notification recipient. *
* @return A reference to this updated object so that method calls can be * chained together. */ public SendNotificationActionDefinition withRecipient(NotificationRecipientType recipient) { this.recipient = recipient; return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDeliveryMethod() != null) sb.append("DeliveryMethod: " + getDeliveryMethod() + ","); if (getSubject() != null) sb.append("Subject: " + getSubject() + ","); if (getContent() != null) sb.append("Content: " + getContent() + ","); if (getContentType() != null) sb.append("ContentType: " + getContentType() + ","); if (getRecipient() != null) sb.append("Recipient: " + getRecipient()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDeliveryMethod() == null) ? 0 : getDeliveryMethod().hashCode()); hashCode = prime * hashCode + ((getSubject() == null) ? 0 : getSubject().hashCode()); hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode()); hashCode = prime * hashCode + ((getContentType() == null) ? 0 : getContentType().hashCode()); hashCode = prime * hashCode + ((getRecipient() == null) ? 0 : getRecipient().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SendNotificationActionDefinition == false) return false; SendNotificationActionDefinition other = (SendNotificationActionDefinition) obj; if (other.getDeliveryMethod() == null ^ this.getDeliveryMethod() == null) return false; if (other.getDeliveryMethod() != null && other.getDeliveryMethod().equals(this.getDeliveryMethod()) == false) return false; if (other.getSubject() == null ^ this.getSubject() == null) return false; if (other.getSubject() != null && other.getSubject().equals(this.getSubject()) == false) return false; if (other.getContent() == null ^ this.getContent() == null) return false; if (other.getContent() != null && other.getContent().equals(this.getContent()) == false) return false; if (other.getContentType() == null ^ this.getContentType() == null) return false; if (other.getContentType() != null && other.getContentType().equals(this.getContentType()) == false) return false; if (other.getRecipient() == null ^ this.getRecipient() == null) return false; if (other.getRecipient() != null && other.getRecipient().equals(this.getRecipient()) == false) return false; return true; } }