/* * Copyright 2018-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; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Information about a rule. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class Rule implements Serializable, Cloneable, StructuredPojo { /** ** The name of the rule. *
*/ private String name; /** ** A unique identifier for the rule. *
*/ private String ruleId; /** ** The Amazon Resource Name (ARN) of the rule. *
*/ private String ruleArn; /** ** The event source to trigger the rule. *
*/ private RuleTriggerEventSource triggerEventSource; /** ** The conditions of the rule. *
*/ private String function; /** ** A list of actions to be run when the rule is triggered. *
*/ private java.util.List* The publish status of the rule. *
*/ private String publishStatus; /** ** The timestamp for when the rule was created. *
*/ private java.util.Date createdTime; /** ** The timestamp for the when the rule was last updated. *
*/ private java.util.Date lastUpdatedTime; /** ** The Amazon Resource Name (ARN) of the user who last updated the rule. *
*/ private String lastUpdatedBy; /** ** The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
*/ private java.util.Map* The name of the rule. *
* * @param name * The name of the rule. */ public void setName(String name) { this.name = name; } /** ** The name of the rule. *
* * @return The name of the rule. */ public String getName() { return this.name; } /** ** The name of the rule. *
* * @param name * The name of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withName(String name) { setName(name); return this; } /** ** A unique identifier for the rule. *
* * @param ruleId * A unique identifier for the rule. */ public void setRuleId(String ruleId) { this.ruleId = ruleId; } /** ** A unique identifier for the rule. *
* * @return A unique identifier for the rule. */ public String getRuleId() { return this.ruleId; } /** ** A unique identifier for the rule. *
* * @param ruleId * A unique identifier for the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withRuleId(String ruleId) { setRuleId(ruleId); return this; } /** ** 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. *
* * @return The Amazon Resource Name (ARN) of the rule. */ public String getRuleArn() { return this.ruleArn; } /** ** The Amazon Resource Name (ARN) of the rule. *
* * @param ruleArn * The Amazon Resource Name (ARN) of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withRuleArn(String ruleArn) { setRuleArn(ruleArn); return this; } /** ** The event source to trigger the rule. *
* * @param triggerEventSource * The event source to trigger the rule. */ public void setTriggerEventSource(RuleTriggerEventSource triggerEventSource) { this.triggerEventSource = triggerEventSource; } /** ** The event source to trigger the rule. *
* * @return The event source to trigger the rule. */ public RuleTriggerEventSource getTriggerEventSource() { return this.triggerEventSource; } /** ** The event source to trigger the rule. *
* * @param triggerEventSource * The event source to trigger the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withTriggerEventSource(RuleTriggerEventSource triggerEventSource) { setTriggerEventSource(triggerEventSource); return this; } /** ** The conditions of the rule. *
* * @param function * The conditions of the rule. */ public void setFunction(String function) { this.function = function; } /** ** The conditions of the rule. *
* * @return The conditions of the rule. */ public String getFunction() { return this.function; } /** ** The conditions of the rule. *
* * @param function * The conditions of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withFunction(String function) { setFunction(function); return this; } /** ** A list of actions to be run when the rule is triggered. *
* * @return A list of actions to be run when the rule is triggered. */ public java.util.List* A list of actions to be run when the rule is triggered. *
* * @param actions * A list of actions to be run when the rule is triggered. */ public void setActions(java.util.Collection* A list of actions to be run when the rule is triggered. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setActions(java.util.Collection)} or {@link #withActions(java.util.Collection)} if you want to override * the existing values. *
* * @param actions * A list of actions to be run when the rule is triggered. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withActions(RuleAction... actions) { if (this.actions == null) { setActions(new java.util.ArrayList* A list of actions to be run when the rule is triggered. *
* * @param actions * A list of actions to be run when the rule is triggered. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withActions(java.util.Collection* The publish status of the rule. *
* * @param publishStatus * The publish status of the rule. * @see RulePublishStatus */ public void setPublishStatus(String publishStatus) { this.publishStatus = publishStatus; } /** ** The publish status of the rule. *
* * @return The publish status of the rule. * @see RulePublishStatus */ public String getPublishStatus() { return this.publishStatus; } /** ** The publish status of the rule. *
* * @param publishStatus * The publish status of the rule. * @return Returns a reference to this object so that method calls can be chained together. * @see RulePublishStatus */ public Rule withPublishStatus(String publishStatus) { setPublishStatus(publishStatus); return this; } /** ** The publish status of the rule. *
* * @param publishStatus * The publish status of the rule. * @return Returns a reference to this object so that method calls can be chained together. * @see RulePublishStatus */ public Rule withPublishStatus(RulePublishStatus publishStatus) { this.publishStatus = publishStatus.toString(); return this; } /** ** 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. *
* * @return The timestamp for when the rule was created. */ public java.util.Date getCreatedTime() { return this.createdTime; } /** ** The timestamp for when the rule was created. *
* * @param createdTime * The timestamp for when the rule was created. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withCreatedTime(java.util.Date createdTime) { setCreatedTime(createdTime); return this; } /** ** The timestamp for the when the rule was last updated. *
* * @param lastUpdatedTime * The timestamp for the when the rule was last updated. */ public void setLastUpdatedTime(java.util.Date lastUpdatedTime) { this.lastUpdatedTime = lastUpdatedTime; } /** ** The timestamp for the when the rule was last updated. *
* * @return The timestamp for the when the rule was last updated. */ public java.util.Date getLastUpdatedTime() { return this.lastUpdatedTime; } /** ** The timestamp for the when the rule was last updated. *
* * @param lastUpdatedTime * The timestamp for the when the rule was last updated. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withLastUpdatedTime(java.util.Date lastUpdatedTime) { setLastUpdatedTime(lastUpdatedTime); return this; } /** ** The Amazon Resource Name (ARN) of the user who last updated the rule. *
* * @param lastUpdatedBy * The Amazon Resource Name (ARN) of the user who last updated the rule. */ public void setLastUpdatedBy(String lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy; } /** ** The Amazon Resource Name (ARN) of the user who last updated the rule. *
* * @return The Amazon Resource Name (ARN) of the user who last updated the rule. */ public String getLastUpdatedBy() { return this.lastUpdatedBy; } /** ** The Amazon Resource Name (ARN) of the user who last updated the rule. *
* * @param lastUpdatedBy * The Amazon Resource Name (ARN) of the user who last updated the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withLastUpdatedBy(String lastUpdatedBy) { setLastUpdatedBy(lastUpdatedBy); return this; } /** ** The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @return The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. */ public java.util.Map* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @param tags * The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. */ public void setTags(java.util.Map* The tags used to organize, track, or control access for this resource. For example, { "tags": {"key1":"value1", * "key2":"value2"} }. *
* * @param tags * The tags used to organize, track, or control access for this resource. For example, { "tags": * {"key1":"value1", "key2":"value2"} }. * @return Returns a reference to this object so that method calls can be chained together. */ public Rule withTags(java.util.Map