/* * 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; /** *
* A list of ActionTypes
associated with a rule.
*
* The name of the rule. *
*
* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
*/
private String name;
/**
*
* A unique identifier for the rule. *
*
* Constraints:
* Length: 1 - 256
*/
private String ruleId;
/**
*
* The Amazon Resource Name (ARN) of the rule. *
*/ private String ruleArn; /** ** The name of the event source. *
*
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*/
private String eventSourceName;
/**
*
* The publish status of the rule. *
*
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*/
private String publishStatus;
/**
*
* A list of ActionTypes associated with a rule. *
*/ private java.util.List* The timestamp for when the rule was created. *
*/ private java.util.Date createdTime; /** ** The timestamp for when the rule was last updated. *
*/ private java.util.Date lastUpdatedTime; /** ** The name of the rule. *
*
* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
*
* @return
* The name of the rule. *
*/ public String getName() { return name; } /** ** The name of the rule. *
*
* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
*
* @param name
* The name of the rule. *
*/ public void setName(String name) { this.name = name; } /** ** The name of the rule. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 200
* Pattern: ^[0-9a-zA-Z._-]+
*
* @param name
* The name of the rule. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withName(String name) { this.name = name; return this; } /** ** A unique identifier for the rule. *
*
* Constraints:
* Length: 1 - 256
*
* @return
* A unique identifier for the rule. *
*/ public String getRuleId() { return ruleId; } /** ** A unique identifier for the rule. *
*
* Constraints:
* Length: 1 - 256
*
* @param ruleId
* A unique identifier for the rule. *
*/ public void setRuleId(String ruleId) { this.ruleId = ruleId; } /** ** A unique identifier for the rule. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 256
*
* @param ruleId
* A unique identifier for the rule. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withRuleId(String ruleId) { this.ruleId = ruleId; return this; } /** ** The Amazon Resource Name (ARN) of the rule. *
* * @return* The Amazon Resource Name (ARN) of the rule. *
*/ public String getRuleArn() { return ruleArn; } /** ** The Amazon Resource Name (ARN) of the rule. *
* * @param ruleArn* The Amazon Resource Name (ARN) of the rule. *
*/ public void setRuleArn(String ruleArn) { this.ruleArn = ruleArn; } /** ** The Amazon Resource Name (ARN) of the rule. *
** Returns a reference to this object so that method calls can be chained * together. * * @param ruleArn
* The Amazon Resource Name (ARN) of the rule. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withRuleArn(String ruleArn) { this.ruleArn = ruleArn; return this; } /** ** The name of the event source. *
*
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*
* @return
* The name of the event source. *
* @see EventSourceName */ public String getEventSourceName() { return eventSourceName; } /** ** The name of the event source. *
*
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*
* @param eventSourceName
* The name of the event source. *
* @see EventSourceName */ public void setEventSourceName(String eventSourceName) { this.eventSourceName = eventSourceName; } /** ** The name of the event source. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*
* @param eventSourceName
* The name of the event source. *
* @return A reference to this updated object so that method calls can be * chained together. * @see EventSourceName */ public RuleSummary withEventSourceName(String eventSourceName) { this.eventSourceName = eventSourceName; return this; } /** ** The name of the event source. *
*
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*
* @param eventSourceName
* The name of the event source. *
* @see EventSourceName */ public void setEventSourceName(EventSourceName eventSourceName) { this.eventSourceName = eventSourceName.toString(); } /** ** The name of the event source. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: OnPostCallAnalysisAvailable,
* OnRealTimeCallAnalysisAvailable, OnPostChatAnalysisAvailable,
* OnZendeskTicketCreate, OnZendeskTicketStatusUpdate,
* OnSalesforceCaseCreate, OnContactEvaluationSubmit
*
* @param eventSourceName
* The name of the event source. *
* @return A reference to this updated object so that method calls can be * chained together. * @see EventSourceName */ public RuleSummary withEventSourceName(EventSourceName eventSourceName) { this.eventSourceName = eventSourceName.toString(); return this; } /** ** The publish status of the rule. *
*
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*
* @return
* The publish status of the rule. *
* @see RulePublishStatus */ public String getPublishStatus() { return publishStatus; } /** ** The publish status of the rule. *
*
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*
* @param publishStatus
* The publish status of the rule. *
* @see RulePublishStatus */ public void setPublishStatus(String publishStatus) { this.publishStatus = publishStatus; } /** ** The publish status of the rule. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*
* @param publishStatus
* The publish status of the rule. *
* @return A reference to this updated object so that method calls can be * chained together. * @see RulePublishStatus */ public RuleSummary withPublishStatus(String publishStatus) { this.publishStatus = publishStatus; return this; } /** ** The publish status of the rule. *
*
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*
* @param publishStatus
* The publish status of the rule. *
* @see RulePublishStatus */ public void setPublishStatus(RulePublishStatus publishStatus) { this.publishStatus = publishStatus.toString(); } /** ** The publish status of the rule. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: DRAFT, PUBLISHED
*
* @param publishStatus
* The publish status of the rule. *
* @return A reference to this updated object so that method calls can be * chained together. * @see RulePublishStatus */ public RuleSummary withPublishStatus(RulePublishStatus publishStatus) { this.publishStatus = publishStatus.toString(); return this; } /** ** A list of ActionTypes associated with a rule. *
* * @return* A list of ActionTypes associated with a rule. *
*/ public java.util.List* A list of ActionTypes associated with a rule. *
* * @param actionSummaries* A list of ActionTypes associated with a rule. *
*/ public void setActionSummaries(java.util.Collection* A list of ActionTypes associated with a rule. *
** Returns a reference to this object so that method calls can be chained * together. * * @param actionSummaries
* A list of ActionTypes associated with a rule. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withActionSummaries(ActionSummary... actionSummaries) { if (getActionSummaries() == null) { this.actionSummaries = new java.util.ArrayList* A list of ActionTypes associated with a rule. *
** Returns a reference to this object so that method calls can be chained * together. * * @param actionSummaries
* A list of ActionTypes associated with a rule. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withActionSummaries(java.util.Collection* The timestamp for when the rule was created. *
* * @return* The timestamp for when the rule was created. *
*/ public java.util.Date getCreatedTime() { return createdTime; } /** ** The timestamp for when the rule was created. *
* * @param createdTime* The timestamp for when the rule was created. *
*/ public void setCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; } /** ** The timestamp for when the rule was created. *
** Returns a reference to this object so that method calls can be chained * together. * * @param createdTime
* The timestamp for when the rule was created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withCreatedTime(java.util.Date createdTime) { this.createdTime = createdTime; return this; } /** ** The timestamp for when the rule was last updated. *
* * @return* The timestamp for when the rule was last updated. *
*/ public java.util.Date getLastUpdatedTime() { return lastUpdatedTime; } /** ** The timestamp for when the rule was last updated. *
* * @param lastUpdatedTime* The timestamp for when the rule was last updated. *
*/ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** ** The timestamp for when the rule was last updated. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastUpdatedTime
* The timestamp for when the rule was last updated. *
* @return A reference to this updated object so that method calls can be * chained together. */ public RuleSummary withLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; 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 (getName() != null) sb.append("Name: " + getName() + ","); if (getRuleId() != null) sb.append("RuleId: " + getRuleId() + ","); if (getRuleArn() != null) sb.append("RuleArn: " + getRuleArn() + ","); if (getEventSourceName() != null) sb.append("EventSourceName: " + getEventSourceName() + ","); if (getPublishStatus() != null) sb.append("PublishStatus: " + getPublishStatus() + ","); if (getActionSummaries() != null) sb.append("ActionSummaries: " + getActionSummaries() + ","); if (getCreatedTime() != null) sb.append("CreatedTime: " + getCreatedTime() + ","); if (getLastUpdatedTime() != null) sb.append("LastUpdatedTime: " + getLastUpdatedTime()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getRuleId() == null) ? 0 : getRuleId().hashCode()); hashCode = prime * hashCode + ((getRuleArn() == null) ? 0 : getRuleArn().hashCode()); hashCode = prime * hashCode + ((getEventSourceName() == null) ? 0 : getEventSourceName().hashCode()); hashCode = prime * hashCode + ((getPublishStatus() == null) ? 0 : getPublishStatus().hashCode()); hashCode = prime * hashCode + ((getActionSummaries() == null) ? 0 : getActionSummaries().hashCode()); hashCode = prime * hashCode + ((getCreatedTime() == null) ? 0 : getCreatedTime().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedTime() == null) ? 0 : getLastUpdatedTime().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleSummary == false) return false; RuleSummary other = (RuleSummary) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getRuleId() == null ^ this.getRuleId() == null) return false; if (other.getRuleId() != null && other.getRuleId().equals(this.getRuleId()) == false) return false; if (other.getRuleArn() == null ^ this.getRuleArn() == null) return false; if (other.getRuleArn() != null && other.getRuleArn().equals(this.getRuleArn()) == false) return false; if (other.getEventSourceName() == null ^ this.getEventSourceName() == null) return false; if (other.getEventSourceName() != null && other.getEventSourceName().equals(this.getEventSourceName()) == false) return false; if (other.getPublishStatus() == null ^ this.getPublishStatus() == null) return false; if (other.getPublishStatus() != null && other.getPublishStatus().equals(this.getPublishStatus()) == false) return false; if (other.getActionSummaries() == null ^ this.getActionSummaries() == null) return false; if (other.getActionSummaries() != null && other.getActionSummaries().equals(this.getActionSummaries()) == false) return false; if (other.getCreatedTime() == null ^ this.getCreatedTime() == null) return false; if (other.getCreatedTime() != null && other.getCreatedTime().equals(this.getCreatedTime()) == false) return false; if (other.getLastUpdatedTime() == null ^ this.getLastUpdatedTime() == null) return false; if (other.getLastUpdatedTime() != null && other.getLastUpdatedTime().equals(this.getLastUpdatedTime()) == false) return false; return true; } }