/* * 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.chimesdkidentity.model; import java.io.Serializable; /** *

* Specifies the type of message that triggers a bot. *

*/ public class InvokedBy implements Serializable { /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE */ private String standardMessages; /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Constraints:
* Allowed Values: ALL, NONE */ private String targetedMessages; /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE * * @return

* Sets standard messages as the bot trigger. For standard messages: *

* * @see StandardMessages */ public String getStandardMessages() { return standardMessages; } /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE * * @param standardMessages

* Sets standard messages as the bot trigger. For standard * messages: *

* * @see StandardMessages */ public void setStandardMessages(String standardMessages) { this.standardMessages = standardMessages; } /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE * * @param standardMessages

* Sets standard messages as the bot trigger. For standard * messages: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see StandardMessages */ public InvokedBy withStandardMessages(String standardMessages) { this.standardMessages = standardMessages; return this; } /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE * * @param standardMessages

* Sets standard messages as the bot trigger. For standard * messages: *

* * @see StandardMessages */ public void setStandardMessages(StandardMessages standardMessages) { this.standardMessages = standardMessages.toString(); } /** *

* Sets standard messages as the bot trigger. For standard messages: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: AUTO, ALL, MENTIONS, NONE * * @param standardMessages

* Sets standard messages as the bot trigger. For standard * messages: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see StandardMessages */ public InvokedBy withStandardMessages(StandardMessages standardMessages) { this.standardMessages = standardMessages.toString(); return this; } /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Constraints:
* Allowed Values: ALL, NONE * * @return

* Sets targeted messages as the bot trigger. For targeted messages: *

* * @see TargetedMessages */ public String getTargetedMessages() { return targetedMessages; } /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Constraints:
* Allowed Values: ALL, NONE * * @param targetedMessages

* Sets targeted messages as the bot trigger. For targeted * messages: *

* * @see TargetedMessages */ public void setTargetedMessages(String targetedMessages) { this.targetedMessages = targetedMessages; } /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: ALL, NONE * * @param targetedMessages

* Sets targeted messages as the bot trigger. For targeted * messages: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see TargetedMessages */ public InvokedBy withTargetedMessages(String targetedMessages) { this.targetedMessages = targetedMessages; return this; } /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Constraints:
* Allowed Values: ALL, NONE * * @param targetedMessages

* Sets targeted messages as the bot trigger. For targeted * messages: *

* * @see TargetedMessages */ public void setTargetedMessages(TargetedMessages targetedMessages) { this.targetedMessages = targetedMessages.toString(); } /** *

* Sets targeted messages as the bot trigger. For targeted messages: *

* *

* Returns a reference to this object so that method calls can be chained * together. *

* Constraints:
* Allowed Values: ALL, NONE * * @param targetedMessages

* Sets targeted messages as the bot trigger. For targeted * messages: *

* * @return A reference to this updated object so that method calls can be * chained together. * @see TargetedMessages */ public InvokedBy withTargetedMessages(TargetedMessages targetedMessages) { this.targetedMessages = targetedMessages.toString(); 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 (getStandardMessages() != null) sb.append("StandardMessages: " + getStandardMessages() + ","); if (getTargetedMessages() != null) sb.append("TargetedMessages: " + getTargetedMessages()); sb.append("}"); return sb.toString(); } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStandardMessages() == null) ? 0 : getStandardMessages().hashCode()); hashCode = prime * hashCode + ((getTargetedMessages() == null) ? 0 : getTargetedMessages().hashCode()); return hashCode; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InvokedBy == false) return false; InvokedBy other = (InvokedBy) obj; if (other.getStandardMessages() == null ^ this.getStandardMessages() == null) return false; if (other.getStandardMessages() != null && other.getStandardMessages().equals(this.getStandardMessages()) == false) return false; if (other.getTargetedMessages() == null ^ this.getTargetedMessages() == null) return false; if (other.getTargetedMessages() != null && other.getTargetedMessages().equals(this.getTargetedMessages()) == false) return false; return true; } }