diff --git a/sdk/communication/azure-communication-messages/CHANGELOG.md b/sdk/communication/azure-communication-messages/CHANGELOG.md index 31543dd4c2b3..32b00131bc23 100644 --- a/sdk/communication/azure-communication-messages/CHANGELOG.md +++ b/sdk/communication/azure-communication-messages/CHANGELOG.md @@ -4,12 +4,51 @@ ### Features Added -### Breaking Changes +* `models.channels.WhatsAppListActionBindings` was added -### Bugs Fixed +* `models.ActionGroupItem` was added -### Other Changes +* `models.ImageMessageContent` was added + +* `models.ButtonSetContent` was added + +* `models.MessageContent` was added + +* `models.StickerNotificationContent` was added + +* `models.channels.WhatsAppUrlActionBindings` was added + +* `models.ActionGroup` was added + +* `models.InteractiveMessage` was added + +* `models.VideoMessageContent` was added + +* `models.InteractiveNotificationContent` was added + +* `models.ReactionNotificationContent` was added + +* `models.DocumentMessageContent` was added + +* `models.ButtonContent` was added + +* `models.ActionGroupContent` was added + +* `models.LinkContent` was added + +* `models.MessageContentKind` was added + +* `models.ActionBindings` was added + +* `models.MessageActionBindingKind` was added + +* `models.channels.WhatsAppButtonActionBindings` was added + +* `models.TextMessageContent` was added + +#### `models.channels.WhatsAppMessageTemplateItem` was modified +* `getName()` was added ## 1.1.1 (2024-12-04) diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java index 8673e4222036..462bb0b33834 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java @@ -18,7 +18,12 @@ public enum MessagesServiceVersion implements ServiceVersion { /** * Enum value 2024-08-30. */ - V2024_08_30("2024-08-30"); + V2024_08_30("2024-08-30"), + + /** + * Enum value 2025-01-15-preview. + */ + V2025_01_15_PREVIEW("2025-01-15-preview"); private final String version; @@ -40,6 +45,6 @@ public String getVersion() { * @return The latest {@link MessagesServiceVersion}. */ public static MessagesServiceVersion getLatest() { - return V2024_08_30; + return V2025_01_15_PREVIEW; } } diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java index 435f82449d3b..655037080cda 100644 --- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java +++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java @@ -55,7 +55,7 @@ public final class NotificationMessagesAsyncClient { *
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
index 59266523b678..1d4c46e92ef1 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
@@ -53,7 +53,7 @@ public final class NotificationMessagesClient {
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
index a9176df99148..3d7f4d8bdabb 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
@@ -212,7 +212,7 @@ Response downloadMediaSync(@HostParam("endpoint") String endpoint,
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
@@ -284,7 +284,7 @@ public Mono> sendWithResponseAsync(BinaryData notificationC
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java
new file mode 100644
index 000000000000..46232168a29a
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java
@@ -0,0 +1,113 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings;
+import com.azure.communication.messages.models.channels.WhatsAppListActionBindings;
+import com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * Binding actions to the interactive message.
+ */
+@Immutable
+public class ActionBindings implements JsonSerializable {
+ /*
+ * Kind of the MessageActionBinding.
+ */
+ @Generated
+ private MessageActionBindingKind kind = MessageActionBindingKind.fromString("ActionBindings");
+
+ /**
+ * Creates an instance of ActionBindings class.
+ */
+ @Generated
+ public ActionBindings() {
+ }
+
+ /**
+ * Get the kind property: Kind of the MessageActionBinding.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ public MessageActionBindingKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionBindings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionBindings if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the ActionBindings.
+ */
+ @Generated
+ public static ActionBindings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("kind".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("whatsAppListAction".equals(discriminatorValue)) {
+ return WhatsAppListActionBindings.fromJson(readerToUse.reset());
+ } else if ("whatsAppButtonAction".equals(discriminatorValue)) {
+ return WhatsAppButtonActionBindings.fromJson(readerToUse.reset());
+ } else if ("whatsAppUrlAction".equals(discriminatorValue)) {
+ return WhatsAppUrlActionBindings.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ @Generated
+ static ActionBindings fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActionBindings deserializedActionBindings = new ActionBindings();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("kind".equals(fieldName)) {
+ deserializedActionBindings.kind = MessageActionBindingKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedActionBindings;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java
new file mode 100644
index 000000000000..4c4775dcfc5e
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The Action Group content.
+ */
+@Immutable
+public final class ActionGroup implements JsonSerializable {
+ /*
+ * Title of the ActionGroup.
+ */
+ @Generated
+ private final String title;
+
+ /*
+ * Array of items in ActionGroup.
+ */
+ @Generated
+ private final List items;
+
+ /**
+ * Creates an instance of ActionGroup class.
+ *
+ * @param title the title value to set.
+ * @param items the items value to set.
+ */
+ @Generated
+ public ActionGroup(String title, List items) {
+ this.title = title;
+ this.items = items;
+ }
+
+ /**
+ * Get the title property: Title of the ActionGroup.
+ *
+ * @return the title value.
+ */
+ @Generated
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Get the items property: Array of items in ActionGroup.
+ *
+ * @return the items value.
+ */
+ @Generated
+ public List getItems() {
+ return this.items;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("title", this.title);
+ jsonWriter.writeArrayField("items", this.items, (writer, element) -> writer.writeJson(element));
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroup from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroup if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActionGroup.
+ */
+ @Generated
+ public static ActionGroup fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String title = null;
+ List items = null;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("title".equals(fieldName)) {
+ title = reader.getString();
+ } else if ("items".equals(fieldName)) {
+ items = reader.readArray(reader1 -> ActionGroupItem.fromJson(reader1));
+ } else {
+ reader.skipChildren();
+ }
+ }
+ return new ActionGroup(title, items);
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java
new file mode 100644
index 000000000000..68a01d6173aa
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java
@@ -0,0 +1,129 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The action content of type ActionGroup.
+ */
+@Immutable
+public final class ActionGroupContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.GROUP;
+
+ /*
+ * Title of the actionGroup content.
+ */
+ @Generated
+ private final String title;
+
+ /*
+ * Set or group of actions.
+ */
+ @Generated
+ private final List groups;
+
+ /**
+ * Creates an instance of ActionGroupContent class.
+ *
+ * @param title the title value to set.
+ * @param groups the groups value to set.
+ */
+ @Generated
+ public ActionGroupContent(String title, List groups) {
+ this.title = title;
+ this.groups = groups;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the title property: Title of the actionGroup content.
+ *
+ * @return the title value.
+ */
+ @Generated
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Get the groups property: Set or group of actions.
+ *
+ * @return the groups value.
+ */
+ @Generated
+ public List getGroups() {
+ return this.groups;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("title", this.title);
+ jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroupContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroupContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActionGroupContent.
+ */
+ @Generated
+ public static ActionGroupContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String title = null;
+ List groups = null;
+ MessageContentKind kind = MessageContentKind.GROUP;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("title".equals(fieldName)) {
+ title = reader.getString();
+ } else if ("groups".equals(fieldName)) {
+ groups = reader.readArray(reader1 -> ActionGroup.fromJson(reader1));
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ ActionGroupContent deserializedActionGroupContent = new ActionGroupContent(title, groups);
+ deserializedActionGroupContent.kind = kind;
+
+ return deserializedActionGroupContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java
new file mode 100644
index 000000000000..2aec2dcfdc2e
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java
@@ -0,0 +1,127 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The Action group item in the content.
+ */
+@Immutable
+public final class ActionGroupItem implements JsonSerializable {
+ /*
+ * Id of the Item.
+ */
+ @Generated
+ private final String id;
+
+ /*
+ * Title of the Item.
+ */
+ @Generated
+ private final String title;
+
+ /*
+ * Description of the Item.
+ */
+ @Generated
+ private final String description;
+
+ /**
+ * Creates an instance of ActionGroupItem class.
+ *
+ * @param id the id value to set.
+ * @param title the title value to set.
+ * @param description the description value to set.
+ */
+ @Generated
+ public ActionGroupItem(String id, String title, String description) {
+ this.id = id;
+ this.title = title;
+ this.description = description;
+ }
+
+ /**
+ * Get the id property: Id of the Item.
+ *
+ * @return the id value.
+ */
+ @Generated
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the title property: Title of the Item.
+ *
+ * @return the title value.
+ */
+ @Generated
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Get the description property: Description of the Item.
+ *
+ * @return the description value.
+ */
+ @Generated
+ public String getDescription() {
+ return this.description;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("title", this.title);
+ jsonWriter.writeStringField("description", this.description);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ActionGroupItem from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ActionGroupItem if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ActionGroupItem.
+ */
+ @Generated
+ public static ActionGroupItem fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String id = null;
+ String title = null;
+ String description = null;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ id = reader.getString();
+ } else if ("title".equals(fieldName)) {
+ title = reader.getString();
+ } else if ("description".equals(fieldName)) {
+ description = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+ return new ActionGroupItem(id, title, description);
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java
new file mode 100644
index 000000000000..8019ea3436cd
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java
@@ -0,0 +1,105 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type Button information.
+ */
+@Immutable
+public final class ButtonContent implements JsonSerializable {
+ /*
+ * Unique Id of the button content.
+ */
+ @Generated
+ private final String id;
+
+ /*
+ * Title of the button content.
+ */
+ @Generated
+ private final String title;
+
+ /**
+ * Creates an instance of ButtonContent class.
+ *
+ * @param id the id value to set.
+ * @param title the title value to set.
+ */
+ @Generated
+ public ButtonContent(String id, String title) {
+ this.id = id;
+ this.title = title;
+ }
+
+ /**
+ * Get the id property: Unique Id of the button content.
+ *
+ * @return the id value.
+ */
+ @Generated
+ public String getId() {
+ return this.id;
+ }
+
+ /**
+ * Get the title property: Title of the button content.
+ *
+ * @return the title value.
+ */
+ @Generated
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("id", this.id);
+ jsonWriter.writeStringField("title", this.title);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ButtonContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ButtonContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ButtonContent.
+ */
+ @Generated
+ public static ButtonContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String id = null;
+ String title = null;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("id".equals(fieldName)) {
+ id = reader.getString();
+ } else if ("title".equals(fieldName)) {
+ title = reader.getString();
+ } else {
+ reader.skipChildren();
+ }
+ }
+ return new ButtonContent(id, title);
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java
new file mode 100644
index 000000000000..845b108cf113
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java
@@ -0,0 +1,107 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * The message content of type ButtonSet/ List of buttons information.
+ */
+@Immutable
+public final class ButtonSetContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.BUTTON_SET;
+
+ /*
+ * Unique Id of the button content.
+ */
+ @Generated
+ private final List buttons;
+
+ /**
+ * Creates an instance of ButtonSetContent class.
+ *
+ * @param buttons the buttons value to set.
+ */
+ @Generated
+ public ButtonSetContent(List buttons) {
+ this.buttons = buttons;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the buttons property: Unique Id of the button content.
+ *
+ * @return the buttons value.
+ */
+ @Generated
+ public List getButtons() {
+ return this.buttons;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeArrayField("buttons", this.buttons, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ButtonSetContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ButtonSetContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ButtonSetContent.
+ */
+ @Generated
+ public static ButtonSetContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ List buttons = null;
+ MessageContentKind kind = MessageContentKind.BUTTON_SET;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("buttons".equals(fieldName)) {
+ buttons = reader.readArray(reader1 -> ButtonContent.fromJson(reader1));
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ ButtonSetContent deserializedButtonSetContent = new ButtonSetContent(buttons);
+ deserializedButtonSetContent.kind = kind;
+
+ return deserializedButtonSetContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
index b07ef3e8bcbf..6decf5ae4113 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
@@ -85,4 +85,22 @@ public static Collection values() {
@Generated
@Deprecated()
public static final CommunicationMessageKind IMAGE_V0 = fromString("image_v0");
+
+ /**
+ * Sticker message type.
+ */
+ @Generated
+ public static final CommunicationMessageKind STICKER = fromString("sticker");
+
+ /**
+ * Reaction message type.
+ */
+ @Generated
+ public static final CommunicationMessageKind REACTION = fromString("reaction");
+
+ /**
+ * Interactive Actionable message type.
+ */
+ @Generated
+ public static final CommunicationMessageKind INTERACTIVE = fromString("interactive");
}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java
new file mode 100644
index 000000000000..3bd4c4ecc27a
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type document information.
+ */
+@Immutable
+public final class DocumentMessageContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.DOCUMENT;
+
+ /*
+ * MediaUri of the media content.
+ */
+ @Generated
+ private final String mediaUrl;
+
+ /**
+ * Creates an instance of DocumentMessageContent class.
+ *
+ * @param mediaUrl the mediaUrl value to set.
+ */
+ @Generated
+ public DocumentMessageContent(String mediaUrl) {
+ this.mediaUrl = mediaUrl;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the mediaUrl property: MediaUri of the media content.
+ *
+ * @return the mediaUrl value.
+ */
+ @Generated
+ public String getMediaUrl() {
+ return this.mediaUrl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("mediaUri", this.mediaUrl);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of DocumentMessageContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of DocumentMessageContent if the JsonReader was pointing to an instance of it, or null if it
+ * was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the DocumentMessageContent.
+ */
+ @Generated
+ public static DocumentMessageContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String mediaUrl = null;
+ MessageContentKind kind = MessageContentKind.DOCUMENT;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("mediaUri".equals(fieldName)) {
+ mediaUrl = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ DocumentMessageContent deserializedDocumentMessageContent = new DocumentMessageContent(mediaUrl);
+ deserializedDocumentMessageContent.kind = kind;
+
+ return deserializedDocumentMessageContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java
new file mode 100644
index 000000000000..69da6055df27
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type image information.
+ */
+@Immutable
+public final class ImageMessageContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.IMAGE;
+
+ /*
+ * MediaUri of the media content.
+ */
+ @Generated
+ private final String mediaUrl;
+
+ /**
+ * Creates an instance of ImageMessageContent class.
+ *
+ * @param mediaUrl the mediaUrl value to set.
+ */
+ @Generated
+ public ImageMessageContent(String mediaUrl) {
+ this.mediaUrl = mediaUrl;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the mediaUrl property: MediaUri of the media content.
+ *
+ * @return the mediaUrl value.
+ */
+ @Generated
+ public String getMediaUrl() {
+ return this.mediaUrl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("mediaUri", this.mediaUrl);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ImageMessageContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ImageMessageContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ImageMessageContent.
+ */
+ @Generated
+ public static ImageMessageContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String mediaUrl = null;
+ MessageContentKind kind = MessageContentKind.IMAGE;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("mediaUri".equals(fieldName)) {
+ mediaUrl = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ ImageMessageContent deserializedImageMessageContent = new ImageMessageContent(mediaUrl);
+ deserializedImageMessageContent.kind = kind;
+
+ return deserializedImageMessageContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java
new file mode 100644
index 000000000000..be4f7491361a
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Fluent;
+import com.azure.core.annotation.Generated;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The Interactive message content to which user can read and respond.
+ */
+@Fluent
+public final class InteractiveMessage implements JsonSerializable {
+ /*
+ * Gets or Sets Header content. Supports the following types:text, images etc.
+ */
+ @Generated
+ private MessageContent headerProperty;
+
+ /*
+ * Gets or Sets Message body content. Emojis, markdown, and links are supported.
+ */
+ @Generated
+ private final TextMessageContent body;
+
+ /*
+ * Gets or Sets Message footer content. Emojis, markdown, and links are supported.
+ */
+ @Generated
+ private TextMessageContent footer;
+
+ /*
+ * The binding object to get or set Action which describes options user have to respond to message.
+ */
+ @Generated
+ private final ActionBindings action;
+
+ /**
+ * Creates an instance of InteractiveMessage class.
+ *
+ * @param body the body value to set.
+ * @param action the action value to set.
+ */
+ @Generated
+ public InteractiveMessage(TextMessageContent body, ActionBindings action) {
+ this.body = body;
+ this.action = action;
+ }
+
+ /**
+ * Get the headerProperty property: Gets or Sets Header content. Supports the following types:text, images etc.
+ *
+ * @return the headerProperty value.
+ */
+ @Generated
+ public MessageContent getHeaderProperty() {
+ return this.headerProperty;
+ }
+
+ /**
+ * Set the headerProperty property: Gets or Sets Header content. Supports the following types:text, images etc.
+ *
+ * @param headerProperty the headerProperty value to set.
+ * @return the InteractiveMessage object itself.
+ */
+ @Generated
+ public InteractiveMessage setHeaderProperty(MessageContent headerProperty) {
+ this.headerProperty = headerProperty;
+ return this;
+ }
+
+ /**
+ * Get the body property: Gets or Sets Message body content. Emojis, markdown, and links are supported.
+ *
+ * @return the body value.
+ */
+ @Generated
+ public TextMessageContent getBody() {
+ return this.body;
+ }
+
+ /**
+ * Get the footer property: Gets or Sets Message footer content. Emojis, markdown, and links are supported.
+ *
+ * @return the footer value.
+ */
+ @Generated
+ public TextMessageContent getFooter() {
+ return this.footer;
+ }
+
+ /**
+ * Set the footer property: Gets or Sets Message footer content. Emojis, markdown, and links are supported.
+ *
+ * @param footer the footer value to set.
+ * @return the InteractiveMessage object itself.
+ */
+ @Generated
+ public InteractiveMessage setFooter(TextMessageContent footer) {
+ this.footer = footer;
+ return this;
+ }
+
+ /**
+ * Get the action property: The binding object to get or set Action which describes options user have to respond to
+ * message.
+ *
+ * @return the action value.
+ */
+ @Generated
+ public ActionBindings getAction() {
+ return this.action;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("body", this.body);
+ jsonWriter.writeJsonField("action", this.action);
+ jsonWriter.writeJsonField("header", this.headerProperty);
+ jsonWriter.writeJsonField("footer", this.footer);
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of InteractiveMessage from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of InteractiveMessage if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the InteractiveMessage.
+ */
+ @Generated
+ public static InteractiveMessage fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ TextMessageContent body = null;
+ ActionBindings action = null;
+ MessageContent headerProperty = null;
+ TextMessageContent footer = null;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("body".equals(fieldName)) {
+ body = TextMessageContent.fromJson(reader);
+ } else if ("action".equals(fieldName)) {
+ action = ActionBindings.fromJson(reader);
+ } else if ("header".equals(fieldName)) {
+ headerProperty = MessageContent.fromJson(reader);
+ } else if ("footer".equals(fieldName)) {
+ footer = TextMessageContent.fromJson(reader);
+ } else {
+ reader.skipChildren();
+ }
+ }
+ InteractiveMessage deserializedInteractiveMessage = new InteractiveMessage(body, action);
+ deserializedInteractiveMessage.headerProperty = headerProperty;
+ deserializedInteractiveMessage.footer = footer;
+
+ return deserializedInteractiveMessage;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java
new file mode 100644
index 000000000000..cfdcdba2ee76
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A request to send an Interactive message notification.
+ */
+@Immutable
+public final class InteractiveNotificationContent extends NotificationContent {
+ /*
+ * The type discriminator describing a notification type.
+ */
+ @Generated
+ private CommunicationMessageKind kind = CommunicationMessageKind.INTERACTIVE;
+
+ /*
+ * The interactive message content.
+ */
+ @Generated
+ private final InteractiveMessage interactiveMessage;
+
+ /**
+ * Creates an instance of InteractiveNotificationContent class.
+ *
+ * @param channelRegistrationId the channelRegistrationId value to set.
+ * @param to the to value to set.
+ * @param interactiveMessage the interactiveMessage value to set.
+ */
+ @Generated
+ public InteractiveNotificationContent(String channelRegistrationId, List to,
+ InteractiveMessage interactiveMessage) {
+ super(channelRegistrationId, to);
+ this.interactiveMessage = interactiveMessage;
+ }
+
+ /**
+ * Get the kind property: The type discriminator describing a notification type.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public CommunicationMessageKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the interactiveMessage property: The interactive message content.
+ *
+ * @return the interactiveMessage value.
+ */
+ @Generated
+ public InteractiveMessage getInteractiveMessage() {
+ return this.interactiveMessage;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
+ jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeJsonField("interactiveMessage", this.interactiveMessage);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of InteractiveNotificationContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of InteractiveNotificationContent if the JsonReader was pointing to an instance of it, or
+ * null if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the InteractiveNotificationContent.
+ */
+ @Generated
+ public static InteractiveNotificationContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String channelRegistrationId = null;
+ List to = null;
+ InteractiveMessage interactiveMessage = null;
+ CommunicationMessageKind kind = CommunicationMessageKind.INTERACTIVE;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("channelRegistrationId".equals(fieldName)) {
+ channelRegistrationId = reader.getString();
+ } else if ("to".equals(fieldName)) {
+ to = reader.readArray(reader1 -> reader1.getString());
+ } else if ("interactiveMessage".equals(fieldName)) {
+ interactiveMessage = InteractiveMessage.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ kind = CommunicationMessageKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ InteractiveNotificationContent deserializedInteractiveNotificationContent
+ = new InteractiveNotificationContent(channelRegistrationId, to, interactiveMessage);
+ deserializedInteractiveNotificationContent.kind = kind;
+
+ return deserializedInteractiveNotificationContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java
new file mode 100644
index 000000000000..c45cc00d0639
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java
@@ -0,0 +1,128 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type Url information.
+ */
+@Immutable
+public final class LinkContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.URL;
+
+ /*
+ * Title of the url content.
+ */
+ @Generated
+ private final String title;
+
+ /*
+ * The url in the content.
+ */
+ @Generated
+ private final String url;
+
+ /**
+ * Creates an instance of LinkContent class.
+ *
+ * @param title the title value to set.
+ * @param url the url value to set.
+ */
+ @Generated
+ public LinkContent(String title, String url) {
+ this.title = title;
+ this.url = url;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the title property: Title of the url content.
+ *
+ * @return the title value.
+ */
+ @Generated
+ public String getTitle() {
+ return this.title;
+ }
+
+ /**
+ * Get the url property: The url in the content.
+ *
+ * @return the url value.
+ */
+ @Generated
+ public String getUrl() {
+ return this.url;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("title", this.title);
+ jsonWriter.writeStringField("url", this.url);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of LinkContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of LinkContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the LinkContent.
+ */
+ @Generated
+ public static LinkContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String title = null;
+ String url = null;
+ MessageContentKind kind = MessageContentKind.URL;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("title".equals(fieldName)) {
+ title = reader.getString();
+ } else if ("url".equals(fieldName)) {
+ url = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ LinkContent deserializedLinkContent = new LinkContent(title, url);
+ deserializedLinkContent.kind = kind;
+
+ return deserializedLinkContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java
new file mode 100644
index 000000000000..8e6c3dbb2c6f
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java
@@ -0,0 +1,63 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The Kind of interactive message channel action binding like WhatsAppListAction.
+ */
+public final class MessageActionBindingKind extends ExpandableStringEnum {
+ /**
+ * The WhatsApp List action binding kind.
+ */
+ @Generated
+ public static final MessageActionBindingKind WHATS_APP_LIST_ACTION = fromString("whatsAppListAction");
+
+ /**
+ * The WhatsApp Button action binding kind.
+ */
+ @Generated
+ public static final MessageActionBindingKind WHATS_APP_BUTTON_ACTION = fromString("whatsAppButtonAction");
+
+ /**
+ * The WhatsApp Url action binding kind.
+ */
+ @Generated
+ public static final MessageActionBindingKind WHATS_APP_URL_ACTION = fromString("whatsAppUrlAction");
+
+ /**
+ * Creates a new instance of MessageActionBindingKind value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Generated
+ @Deprecated
+ public MessageActionBindingKind() {
+ }
+
+ /**
+ * Creates or finds a MessageActionBindingKind from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding MessageActionBindingKind.
+ */
+ @Generated
+ public static MessageActionBindingKind fromString(String name) {
+ return fromString(name, MessageActionBindingKind.class);
+ }
+
+ /**
+ * Gets known MessageActionBindingKind values.
+ *
+ * @return known MessageActionBindingKind values.
+ */
+ @Generated
+ public static Collection values() {
+ return values(MessageActionBindingKind.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java
new file mode 100644
index 000000000000..45dbe93515e5
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java
@@ -0,0 +1,118 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonSerializable;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content object used to create interactive messages components.
+ */
+@Immutable
+public class MessageContent implements JsonSerializable {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.fromString("MessageContent");
+
+ /**
+ * Creates an instance of MessageContent class.
+ */
+ @Generated
+ public MessageContent() {
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of MessageContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of MessageContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IOException If an error occurs while reading the MessageContent.
+ */
+ @Generated
+ public static MessageContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String discriminatorValue = null;
+ try (JsonReader readerToUse = reader.bufferObject()) {
+ readerToUse.nextToken(); // Prepare for reading
+ while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = readerToUse.getFieldName();
+ readerToUse.nextToken();
+ if ("kind".equals(fieldName)) {
+ discriminatorValue = readerToUse.getString();
+ break;
+ } else {
+ readerToUse.skipChildren();
+ }
+ }
+ // Use the discriminator value to determine which subtype should be deserialized.
+ if ("text".equals(discriminatorValue)) {
+ return TextMessageContent.fromJson(readerToUse.reset());
+ } else if ("document".equals(discriminatorValue)) {
+ return DocumentMessageContent.fromJson(readerToUse.reset());
+ } else if ("image".equals(discriminatorValue)) {
+ return ImageMessageContent.fromJson(readerToUse.reset());
+ } else if ("video".equals(discriminatorValue)) {
+ return VideoMessageContent.fromJson(readerToUse.reset());
+ } else if ("buttonSet".equals(discriminatorValue)) {
+ return ButtonSetContent.fromJson(readerToUse.reset());
+ } else if ("url".equals(discriminatorValue)) {
+ return LinkContent.fromJson(readerToUse.reset());
+ } else if ("group".equals(discriminatorValue)) {
+ return ActionGroupContent.fromJson(readerToUse.reset());
+ } else {
+ return fromJsonKnownDiscriminator(readerToUse.reset());
+ }
+ }
+ });
+ }
+
+ @Generated
+ static MessageContent fromJsonKnownDiscriminator(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ MessageContent deserializedMessageContent = new MessageContent();
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("kind".equals(fieldName)) {
+ deserializedMessageContent.kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+
+ return deserializedMessageContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java
new file mode 100644
index 000000000000..a2f16cea314b
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.util.ExpandableStringEnum;
+import java.util.Collection;
+
+/**
+ * The kind of Interactive message content.
+ */
+public final class MessageContentKind extends ExpandableStringEnum {
+ /**
+ * The text content type.
+ */
+ @Generated
+ public static final MessageContentKind TEXT = fromString("text");
+
+ /**
+ * The image content type.
+ */
+ @Generated
+ public static final MessageContentKind IMAGE = fromString("image");
+
+ /**
+ * The video content type.
+ */
+ @Generated
+ public static final MessageContentKind VIDEO = fromString("video");
+
+ /**
+ * The document content type.
+ */
+ @Generated
+ public static final MessageContentKind DOCUMENT = fromString("document");
+
+ /**
+ * The ActionSet content type.
+ */
+ @Generated
+ public static final MessageContentKind GROUP = fromString("group");
+
+ /**
+ * The ButtonSet content type.
+ */
+ @Generated
+ public static final MessageContentKind BUTTON_SET = fromString("buttonSet");
+
+ /**
+ * The Url content type.
+ */
+ @Generated
+ public static final MessageContentKind URL = fromString("url");
+
+ /**
+ * Creates a new instance of MessageContentKind value.
+ *
+ * @deprecated Use the {@link #fromString(String)} factory method.
+ */
+ @Generated
+ @Deprecated
+ public MessageContentKind() {
+ }
+
+ /**
+ * Creates or finds a MessageContentKind from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding MessageContentKind.
+ */
+ @Generated
+ public static MessageContentKind fromString(String name) {
+ return fromString(name, MessageContentKind.class);
+ }
+
+ /**
+ * Gets known MessageContentKind values.
+ *
+ * @return known MessageContentKind values.
+ */
+ @Generated
+ public static Collection values() {
+ return values(MessageContentKind.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
index cd28761960e1..7f082a0b7938 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
@@ -130,6 +130,12 @@ public static NotificationContent fromJson(JsonReader jsonReader) throws IOExcep
return VideoNotificationContent.fromJson(readerToUse.reset());
} else if ("audio".equals(discriminatorValue)) {
return AudioNotificationContent.fromJson(readerToUse.reset());
+ } else if ("reaction".equals(discriminatorValue)) {
+ return ReactionNotificationContent.fromJson(readerToUse.reset());
+ } else if ("sticker".equals(discriminatorValue)) {
+ return StickerNotificationContent.fromJson(readerToUse.reset());
+ } else if ("interactive".equals(discriminatorValue)) {
+ return InteractiveNotificationContent.fromJson(readerToUse.reset());
} else if ("template".equals(discriminatorValue)) {
return TemplateNotificationContent.fromJson(readerToUse.reset());
} else {
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java
new file mode 100644
index 000000000000..5080e95908e6
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java
@@ -0,0 +1,141 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A request to send a Reaction notification.
+ */
+@Immutable
+public final class ReactionNotificationContent extends NotificationContent {
+ /*
+ * The type discriminator describing a notification type.
+ */
+ @Generated
+ private CommunicationMessageKind kind = CommunicationMessageKind.REACTION;
+
+ /*
+ * emoji content like \uD83D\uDE00.
+ */
+ @Generated
+ private final String emoji;
+
+ /*
+ * ID of the previous message you want to reply to.
+ */
+ @Generated
+ private final String messageId;
+
+ /**
+ * Creates an instance of ReactionNotificationContent class.
+ *
+ * @param channelRegistrationId the channelRegistrationId value to set.
+ * @param to the to value to set.
+ * @param emoji the emoji value to set.
+ * @param messageId the messageId value to set.
+ */
+ @Generated
+ public ReactionNotificationContent(String channelRegistrationId, List to, String emoji, String messageId) {
+ super(channelRegistrationId, to);
+ this.emoji = emoji;
+ this.messageId = messageId;
+ }
+
+ /**
+ * Get the kind property: The type discriminator describing a notification type.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public CommunicationMessageKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the emoji property: emoji content like \uD83D\uDE00.
+ *
+ * @return the emoji value.
+ */
+ @Generated
+ public String getEmoji() {
+ return this.emoji;
+ }
+
+ /**
+ * Get the messageId property: ID of the previous message you want to reply to.
+ *
+ * @return the messageId value.
+ */
+ @Generated
+ public String getMessageId() {
+ return this.messageId;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
+ jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("emoji", this.emoji);
+ jsonWriter.writeStringField("messageId", this.messageId);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of ReactionNotificationContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of ReactionNotificationContent if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the ReactionNotificationContent.
+ */
+ @Generated
+ public static ReactionNotificationContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String channelRegistrationId = null;
+ List to = null;
+ String emoji = null;
+ String messageId = null;
+ CommunicationMessageKind kind = CommunicationMessageKind.REACTION;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("channelRegistrationId".equals(fieldName)) {
+ channelRegistrationId = reader.getString();
+ } else if ("to".equals(fieldName)) {
+ to = reader.readArray(reader1 -> reader1.getString());
+ } else if ("emoji".equals(fieldName)) {
+ emoji = reader.getString();
+ } else if ("messageId".equals(fieldName)) {
+ messageId = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = CommunicationMessageKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ ReactionNotificationContent deserializedReactionNotificationContent
+ = new ReactionNotificationContent(channelRegistrationId, to, emoji, messageId);
+ deserializedReactionNotificationContent.kind = kind;
+
+ return deserializedReactionNotificationContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java
new file mode 100644
index 000000000000..d0946b81131f
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java
@@ -0,0 +1,120 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * A request to send a Sticker notification.
+ */
+@Immutable
+public final class StickerNotificationContent extends NotificationContent {
+ /*
+ * The type discriminator describing a notification type.
+ */
+ @Generated
+ private CommunicationMessageKind kind = CommunicationMessageKind.STICKER;
+
+ /*
+ * A media url for the file. Required if the type is one of the supported media types, e.g. image
+ */
+ @Generated
+ private final String mediaUrl;
+
+ /**
+ * Creates an instance of StickerNotificationContent class.
+ *
+ * @param channelRegistrationId the channelRegistrationId value to set.
+ * @param to the to value to set.
+ * @param mediaUrl the mediaUrl value to set.
+ */
+ @Generated
+ public StickerNotificationContent(String channelRegistrationId, List to, String mediaUrl) {
+ super(channelRegistrationId, to);
+ this.mediaUrl = mediaUrl;
+ }
+
+ /**
+ * Get the kind property: The type discriminator describing a notification type.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public CommunicationMessageKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the mediaUrl property: A media url for the file. Required if the type is one of the supported media types,
+ * e.g. image.
+ *
+ * @return the mediaUrl value.
+ */
+ @Generated
+ public String getMediaUrl() {
+ return this.mediaUrl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
+ jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
+ jsonWriter.writeStringField("mediaUri", this.mediaUrl);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of StickerNotificationContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of StickerNotificationContent if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the StickerNotificationContent.
+ */
+ @Generated
+ public static StickerNotificationContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String channelRegistrationId = null;
+ List to = null;
+ String mediaUrl = null;
+ CommunicationMessageKind kind = CommunicationMessageKind.STICKER;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("channelRegistrationId".equals(fieldName)) {
+ channelRegistrationId = reader.getString();
+ } else if ("to".equals(fieldName)) {
+ to = reader.readArray(reader1 -> reader1.getString());
+ } else if ("mediaUri".equals(fieldName)) {
+ mediaUrl = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = CommunicationMessageKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ StickerNotificationContent deserializedStickerNotificationContent
+ = new StickerNotificationContent(channelRegistrationId, to, mediaUrl);
+ deserializedStickerNotificationContent.kind = kind;
+
+ return deserializedStickerNotificationContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java
new file mode 100644
index 000000000000..11723d4c6046
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type text information.
+ */
+@Immutable
+public final class TextMessageContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.TEXT;
+
+ /*
+ * The text value.
+ */
+ @Generated
+ private final String text;
+
+ /**
+ * Creates an instance of TextMessageContent class.
+ *
+ * @param text the text value to set.
+ */
+ @Generated
+ public TextMessageContent(String text) {
+ this.text = text;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the text property: The text value.
+ *
+ * @return the text value.
+ */
+ @Generated
+ public String getText() {
+ return this.text;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("text", this.text);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of TextMessageContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of TextMessageContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the TextMessageContent.
+ */
+ @Generated
+ public static TextMessageContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String text = null;
+ MessageContentKind kind = MessageContentKind.TEXT;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("text".equals(fieldName)) {
+ text = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ TextMessageContent deserializedTextMessageContent = new TextMessageContent(text);
+ deserializedTextMessageContent.kind = kind;
+
+ return deserializedTextMessageContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java
new file mode 100644
index 000000000000..aa2d9a628ab2
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java
@@ -0,0 +1,106 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models;
+
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * The message content of type video information.
+ */
+@Immutable
+public final class VideoMessageContent extends MessageContent {
+ /*
+ * Kind of MessageContent.
+ */
+ @Generated
+ private MessageContentKind kind = MessageContentKind.VIDEO;
+
+ /*
+ * MediaUri of the media content.
+ */
+ @Generated
+ private final String mediaUrl;
+
+ /**
+ * Creates an instance of VideoMessageContent class.
+ *
+ * @param mediaUrl the mediaUrl value to set.
+ */
+ @Generated
+ public VideoMessageContent(String mediaUrl) {
+ this.mediaUrl = mediaUrl;
+ }
+
+ /**
+ * Get the kind property: Kind of MessageContent.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageContentKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the mediaUrl property: MediaUri of the media content.
+ *
+ * @return the mediaUrl value.
+ */
+ @Generated
+ public String getMediaUrl() {
+ return this.mediaUrl;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField("mediaUri", this.mediaUrl);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of VideoMessageContent from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of VideoMessageContent if the JsonReader was pointing to an instance of it, or null if it was
+ * pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the VideoMessageContent.
+ */
+ @Generated
+ public static VideoMessageContent fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ String mediaUrl = null;
+ MessageContentKind kind = MessageContentKind.VIDEO;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("mediaUri".equals(fieldName)) {
+ mediaUrl = reader.getString();
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageContentKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ VideoMessageContent deserializedVideoMessageContent = new VideoMessageContent(mediaUrl);
+ deserializedVideoMessageContent.kind = kind;
+
+ return deserializedVideoMessageContent;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java
new file mode 100644
index 000000000000..b17410cf259e
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models.channels;
+
+import com.azure.communication.messages.models.ActionBindings;
+import com.azure.communication.messages.models.ButtonSetContent;
+import com.azure.communication.messages.models.MessageActionBindingKind;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * WhatsApp Binding actions to the interactive message.
+ */
+@Immutable
+public final class WhatsAppButtonActionBindings extends ActionBindings {
+ /*
+ * Kind of the MessageActionBinding.
+ */
+ @Generated
+ private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_BUTTON_ACTION;
+
+ /*
+ * Action content of Interactive message.
+ */
+ @Generated
+ private final ButtonSetContent content;
+
+ /**
+ * Creates an instance of WhatsAppButtonActionBindings class.
+ *
+ * @param content the content value to set.
+ */
+ @Generated
+ public WhatsAppButtonActionBindings(ButtonSetContent content) {
+ this.content = content;
+ }
+
+ /**
+ * Get the kind property: Kind of the MessageActionBinding.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageActionBindingKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the content property: Action content of Interactive message.
+ *
+ * @return the content value.
+ */
+ @Generated
+ public ButtonSetContent getContent() {
+ return this.content;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("content", this.content);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of WhatsAppButtonActionBindings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of WhatsAppButtonActionBindings if the JsonReader was pointing to an instance of it, or null
+ * if it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the WhatsAppButtonActionBindings.
+ */
+ @Generated
+ public static WhatsAppButtonActionBindings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ButtonSetContent content = null;
+ MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_BUTTON_ACTION;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("content".equals(fieldName)) {
+ content = ButtonSetContent.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageActionBindingKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ WhatsAppButtonActionBindings deserializedWhatsAppButtonActionBindings
+ = new WhatsAppButtonActionBindings(content);
+ deserializedWhatsAppButtonActionBindings.kind = kind;
+
+ return deserializedWhatsAppButtonActionBindings;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java
new file mode 100644
index 000000000000..051d154a5f7f
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models.channels;
+
+import com.azure.communication.messages.models.ActionBindings;
+import com.azure.communication.messages.models.ActionGroupContent;
+import com.azure.communication.messages.models.MessageActionBindingKind;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * WhatsApp List Binding actions to the interactive message.
+ */
+@Immutable
+public final class WhatsAppListActionBindings extends ActionBindings {
+ /*
+ * Kind of the MessageActionBinding.
+ */
+ @Generated
+ private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_LIST_ACTION;
+
+ /*
+ * Action content of Interactive message.
+ */
+ @Generated
+ private final ActionGroupContent content;
+
+ /**
+ * Creates an instance of WhatsAppListActionBindings class.
+ *
+ * @param content the content value to set.
+ */
+ @Generated
+ public WhatsAppListActionBindings(ActionGroupContent content) {
+ this.content = content;
+ }
+
+ /**
+ * Get the kind property: Kind of the MessageActionBinding.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageActionBindingKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the content property: Action content of Interactive message.
+ *
+ * @return the content value.
+ */
+ @Generated
+ public ActionGroupContent getContent() {
+ return this.content;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("content", this.content);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of WhatsAppListActionBindings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of WhatsAppListActionBindings if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the WhatsAppListActionBindings.
+ */
+ @Generated
+ public static WhatsAppListActionBindings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ ActionGroupContent content = null;
+ MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_LIST_ACTION;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("content".equals(fieldName)) {
+ content = ActionGroupContent.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageActionBindingKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ WhatsAppListActionBindings deserializedWhatsAppListActionBindings = new WhatsAppListActionBindings(content);
+ deserializedWhatsAppListActionBindings.kind = kind;
+
+ return deserializedWhatsAppListActionBindings;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java
new file mode 100644
index 000000000000..46513caa24af
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java
@@ -0,0 +1,109 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.models.channels;
+
+import com.azure.communication.messages.models.ActionBindings;
+import com.azure.communication.messages.models.LinkContent;
+import com.azure.communication.messages.models.MessageActionBindingKind;
+import com.azure.core.annotation.Generated;
+import com.azure.core.annotation.Immutable;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.IOException;
+
+/**
+ * WhatsApp Binding actions to the interactive message.
+ */
+@Immutable
+public final class WhatsAppUrlActionBindings extends ActionBindings {
+ /*
+ * Kind of the MessageActionBinding.
+ */
+ @Generated
+ private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_URL_ACTION;
+
+ /*
+ * Action content of Interactive message.
+ */
+ @Generated
+ private final LinkContent content;
+
+ /**
+ * Creates an instance of WhatsAppUrlActionBindings class.
+ *
+ * @param content the content value to set.
+ */
+ @Generated
+ public WhatsAppUrlActionBindings(LinkContent content) {
+ this.content = content;
+ }
+
+ /**
+ * Get the kind property: Kind of the MessageActionBinding.
+ *
+ * @return the kind value.
+ */
+ @Generated
+ @Override
+ public MessageActionBindingKind getKind() {
+ return this.kind;
+ }
+
+ /**
+ * Get the content property: Action content of Interactive message.
+ *
+ * @return the content value.
+ */
+ @Generated
+ public LinkContent getContent() {
+ return this.content;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Generated
+ @Override
+ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeJsonField("content", this.content);
+ jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
+ return jsonWriter.writeEndObject();
+ }
+
+ /**
+ * Reads an instance of WhatsAppUrlActionBindings from the JsonReader.
+ *
+ * @param jsonReader The JsonReader being read.
+ * @return An instance of WhatsAppUrlActionBindings if the JsonReader was pointing to an instance of it, or null if
+ * it was pointing to JSON null.
+ * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
+ * @throws IOException If an error occurs while reading the WhatsAppUrlActionBindings.
+ */
+ @Generated
+ public static WhatsAppUrlActionBindings fromJson(JsonReader jsonReader) throws IOException {
+ return jsonReader.readObject(reader -> {
+ LinkContent content = null;
+ MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_URL_ACTION;
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if ("content".equals(fieldName)) {
+ content = LinkContent.fromJson(reader);
+ } else if ("kind".equals(fieldName)) {
+ kind = MessageActionBindingKind.fromString(reader.getString());
+ } else {
+ reader.skipChildren();
+ }
+ }
+ WhatsAppUrlActionBindings deserializedWhatsAppUrlActionBindings = new WhatsAppUrlActionBindings(content);
+ deserializedWhatsAppUrlActionBindings.kind = kind;
+
+ return deserializedWhatsAppUrlActionBindings;
+ });
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
index 47302ac76e22..2e3d0e8156de 100644
--- a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
+++ b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
@@ -17,12 +17,26 @@
"com.azure.communication.messages.NotificationMessagesClient.send": "Azure.Communication.MessagesService.NotificationMessagesClient.send",
"com.azure.communication.messages.NotificationMessagesClient.sendWithResponse": "Azure.Communication.MessagesService.NotificationMessagesClient.send",
"com.azure.communication.messages.NotificationMessagesClientBuilder": "ClientForAcsMessages.NotificationMessagesClient",
+ "com.azure.communication.messages.models.ActionBindings": "Azure.Communication.MessagesService.ActionBindings",
+ "com.azure.communication.messages.models.ActionGroup": "Azure.Communication.MessagesService.ActionGroup",
+ "com.azure.communication.messages.models.ActionGroupContent": "Azure.Communication.MessagesService.ActionGroupContent",
+ "com.azure.communication.messages.models.ActionGroupItem": "Azure.Communication.MessagesService.ActionGroupItem",
"com.azure.communication.messages.models.AudioNotificationContent": "Azure.Communication.MessagesService.AudioNotificationContent",
+ "com.azure.communication.messages.models.ButtonContent": "Azure.Communication.MessagesService.ButtonContent",
+ "com.azure.communication.messages.models.ButtonSetContent": "Azure.Communication.MessagesService.ButtonSetContent",
"com.azure.communication.messages.models.CommunicationMessageKind": "Azure.Communication.MessagesService.CommunicationMessageKind",
"com.azure.communication.messages.models.CommunicationMessagesChannel": "Azure.Communication.MessagesService.CommunicationMessagesChannel",
+ "com.azure.communication.messages.models.DocumentMessageContent": "Azure.Communication.MessagesService.DocumentMessageContent",
"com.azure.communication.messages.models.DocumentNotificationContent": "Azure.Communication.MessagesService.DocumentNotificationContent",
+ "com.azure.communication.messages.models.ImageMessageContent": "Azure.Communication.MessagesService.ImageMessageContent",
"com.azure.communication.messages.models.ImageNotificationContent": "Azure.Communication.MessagesService.ImageNotificationContent",
+ "com.azure.communication.messages.models.InteractiveMessage": "Azure.Communication.MessagesService.InteractiveMessage",
+ "com.azure.communication.messages.models.InteractiveNotificationContent": "Azure.Communication.MessagesService.InteractiveNotificationContent",
+ "com.azure.communication.messages.models.LinkContent": "Azure.Communication.MessagesService.LinkContent",
"com.azure.communication.messages.models.MediaNotificationContent": "Azure.Communication.MessagesService.MediaNotificationContent",
+ "com.azure.communication.messages.models.MessageActionBindingKind": "Azure.Communication.MessagesService.MessageActionBindingKind",
+ "com.azure.communication.messages.models.MessageContent": "Azure.Communication.MessagesService.MessageContent",
+ "com.azure.communication.messages.models.MessageContentKind": "Azure.Communication.MessagesService.MessageContentKind",
"com.azure.communication.messages.models.MessageReceipt": "Azure.Communication.MessagesService.MessageReceipt",
"com.azure.communication.messages.models.MessageTemplate": "Azure.Communication.MessagesService.MessageTemplate",
"com.azure.communication.messages.models.MessageTemplateBindings": "Azure.Communication.MessagesService.MessageTemplateBindings",
@@ -38,14 +52,21 @@
"com.azure.communication.messages.models.MessageTemplateValueKind": "Azure.Communication.MessagesService.MessageTemplateValueKind",
"com.azure.communication.messages.models.MessageTemplateVideo": "Azure.Communication.MessagesService.MessageTemplateVideo",
"com.azure.communication.messages.models.NotificationContent": "Azure.Communication.MessagesService.NotificationContent",
+ "com.azure.communication.messages.models.ReactionNotificationContent": "Azure.Communication.MessagesService.ReactionNotificationContent",
"com.azure.communication.messages.models.SendMessageResult": "Azure.Communication.MessagesService.SendMessageResult",
+ "com.azure.communication.messages.models.StickerNotificationContent": "Azure.Communication.MessagesService.StickerNotificationContent",
"com.azure.communication.messages.models.TemplateNotificationContent": "Azure.Communication.MessagesService.TemplateNotificationContent",
+ "com.azure.communication.messages.models.TextMessageContent": "Azure.Communication.MessagesService.TextMessageContent",
"com.azure.communication.messages.models.TextNotificationContent": "Azure.Communication.MessagesService.TextNotificationContent",
+ "com.azure.communication.messages.models.VideoMessageContent": "Azure.Communication.MessagesService.VideoMessageContent",
"com.azure.communication.messages.models.VideoNotificationContent": "Azure.Communication.MessagesService.VideoNotificationContent",
+ "com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings": "Azure.Communication.MessagesService.WhatsAppButtonActionBindings",
+ "com.azure.communication.messages.models.channels.WhatsAppListActionBindings": "Azure.Communication.MessagesService.WhatsAppListActionBindings",
"com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType": "Azure.Communication.MessagesService.WhatsAppMessageButtonSubType",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent",
- "com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem"
+ "com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem",
+ "com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings": "Azure.Communication.MessagesService.WhatsAppUrlActionBindings"
}
}
diff --git a/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/generated/DownloadMedia.java b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/generated/DownloadMedia.java
new file mode 100644
index 000000000000..489134d13bcb
--- /dev/null
+++ b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/generated/DownloadMedia.java
@@ -0,0 +1,22 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) TypeSpec Code Generator.
+
+package com.azure.communication.messages.generated;
+
+import com.azure.communication.messages.NotificationMessagesClient;
+import com.azure.communication.messages.NotificationMessagesClientBuilder;
+import com.azure.core.util.BinaryData;
+import com.azure.identity.DefaultAzureCredentialBuilder;
+
+public class DownloadMedia {
+ public static void main(String[] args) {
+ NotificationMessagesClient notificationMessagesClient
+ = new NotificationMessagesClientBuilder().credential(new DefaultAzureCredentialBuilder().build())
+ .endpoint("https://my-resource.communication.azure.com")
+ .buildClient();
+ // BEGIN:com.azure.communication.messages.generated.downloadmedia.downloadmedia
+ BinaryData response = notificationMessagesClient.downloadMedia("d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab");
+ // END:com.azure.communication.messages.generated.downloadmedia.downloadmedia
+ }
+}
diff --git a/sdk/communication/azure-communication-messages/tsp-location.yaml b/sdk/communication/azure-communication-messages/tsp-location.yaml
index 277f8c2c5f5a..a426286de933 100644
--- a/sdk/communication/azure-communication-messages/tsp-location.yaml
+++ b/sdk/communication/azure-communication-messages/tsp-location.yaml
@@ -1,4 +1,4 @@
directory: specification/communication/Communication.Messages
-commit: abe3209e7c6924a58ab560ebab2349bc8fde6aa7
+commit: 28b747d09b04748fa0efbe3d6496f1af6613e7e5
repo: Azure/azure-rest-api-specs
-additionalDirectories: null
+additionalDirectories: