diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/InvokedBy.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/InvokedBy.java new file mode 100644 index 0000000000..95e014e749 --- /dev/null +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/InvokedBy.java @@ -0,0 +1,746 @@ +/* + * 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; + } +} diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/LexConfiguration.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/LexConfiguration.java index f8d17a2f26..6dcc4de1e4 100644 --- a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/LexConfiguration.java +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/LexConfiguration.java @@ -24,6 +24,11 @@ */ public class LexConfiguration implements Serializable { /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ *
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -34,6 +39,13 @@ public class LexConfiguration implements Serializable { */ private String respondsTo; + /** + *

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

+ */ + private InvokedBy invokedBy; + /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: @@ -72,6 +84,11 @@ public class LexConfiguration implements Serializable { private String welcomeIntent; /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ * *

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -80,7 +97,12 @@ public class LexConfiguration implements Serializable { * Constraints:
* Allowed Values: STANDARD_MESSAGES * - * @return

+ * @return + *

+ * Deprecated. Use InvokedBy instead. + *

+ * + *

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. *

@@ -91,6 +113,11 @@ public String getRespondsTo() { } /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ *
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -99,7 +126,12 @@ public String getRespondsTo() { * Constraints:
* Allowed Values: STANDARD_MESSAGES * - * @param respondsTo

+ * @param respondsTo + *

+ * Deprecated. Use InvokedBy instead. + *

+ * + *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

@@ -110,6 +142,11 @@ public void setRespondsTo(String respondsTo) { } /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ *
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -121,7 +158,12 @@ public void setRespondsTo(String respondsTo) { * Constraints:
* Allowed Values: STANDARD_MESSAGES * - * @param respondsTo

+ * @param respondsTo + *

+ * Deprecated. Use InvokedBy instead. + *

+ * + *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

@@ -135,6 +177,11 @@ public LexConfiguration withRespondsTo(String respondsTo) { } /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ *
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -143,7 +190,12 @@ public LexConfiguration withRespondsTo(String respondsTo) { * Constraints:
* Allowed Values: STANDARD_MESSAGES * - * @param respondsTo

+ * @param respondsTo + *

+ * Deprecated. Use InvokedBy instead. + *

+ * + *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

@@ -154,6 +206,11 @@ public void setRespondsTo(RespondsTo respondsTo) { } /** + * + *

+ * Deprecated. Use InvokedBy instead. + *

+ *
*

* Determines whether the Amazon Lex V2 bot responds to all standard * messages. Control messages are not supported. @@ -165,7 +222,12 @@ public void setRespondsTo(RespondsTo respondsTo) { * Constraints:
* Allowed Values: STANDARD_MESSAGES * - * @param respondsTo

+ * @param respondsTo + *

+ * Deprecated. Use InvokedBy instead. + *

+ * + *

* Determines whether the Amazon Lex V2 bot responds to all * standard messages. Control messages are not supported. *

@@ -178,6 +240,51 @@ public LexConfiguration withRespondsTo(RespondsTo respondsTo) { return this; } + /** + *

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

+ * + * @return

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

+ */ + public InvokedBy getInvokedBy() { + return invokedBy; + } + + /** + *

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

+ * + * @param invokedBy

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

+ */ + public void setInvokedBy(InvokedBy invokedBy) { + this.invokedBy = invokedBy; + } + + /** + *

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

+ *

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

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

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public LexConfiguration withInvokedBy(InvokedBy invokedBy) { + this.invokedBy = invokedBy; + return this; + } + /** *

* The ARN of the Amazon Lex V2 bot's alias. The ARN uses this format: @@ -401,6 +508,8 @@ public String toString() { sb.append("{"); if (getRespondsTo() != null) sb.append("RespondsTo: " + getRespondsTo() + ","); + if (getInvokedBy() != null) + sb.append("InvokedBy: " + getInvokedBy() + ","); if (getLexBotAliasArn() != null) sb.append("LexBotAliasArn: " + getLexBotAliasArn() + ","); if (getLocaleId() != null) @@ -417,6 +526,7 @@ public int hashCode() { int hashCode = 1; hashCode = prime * hashCode + ((getRespondsTo() == null) ? 0 : getRespondsTo().hashCode()); + hashCode = prime * hashCode + ((getInvokedBy() == null) ? 0 : getInvokedBy().hashCode()); hashCode = prime * hashCode + ((getLexBotAliasArn() == null) ? 0 : getLexBotAliasArn().hashCode()); hashCode = prime * hashCode + ((getLocaleId() == null) ? 0 : getLocaleId().hashCode()); @@ -441,6 +551,11 @@ public boolean equals(Object obj) { if (other.getRespondsTo() != null && other.getRespondsTo().equals(this.getRespondsTo()) == false) return false; + if (other.getInvokedBy() == null ^ this.getInvokedBy() == null) + return false; + if (other.getInvokedBy() != null + && other.getInvokedBy().equals(this.getInvokedBy()) == false) + return false; if (other.getLexBotAliasArn() == null ^ this.getLexBotAliasArn() == null) return false; if (other.getLexBotAliasArn() != null diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/StandardMessages.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/StandardMessages.java new file mode 100644 index 0000000000..2729411f02 --- /dev/null +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/StandardMessages.java @@ -0,0 +1,66 @@ +/* + * 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.util.HashMap; +import java.util.Map; + +/** + * Standard Messages + */ +public enum StandardMessages { + + AUTO("AUTO"), + ALL("ALL"), + MENTIONS("MENTIONS"), + NONE("NONE"); + + private String value; + + private StandardMessages(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + + private static final Map enumMap; + static { + enumMap = new HashMap(); + enumMap.put("AUTO", AUTO); + enumMap.put("ALL", ALL); + enumMap.put("MENTIONS", MENTIONS); + enumMap.put("NONE", NONE); + } + + /** + * Use this in place of valueOf. + * + * @param value real value + * @return StandardMessages corresponding to the value + */ + public static StandardMessages fromValue(String value) { + if (value == null || value.isEmpty()) { + throw new IllegalArgumentException("Value cannot be null or empty!"); + } else if (enumMap.containsKey(value)) { + return enumMap.get(value); + } else { + throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); + } + } +} diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/TargetedMessages.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/TargetedMessages.java new file mode 100644 index 0000000000..8c5fb34c13 --- /dev/null +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/TargetedMessages.java @@ -0,0 +1,62 @@ +/* + * 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.util.HashMap; +import java.util.Map; + +/** + * Targeted Messages + */ +public enum TargetedMessages { + + ALL("ALL"), + NONE("NONE"); + + private String value; + + private TargetedMessages(String value) { + this.value = value; + } + + @Override + public String toString() { + return value; + } + + private static final Map enumMap; + static { + enumMap = new HashMap(); + enumMap.put("ALL", ALL); + enumMap.put("NONE", NONE); + } + + /** + * Use this in place of valueOf. + * + * @param value real value + * @return TargetedMessages corresponding to the value + */ + public static TargetedMessages fromValue(String value) { + if (value == null || value.isEmpty()) { + throw new IllegalArgumentException("Value cannot be null or empty!"); + } else if (enumMap.containsKey(value)) { + return enumMap.get(value); + } else { + throw new IllegalArgumentException("Cannot create enum from " + value + " value!"); + } + } +} diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/UpdateAppInstanceBotRequest.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/UpdateAppInstanceBotRequest.java index 815cc759cc..bd17a966d9 100644 --- a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/UpdateAppInstanceBotRequest.java +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/UpdateAppInstanceBotRequest.java @@ -61,6 +61,13 @@ public class UpdateAppInstanceBotRequest extends AmazonWebServiceRequest impleme */ private String metadata; + /** + *

+ * The configuration for the bot update. + *

+ */ + private Configuration configuration; + /** *

* The ARN of the AppInstanceBot. @@ -241,6 +248,51 @@ public UpdateAppInstanceBotRequest withMetadata(String metadata) { return this; } + /** + *

+ * The configuration for the bot update. + *

+ * + * @return

+ * The configuration for the bot update. + *

+ */ + public Configuration getConfiguration() { + return configuration; + } + + /** + *

+ * The configuration for the bot update. + *

+ * + * @param configuration

+ * The configuration for the bot update. + *

+ */ + public void setConfiguration(Configuration configuration) { + this.configuration = configuration; + } + + /** + *

+ * The configuration for the bot update. + *

+ *

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

+ * The configuration for the bot update. + *

+ * @return A reference to this updated object so that method calls can be + * chained together. + */ + public UpdateAppInstanceBotRequest withConfiguration(Configuration configuration) { + this.configuration = configuration; + return this; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -257,7 +309,9 @@ public String toString() { if (getName() != null) sb.append("Name: " + getName() + ","); if (getMetadata() != null) - sb.append("Metadata: " + getMetadata()); + sb.append("Metadata: " + getMetadata() + ","); + if (getConfiguration() != null) + sb.append("Configuration: " + getConfiguration()); sb.append("}"); return sb.toString(); } @@ -271,6 +325,8 @@ public int hashCode() { + ((getAppInstanceBotArn() == null) ? 0 : getAppInstanceBotArn().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); + hashCode = prime * hashCode + + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode()); return hashCode; } @@ -298,6 +354,11 @@ public boolean equals(Object obj) { return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; + if (other.getConfiguration() == null ^ this.getConfiguration() == null) + return false; + if (other.getConfiguration() != null + && other.getConfiguration().equals(this.getConfiguration()) == false) + return false; return true; } } diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonMarshaller.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonMarshaller.java new file mode 100644 index 0000000000..9aed545122 --- /dev/null +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonMarshaller.java @@ -0,0 +1,49 @@ +/* + * 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.transform; + +import com.amazonaws.services.chimesdkidentity.model.*; +import com.amazonaws.util.DateUtils; +import com.amazonaws.util.json.AwsJsonWriter; + +/** + * JSON marshaller for POJO InvokedBy + */ +class InvokedByJsonMarshaller { + + public void marshall(InvokedBy invokedBy, AwsJsonWriter jsonWriter) throws Exception { + jsonWriter.beginObject(); + if (invokedBy.getStandardMessages() != null) { + String standardMessages = invokedBy.getStandardMessages(); + jsonWriter.name("StandardMessages"); + jsonWriter.value(standardMessages); + } + if (invokedBy.getTargetedMessages() != null) { + String targetedMessages = invokedBy.getTargetedMessages(); + jsonWriter.name("TargetedMessages"); + jsonWriter.value(targetedMessages); + } + jsonWriter.endObject(); + } + + private static InvokedByJsonMarshaller instance; + + public static InvokedByJsonMarshaller getInstance() { + if (instance == null) + instance = new InvokedByJsonMarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonUnmarshaller.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonUnmarshaller.java new file mode 100644 index 0000000000..299d3cb1e5 --- /dev/null +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/InvokedByJsonUnmarshaller.java @@ -0,0 +1,59 @@ +/* + * 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.transform; + +import com.amazonaws.services.chimesdkidentity.model.*; +import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; +import com.amazonaws.transform.*; +import com.amazonaws.util.json.AwsJsonReader; + +/** + * JSON unmarshaller for POJO InvokedBy + */ +class InvokedByJsonUnmarshaller implements Unmarshaller { + + public InvokedBy unmarshall(JsonUnmarshallerContext context) throws Exception { + AwsJsonReader reader = context.getReader(); + if (!reader.isContainer()) { + reader.skipValue(); + return null; + } + InvokedBy invokedBy = new InvokedBy(); + reader.beginObject(); + while (reader.hasNext()) { + String name = reader.nextName(); + if (name.equals("StandardMessages")) { + invokedBy.setStandardMessages(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else if (name.equals("TargetedMessages")) { + invokedBy.setTargetedMessages(StringJsonUnmarshaller.getInstance() + .unmarshall(context)); + } else { + reader.skipValue(); + } + } + reader.endObject(); + return invokedBy; + } + + private static InvokedByJsonUnmarshaller instance; + + public static InvokedByJsonUnmarshaller getInstance() { + if (instance == null) + instance = new InvokedByJsonUnmarshaller(); + return instance; + } +} diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonMarshaller.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonMarshaller.java index 7455abd47d..939abeea6c 100644 --- a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonMarshaller.java +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonMarshaller.java @@ -32,6 +32,11 @@ public void marshall(LexConfiguration lexConfiguration, AwsJsonWriter jsonWriter jsonWriter.name("RespondsTo"); jsonWriter.value(respondsTo); } + if (lexConfiguration.getInvokedBy() != null) { + InvokedBy invokedBy = lexConfiguration.getInvokedBy(); + jsonWriter.name("InvokedBy"); + InvokedByJsonMarshaller.getInstance().marshall(invokedBy, jsonWriter); + } if (lexConfiguration.getLexBotAliasArn() != null) { String lexBotAliasArn = lexConfiguration.getLexBotAliasArn(); jsonWriter.name("LexBotAliasArn"); diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonUnmarshaller.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonUnmarshaller.java index 120b0b17a1..e5ba077abd 100644 --- a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonUnmarshaller.java +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/LexConfigurationJsonUnmarshaller.java @@ -39,6 +39,9 @@ public LexConfiguration unmarshall(JsonUnmarshallerContext context) throws Excep if (name.equals("RespondsTo")) { lexConfiguration.setRespondsTo(StringJsonUnmarshaller.getInstance() .unmarshall(context)); + } else if (name.equals("InvokedBy")) { + lexConfiguration.setInvokedBy(InvokedByJsonUnmarshaller.getInstance() + .unmarshall(context)); } else if (name.equals("LexBotAliasArn")) { lexConfiguration.setLexBotAliasArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); diff --git a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/UpdateAppInstanceBotRequestMarshaller.java b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/UpdateAppInstanceBotRequestMarshaller.java index 6679f18a7a..45ef91bb03 100644 --- a/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/UpdateAppInstanceBotRequestMarshaller.java +++ b/aws-android-sdk-chimesdkidentity/src/main/java/com/amazonaws/services/chimesdkidentity/model/transform/UpdateAppInstanceBotRequestMarshaller.java @@ -84,6 +84,11 @@ public Request marshall( jsonWriter.name("Metadata"); jsonWriter.value(metadata); } + if (updateAppInstanceBotRequest.getConfiguration() != null) { + Configuration configuration = updateAppInstanceBotRequest.getConfiguration(); + jsonWriter.name("Configuration"); + ConfigurationJsonMarshaller.getInstance().marshall(configuration, jsonWriter); + } jsonWriter.endObject(); jsonWriter.close();