diff --git a/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs index 549564b53314..0faee91b1acb 100644 --- a/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs +++ b/sdk/communication/Azure.Communication.Messages/api/Azure.Communication.Messages.netstandard2.0.cs @@ -12,11 +12,12 @@ public partial class AudioNotificationContent : Azure.Communication.Messages.Not } public partial class CommunicationMessagesClientOptions : Azure.Core.ClientOptions { - public CommunicationMessagesClientOptions(Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion version = Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion.V2024_08_30) { } + public CommunicationMessagesClientOptions(Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion version = Azure.Communication.Messages.CommunicationMessagesClientOptions.ServiceVersion.V2024_11_15) { } public enum ServiceVersion { V2024_02_01 = 1, V2024_08_30 = 2, + V2024_11_15 = 3, } } public static partial class CommunicationMessagesModelFactory @@ -35,7 +36,9 @@ public static partial class CommunicationMessagesModelFactory public static Azure.Communication.Messages.MessageTemplateValue MessageTemplateValue(string name = null, string kind = null) { throw null; } public static Azure.Communication.Messages.MessageTemplateVideo MessageTemplateVideo(string name = null, System.Uri uri = null, string caption = null, string fileName = null) { throw null; } public static Azure.Communication.Messages.NotificationContent NotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string kind = null) { throw null; } + public static Azure.Communication.Messages.ReactionNotificationContent ReactionNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string emoji = null, string messageId = null) { throw null; } public static Azure.Communication.Messages.SendMessageResult SendMessageResult(System.Collections.Generic.IEnumerable receipts = null) { throw null; } + public static Azure.Communication.Messages.StickerNotificationContent StickerNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, System.Uri mediaUri = null) { throw null; } public static Azure.Communication.Messages.TemplateNotificationContent TemplateNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, Azure.Communication.Messages.MessageTemplate template = null) { throw null; } public static Azure.Communication.Messages.TextNotificationContent TextNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string content = null) { throw null; } public static Azure.Communication.Messages.VideoNotificationContent VideoNotificationContent(System.Guid channelRegistrationId = default(System.Guid), System.Collections.Generic.IEnumerable to = null, string caption = null, System.Uri mediaUri = null) { throw null; } @@ -267,6 +270,17 @@ public NotificationMessagesClient(System.Uri endpoint, Azure.Core.TokenCredentia public virtual System.Threading.Tasks.Task> SendAsync(Azure.Communication.Messages.NotificationContent notificationContent, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual System.Threading.Tasks.Task SendAsync(Azure.Core.RequestContent content, Azure.RequestContext context = null) { throw null; } } + public partial class ReactionNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public ReactionNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, string emoji, string messageId) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public string Emoji { get { throw null; } } + public string MessageId { get { throw null; } } + Azure.Communication.Messages.ReactionNotificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.Messages.ReactionNotificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class SendMessageResult : System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { internal SendMessageResult() { } @@ -277,6 +291,16 @@ internal SendMessageResult() { } string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } } + public partial class StickerNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel + { + public StickerNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, System.Uri mediaUri) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } + public System.Uri MediaUri { get { throw null; } } + Azure.Communication.Messages.StickerNotificationContent System.ClientModel.Primitives.IJsonModel.Create(ref System.Text.Json.Utf8JsonReader reader, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + void System.ClientModel.Primitives.IJsonModel.Write(System.Text.Json.Utf8JsonWriter writer, System.ClientModel.Primitives.ModelReaderWriterOptions options) { } + Azure.Communication.Messages.StickerNotificationContent System.ClientModel.Primitives.IPersistableModel.Create(System.BinaryData data, System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + string System.ClientModel.Primitives.IPersistableModel.GetFormatFromOptions(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + System.BinaryData System.ClientModel.Primitives.IPersistableModel.Write(System.ClientModel.Primitives.ModelReaderWriterOptions options) { throw null; } + } public partial class TemplateNotificationContent : Azure.Communication.Messages.NotificationContent, System.ClientModel.Primitives.IJsonModel, System.ClientModel.Primitives.IPersistableModel { public TemplateNotificationContent(System.Guid channelRegistrationId, System.Collections.Generic.IEnumerable to, Azure.Communication.Messages.MessageTemplate template) : base (default(System.Guid), default(System.Collections.Generic.IEnumerable)) { } diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs index 6183b42f3e9f..6f91688d2dea 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessageKind.cs @@ -28,6 +28,8 @@ public CommunicationMessageKind(string value) private const string DocumentValue = "document"; private const string VideoValue = "video"; private const string AudioValue = "audio"; + private const string StickerValue = "sticker"; + private const string ReactionValue = "reaction"; private const string TemplateValue = "template"; /// Text message type. @@ -42,6 +44,10 @@ public CommunicationMessageKind(string value) public static CommunicationMessageKind Video { get; } = new CommunicationMessageKind(VideoValue); /// Audio message type. public static CommunicationMessageKind Audio { get; } = new CommunicationMessageKind(AudioValue); + /// Sticker message type. + public static CommunicationMessageKind Sticker { get; } = new CommunicationMessageKind(StickerValue); + /// Reaction message type. + public static CommunicationMessageKind Reaction { get; } = new CommunicationMessageKind(ReactionValue); /// Template message type. public static CommunicationMessageKind Template { get; } = new CommunicationMessageKind(TemplateValue); /// Determines if two values are the same. diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs index 58b29e477642..bee5eb00152c 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesClientOptions.cs @@ -13,7 +13,7 @@ namespace Azure.Communication.Messages /// Client options for Azure.Communication.Messages library clients. public partial class CommunicationMessagesClientOptions : ClientOptions { - private const ServiceVersion LatestVersion = ServiceVersion.V2024_08_30; + private const ServiceVersion LatestVersion = ServiceVersion.V2024_11_15; /// The version of the service to use. public enum ServiceVersion @@ -22,6 +22,8 @@ public enum ServiceVersion V2024_02_01 = 1, /// Service version "2024-08-30". V2024_08_30 = 2, + /// Service version "2024-11-15". + V2024_11_15 = 3, } internal string Version { get; } @@ -33,6 +35,7 @@ public CommunicationMessagesClientOptions(ServiceVersion version = LatestVersion { ServiceVersion.V2024_02_01 => "2024-02-01", ServiceVersion.V2024_08_30 => "2024-08-30", + ServiceVersion.V2024_11_15 => "2024-11-15", _ => throw new NotSupportedException() }; } diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs index 8d1a11241d35..ce0294b623b1 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/CommunicationMessagesModelFactory.cs @@ -110,6 +110,37 @@ public static AudioNotificationContent AudioNotificationContent(Guid channelRegi return new AudioNotificationContent(channelRegistrationId, to?.ToList(), CommunicationMessageKind.Audio, serializedAdditionalRawData: null, mediaUri); } + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// emoji content like \uD83D\uDE00. + /// ID of the previous message you want to reply to. + /// A new instance for mocking. + public static ReactionNotificationContent ReactionNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, string emoji = null, string messageId = null) + { + to ??= new List(); + + return new ReactionNotificationContent( + channelRegistrationId, + to?.ToList(), + CommunicationMessageKind.Reaction, + serializedAdditionalRawData: null, + emoji, + messageId); + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// A new instance for mocking. + public static StickerNotificationContent StickerNotificationContent(Guid channelRegistrationId = default, IEnumerable to = null, Uri mediaUri = null) + { + to ??= new List(); + + return new StickerNotificationContent(channelRegistrationId, to?.ToList(), CommunicationMessageKind.Sticker, serializedAdditionalRawData: null, mediaUri); + } + /// Initializes a new instance of . /// The Channel Registration ID for the Business Identifier. /// The native external platform user identifiers of the recipient. diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs index 68f1f22e3469..c3ea9d99682c 100644 --- a/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/NotificationContent.cs @@ -14,7 +14,7 @@ namespace Azure.Communication.Messages /// /// Details of the message to send. /// Please note is the base class. According to the scenario, a derived class of the base class might need to be assigned here, or this property needs to be casted to one of the possible derived classes. - /// The available derived classes include , , , , , and . + /// The available derived classes include , , , , , , , and . /// public abstract partial class NotificationContent { diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.Serialization.cs new file mode 100644 index 000000000000..3e2022618b74 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.Serialization.cs @@ -0,0 +1,183 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class ReactionNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReactionNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("emoji"u8); + writer.WriteStringValue(Emoji); + writer.WritePropertyName("messageId"u8); + writer.WriteStringValue(MessageId); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + ReactionNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(ReactionNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeReactionNotificationContent(document.RootElement, options); + } + + internal static ReactionNotificationContent DeserializeReactionNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + string emoji = default; + string messageId = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("emoji"u8)) + { + emoji = property.Value.GetString(); + continue; + } + if (property.NameEquals("messageId"u8)) + { + messageId = property.Value.GetString(); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new ReactionNotificationContent( + channelRegistrationId, + to, + kind, + serializedAdditionalRawData, + emoji, + messageId); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(ReactionNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + ReactionNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeReactionNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(ReactionNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new ReactionNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeReactionNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.cs new file mode 100644 index 000000000000..a06858477fbe --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/ReactionNotificationContent.cs @@ -0,0 +1,56 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send a Reaction notification. + public partial class ReactionNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// emoji content like \uD83D\uDE00. + /// ID of the previous message you want to reply to. + /// , or is null. + public ReactionNotificationContent(Guid channelRegistrationId, IEnumerable to, string emoji, string messageId) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(emoji, nameof(emoji)); + Argument.AssertNotNull(messageId, nameof(messageId)); + + Kind = CommunicationMessageKind.Reaction; + Emoji = emoji; + MessageId = messageId; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// emoji content like \uD83D\uDE00. + /// ID of the previous message you want to reply to. + internal ReactionNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, string emoji, string messageId) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + Emoji = emoji; + MessageId = messageId; + } + + /// Initializes a new instance of for deserialization. + internal ReactionNotificationContent() + { + } + + /// emoji content like \uD83D\uDE00. + public string Emoji { get; } + /// ID of the previous message you want to reply to. + public string MessageId { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.Serialization.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.Serialization.cs new file mode 100644 index 000000000000..d151f727da5b --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.Serialization.cs @@ -0,0 +1,169 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.ClientModel.Primitives; +using System.Collections.Generic; +using System.Text.Json; +using Azure.Core; + +namespace Azure.Communication.Messages +{ + public partial class StickerNotificationContent : IUtf8JsonSerializable, IJsonModel + { + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IJsonModel)this).Write(writer, ModelSerializationExtensions.WireOptions); + + void IJsonModel.Write(Utf8JsonWriter writer, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StickerNotificationContent)} does not support writing '{format}' format."); + } + + writer.WriteStartObject(); + writer.WritePropertyName("mediaUri"u8); + writer.WriteStringValue(MediaUri.AbsoluteUri); + writer.WritePropertyName("channelRegistrationId"u8); + writer.WriteStringValue(ChannelRegistrationId); + writer.WritePropertyName("to"u8); + writer.WriteStartArray(); + foreach (var item in To) + { + writer.WriteStringValue(item); + } + writer.WriteEndArray(); + writer.WritePropertyName("kind"u8); + writer.WriteStringValue(Kind.ToString()); + if (options.Format != "W" && _serializedAdditionalRawData != null) + { + foreach (var item in _serializedAdditionalRawData) + { + writer.WritePropertyName(item.Key); +#if NET6_0_OR_GREATER + writer.WriteRawValue(item.Value); +#else + using (JsonDocument document = JsonDocument.Parse(item.Value)) + { + JsonSerializer.Serialize(writer, document.RootElement); + } +#endif + } + } + writer.WriteEndObject(); + } + + StickerNotificationContent IJsonModel.Create(ref Utf8JsonReader reader, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + if (format != "J") + { + throw new FormatException($"The model {nameof(StickerNotificationContent)} does not support reading '{format}' format."); + } + + using JsonDocument document = JsonDocument.ParseValue(ref reader); + return DeserializeStickerNotificationContent(document.RootElement, options); + } + + internal static StickerNotificationContent DeserializeStickerNotificationContent(JsonElement element, ModelReaderWriterOptions options = null) + { + options ??= ModelSerializationExtensions.WireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Uri mediaUri = default; + Guid channelRegistrationId = default; + IList to = default; + CommunicationMessageKind kind = default; + IDictionary serializedAdditionalRawData = default; + Dictionary rawDataDictionary = new Dictionary(); + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("mediaUri"u8)) + { + mediaUri = new Uri(property.Value.GetString()); + continue; + } + if (property.NameEquals("channelRegistrationId"u8)) + { + channelRegistrationId = property.Value.GetGuid(); + continue; + } + if (property.NameEquals("to"u8)) + { + List array = new List(); + foreach (var item in property.Value.EnumerateArray()) + { + array.Add(item.GetString()); + } + to = array; + continue; + } + if (property.NameEquals("kind"u8)) + { + kind = new CommunicationMessageKind(property.Value.GetString()); + continue; + } + if (options.Format != "W") + { + rawDataDictionary.Add(property.Name, BinaryData.FromString(property.Value.GetRawText())); + } + } + serializedAdditionalRawData = rawDataDictionary; + return new StickerNotificationContent(channelRegistrationId, to, kind, serializedAdditionalRawData, mediaUri); + } + + BinaryData IPersistableModel.Write(ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + return ModelReaderWriter.Write(this, options); + default: + throw new FormatException($"The model {nameof(StickerNotificationContent)} does not support writing '{options.Format}' format."); + } + } + + StickerNotificationContent IPersistableModel.Create(BinaryData data, ModelReaderWriterOptions options) + { + var format = options.Format == "W" ? ((IPersistableModel)this).GetFormatFromOptions(options) : options.Format; + + switch (format) + { + case "J": + { + using JsonDocument document = JsonDocument.Parse(data); + return DeserializeStickerNotificationContent(document.RootElement, options); + } + default: + throw new FormatException($"The model {nameof(StickerNotificationContent)} does not support reading '{options.Format}' format."); + } + } + + string IPersistableModel.GetFormatFromOptions(ModelReaderWriterOptions options) => "J"; + + /// Deserializes the model from a raw response. + /// The response to deserialize the model from. + internal static new StickerNotificationContent FromResponse(Response response) + { + using var document = JsonDocument.Parse(response.Content); + return DeserializeStickerNotificationContent(document.RootElement); + } + + /// Convert into a . + internal override RequestContent ToRequestContent() + { + var content = new Utf8JsonRequestContent(); + content.JsonWriter.WriteObjectValue(this, ModelSerializationExtensions.WireOptions); + return content; + } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.cs b/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.cs new file mode 100644 index 000000000000..b90c6584db92 --- /dev/null +++ b/sdk/communication/Azure.Communication.Messages/src/Generated/StickerNotificationContent.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +// + +#nullable disable + +using System; +using System.Collections.Generic; + +namespace Azure.Communication.Messages +{ + /// A request to send a Sticker notification. + public partial class StickerNotificationContent : NotificationContent + { + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + /// or is null. + public StickerNotificationContent(Guid channelRegistrationId, IEnumerable to, Uri mediaUri) : base(channelRegistrationId, to) + { + Argument.AssertNotNull(to, nameof(to)); + Argument.AssertNotNull(mediaUri, nameof(mediaUri)); + + Kind = CommunicationMessageKind.Sticker; + MediaUri = mediaUri; + } + + /// Initializes a new instance of . + /// The Channel Registration ID for the Business Identifier. + /// The native external platform user identifiers of the recipient. + /// The type discriminator describing a notification type. + /// Keeps track of any properties unknown to the library. + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + internal StickerNotificationContent(Guid channelRegistrationId, IList to, CommunicationMessageKind kind, IDictionary serializedAdditionalRawData, Uri mediaUri) : base(channelRegistrationId, to, kind, serializedAdditionalRawData) + { + MediaUri = mediaUri; + } + + /// Initializes a new instance of for deserialization. + internal StickerNotificationContent() + { + } + + /// A media url for the file. Required if the type is one of the supported media types, e.g. image. + public Uri MediaUri { get; } + } +} diff --git a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml index 9c9e66f49dcd..2b2a96b822d3 100644 --- a/sdk/communication/Azure.Communication.Messages/tsp-location.yaml +++ b/sdk/communication/Azure.Communication.Messages/tsp-location.yaml @@ -1,4 +1,4 @@ -commit: abe3209e7c6924a58ab560ebab2349bc8fde6aa7 directory: specification/communication/Communication.Messages -additionalDirectories: [] +commit: 204bba747a7337d525327421e762b3099c266056 repo: Azure/azure-rest-api-specs +additionalDirectories: diff --git a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json index b8adc70f64df..e8e12a0dd368 100644 --- a/sdk/communication/Azure.Communication.Messages/tspCodeModel.json +++ b/sdk/communication/Azure.Communication.Messages/tspCodeModel.json @@ -3,7 +3,8 @@ "Name": "Azure.Communication.MessagesService", "ApiVersions": [ "2024-02-01", - "2024-08-30" + "2024-08-30", + "2024-11-15" ], "Enums": [ { @@ -130,10 +131,46 @@ { "$id": "16", "kind": "enumvalue", + "name": "sticker", + "value": "sticker", + "valueType": { + "$id": "17", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Sticker message type.", + "decorators": [] + }, + { + "$id": "18", + "kind": "enumvalue", + "name": "reaction", + "value": "reaction", + "valueType": { + "$id": "19", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "2" + }, + "description": "Reaction message type.", + "decorators": [] + }, + { + "$id": "20", + "kind": "enumvalue", "name": "template", "value": "template", "valueType": { - "$id": "17", + "$id": "21", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -153,12 +190,12 @@ "decorators": [] }, { - "$id": "18", + "$id": "22", "kind": "enum", "name": "MessageTemplateValueKind", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValueKind", "valueType": { - "$id": "19", + "$id": "23", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -166,109 +203,109 @@ }, "values": [ { - "$id": "20", + "$id": "24", "kind": "enumvalue", "name": "text", "value": "text", "valueType": { - "$id": "21", + "$id": "25", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The text template parameter type.", "decorators": [] }, { - "$id": "22", + "$id": "26", "kind": "enumvalue", "name": "image", "value": "image", "valueType": { - "$id": "23", + "$id": "27", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The image template parameter type.", "decorators": [] }, { - "$id": "24", + "$id": "28", "kind": "enumvalue", "name": "document", "value": "document", "valueType": { - "$id": "25", + "$id": "29", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The document template parameter type.", "decorators": [] }, { - "$id": "26", + "$id": "30", "kind": "enumvalue", "name": "video", "value": "video", "valueType": { - "$id": "27", + "$id": "31", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The video template parameter type.", "decorators": [] }, { - "$id": "28", + "$id": "32", "kind": "enumvalue", "name": "location", "value": "location", "valueType": { - "$id": "29", + "$id": "33", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The location template parameter type.", "decorators": [] }, { - "$id": "30", + "$id": "34", "kind": "enumvalue", "name": "quickAction", "value": "quickAction", "valueType": { - "$id": "31", + "$id": "35", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "18" + "$ref": "22" }, "description": "The quick action template parameter type.", "decorators": [] @@ -281,12 +318,12 @@ "decorators": [] }, { - "$id": "32", + "$id": "36", "kind": "enum", "name": "MessageTemplateBindingsKind", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindingsKind", "valueType": { - "$id": "33", + "$id": "37", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -294,19 +331,19 @@ }, "values": [ { - "$id": "34", + "$id": "38", "kind": "enumvalue", "name": "whatsApp", "value": "whatsApp", "valueType": { - "$id": "35", + "$id": "39", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "32" + "$ref": "36" }, "description": "The WhatsApp template type.", "decorators": [] @@ -319,12 +356,12 @@ "decorators": [] }, { - "$id": "36", + "$id": "40", "kind": "enum", "name": "WhatsAppMessageButtonSubType", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageButtonSubType", "valueType": { - "$id": "37", + "$id": "41", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -332,37 +369,37 @@ }, "values": [ { - "$id": "38", + "$id": "42", "kind": "enumvalue", "name": "quickReply", "value": "quickReply", "valueType": { - "$id": "39", + "$id": "43", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "36" + "$ref": "40" }, "description": "The WhatsApp button sub type is quick reply.", "decorators": [] }, { - "$id": "40", + "$id": "44", "kind": "enumvalue", "name": "url", "value": "url", "valueType": { - "$id": "41", + "$id": "45", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "36" + "$ref": "40" }, "description": "The WhatsApp button sub type is url.", "decorators": [] @@ -375,12 +412,12 @@ "decorators": [] }, { - "$id": "42", + "$id": "46", "kind": "enum", "name": "Versions", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.Versions", "valueType": { - "$id": "43", + "$id": "47", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -388,40 +425,58 @@ }, "values": [ { - "$id": "44", + "$id": "48", "kind": "enumvalue", "name": "c2024_02_01", "value": "2024-02-01", "valueType": { - "$id": "45", + "$id": "49", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "42" + "$ref": "46" }, "description": "Azure Communication Messages 2024-02-01 api version", "decorators": [] }, { - "$id": "46", + "$id": "50", "kind": "enumvalue", "name": "c2024_08_30", "value": "2024-08-30", "valueType": { - "$id": "47", + "$id": "51", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "42" + "$ref": "46" }, "description": "Azure Communication Messages 2024-08-30 api version", "decorators": [] + }, + { + "$id": "52", + "kind": "enumvalue", + "name": "c2024_11_15", + "value": "2024-11-15", + "valueType": { + "$id": "53", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "enumType": { + "$ref": "46" + }, + "description": "Azure Communication Messages 2024-11-15 api version", + "decorators": [] } ], "description": "Azure Communication Messages Versions", @@ -431,12 +486,12 @@ "decorators": [] }, { - "$id": "48", + "$id": "54", "kind": "enum", "name": "MessageTemplateStatus", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateStatus", "valueType": { - "$id": "49", + "$id": "55", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -444,73 +499,73 @@ }, "values": [ { - "$id": "50", + "$id": "56", "kind": "enumvalue", "name": "approved", "value": "approved", "valueType": { - "$id": "51", + "$id": "57", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "48" + "$ref": "54" }, "description": "Message template is approved.", "decorators": [] }, { - "$id": "52", + "$id": "58", "kind": "enumvalue", "name": "rejected", "value": "rejected", "valueType": { - "$id": "53", + "$id": "59", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "48" + "$ref": "54" }, "description": "Message template is rejected.", "decorators": [] }, { - "$id": "54", + "$id": "60", "kind": "enumvalue", "name": "pending", "value": "pending", "valueType": { - "$id": "55", + "$id": "61", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "48" + "$ref": "54" }, "description": "Message template is pending.", "decorators": [] }, { - "$id": "56", + "$id": "62", "kind": "enumvalue", "name": "paused", "value": "paused", "valueType": { - "$id": "57", + "$id": "63", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "48" + "$ref": "54" }, "description": "Message template is paused.", "decorators": [] @@ -523,12 +578,12 @@ "decorators": [] }, { - "$id": "58", + "$id": "64", "kind": "enum", "name": "CommunicationMessagesChannel", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.CommunicationMessagesChannel", "valueType": { - "$id": "59", + "$id": "65", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -536,19 +591,19 @@ }, "values": [ { - "$id": "60", + "$id": "66", "kind": "enumvalue", "name": "whatsApp", "value": "whatsApp", "valueType": { - "$id": "61", + "$id": "67", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "58" + "$ref": "64" }, "description": "The WhatsApp communication messages channel type.", "decorators": [] @@ -561,12 +616,12 @@ "decorators": [] }, { - "$id": "62", + "$id": "68", "kind": "enum", "name": "RepeatabilityResult", "crossLanguageDefinitionId": "Azure.Core.RepeatabilityResult", "valueType": { - "$id": "63", + "$id": "69", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -574,37 +629,37 @@ }, "values": [ { - "$id": "64", + "$id": "70", "kind": "enumvalue", "name": "accepted", "value": "accepted", "valueType": { - "$id": "65", + "$id": "71", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "62" + "$ref": "68" }, "description": "If the request was accepted and the server guarantees that the server state reflects a single execution of the operation.", "decorators": [] }, { - "$id": "66", + "$id": "72", "kind": "enumvalue", "name": "rejected", "value": "rejected", "valueType": { - "$id": "67", + "$id": "73", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", "decorators": [] }, "enumType": { - "$ref": "62" + "$ref": "68" }, "description": "If the request was rejected because the combination of Repeatability-First-Sent and Repeatability-Request-ID were invalid\nor because the Repeatability-First-Sent value was outside the range of values held by the server.", "decorators": [] @@ -619,7 +674,7 @@ ], "Models": [ { - "$id": "68", + "$id": "74", "kind": "model", "name": "NotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent", @@ -627,7 +682,7 @@ "description": "Details of the message to send.", "decorators": [], "discriminatorProperty": { - "$id": "69", + "$id": "75", "kind": "property", "name": "kind", "serializedName": "kind", @@ -644,18 +699,18 @@ }, "properties": [ { - "$id": "70", + "$id": "76", "kind": "property", "name": "channelRegistrationId", "serializedName": "channelRegistrationId", "description": "The Channel Registration ID for the Business Identifier.", "type": { - "$id": "71", + "$id": "77", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "72", + "$id": "78", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -671,17 +726,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.channelRegistrationId" }, { - "$id": "73", + "$id": "79", "kind": "property", "name": "to", "serializedName": "to", "description": "The native external platform user identifiers of the recipient.", "type": { - "$id": "74", + "$id": "80", "kind": "array", "name": "Array", "valueType": { - "$id": "75", + "$id": "81", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -698,13 +753,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.NotificationContent.to" }, { - "$ref": "69" + "$ref": "75" } ], "discriminatedSubtypes": { - "$id": "76", + "$id": "82", "text": { - "$id": "77", + "$id": "83", "kind": "model", "name": "TextNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent", @@ -713,20 +768,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "78", + "$id": "84", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is text.", "type": { - "$id": "79", + "$id": "85", "kind": "constant", "valueType": { - "$id": "80", + "$id": "86", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -743,13 +798,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TextNotificationContent.kind" }, { - "$id": "81", + "$id": "87", "kind": "property", "name": "content", "serializedName": "content", "description": "Message content.", "type": { - "$id": "82", + "$id": "88", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -765,7 +820,7 @@ ] }, "image_v0": { - "$id": "83", + "$id": "89", "kind": "model", "name": "MediaNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent", @@ -775,20 +830,20 @@ "discriminatorValue": "image_v0", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "84", + "$id": "90", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is image.", "type": { - "$id": "85", + "$id": "91", "kind": "constant", "valueType": { - "$id": "86", + "$id": "92", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -805,13 +860,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.kind" }, { - "$id": "87", + "$id": "93", "kind": "property", "name": "content", "serializedName": "content", "description": "Optional text content.", "type": { - "$id": "88", + "$id": "94", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -825,13 +880,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MediaNotificationContent.content" }, { - "$id": "89", + "$id": "95", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "90", + "$id": "96", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -847,7 +902,7 @@ ] }, "image": { - "$id": "91", + "$id": "97", "kind": "model", "name": "ImageNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent", @@ -856,20 +911,20 @@ "discriminatorValue": "image", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "92", + "$id": "98", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is image.", "type": { - "$id": "93", + "$id": "99", "kind": "constant", "valueType": { - "$id": "94", + "$id": "100", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -886,13 +941,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent.kind" }, { - "$id": "95", + "$id": "101", "kind": "property", "name": "caption", "serializedName": "caption", "description": "Optional text content.", "type": { - "$id": "96", + "$id": "102", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -906,13 +961,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ImageNotificationContent.caption" }, { - "$id": "97", + "$id": "103", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "98", + "$id": "104", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -928,7 +983,7 @@ ] }, "document": { - "$id": "99", + "$id": "105", "kind": "model", "name": "DocumentNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent", @@ -937,20 +992,20 @@ "discriminatorValue": "document", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "100", + "$id": "106", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is image.", "type": { - "$id": "101", + "$id": "107", "kind": "constant", "valueType": { - "$id": "102", + "$id": "108", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -967,13 +1022,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.kind" }, { - "$id": "103", + "$id": "109", "kind": "property", "name": "caption", "serializedName": "caption", "description": "Optional text content.", "type": { - "$id": "104", + "$id": "110", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -987,13 +1042,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.caption" }, { - "$id": "105", + "$id": "111", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "Optional name for the file.", "type": { - "$id": "106", + "$id": "112", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1007,13 +1062,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.DocumentNotificationContent.fileName" }, { - "$id": "107", + "$id": "113", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "108", + "$id": "114", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1029,7 +1084,7 @@ ] }, "video": { - "$id": "109", + "$id": "115", "kind": "model", "name": "VideoNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent", @@ -1038,20 +1093,20 @@ "discriminatorValue": "video", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "110", + "$id": "116", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is image.", "type": { - "$id": "111", + "$id": "117", "kind": "constant", "valueType": { - "$id": "112", + "$id": "118", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1068,13 +1123,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent.kind" }, { - "$id": "113", + "$id": "119", "kind": "property", "name": "caption", "serializedName": "caption", "description": "Optional text content.", "type": { - "$id": "114", + "$id": "120", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1088,13 +1143,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.VideoNotificationContent.caption" }, { - "$id": "115", + "$id": "121", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "116", + "$id": "122", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1110,7 +1165,7 @@ ] }, "audio": { - "$id": "117", + "$id": "123", "kind": "model", "name": "AudioNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.AudioNotificationContent", @@ -1119,20 +1174,20 @@ "discriminatorValue": "audio", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "118", + "$id": "124", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is audio.", "type": { - "$id": "119", + "$id": "125", "kind": "constant", "valueType": { - "$id": "120", + "$id": "126", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1149,13 +1204,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.AudioNotificationContent.kind" }, { - "$id": "121", + "$id": "127", "kind": "property", "name": "mediaUri", "serializedName": "mediaUri", "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", "type": { - "$id": "122", + "$id": "128", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1170,8 +1225,150 @@ } ] }, + "reaction": { + "$id": "129", + "kind": "model", + "name": "ReactionNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ReactionNotificationContent", + "usage": "Input,Json", + "description": "A request to send a Reaction notification.", + "discriminatorValue": "reaction", + "decorators": [], + "baseModel": { + "$ref": "74" + }, + "properties": [ + { + "$id": "130", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is reaction.", + "type": { + "$id": "131", + "kind": "constant", + "valueType": { + "$id": "132", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "reaction", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ReactionNotificationContent.kind" + }, + { + "$id": "133", + "kind": "property", + "name": "emoji", + "serializedName": "emoji", + "description": "emoji content like \\uD83D\\uDE00.", + "type": { + "$id": "134", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ReactionNotificationContent.emoji" + }, + { + "$id": "135", + "kind": "property", + "name": "messageId", + "serializedName": "messageId", + "description": "ID of the previous message you want to reply to.", + "type": { + "$id": "136", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.ReactionNotificationContent.messageId" + } + ] + }, + "sticker": { + "$id": "137", + "kind": "model", + "name": "StickerNotificationContent", + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.StickerNotificationContent", + "usage": "Input,Json", + "description": "A request to send a Sticker notification.", + "discriminatorValue": "sticker", + "decorators": [], + "baseModel": { + "$ref": "74" + }, + "properties": [ + { + "$id": "138", + "kind": "property", + "name": "kind", + "serializedName": "kind", + "description": "Message notification type is sticker.", + "type": { + "$id": "139", + "kind": "constant", + "valueType": { + "$id": "140", + "kind": "string", + "name": "string", + "crossLanguageDefinitionId": "TypeSpec.string", + "decorators": [] + }, + "value": "sticker", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": true, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.StickerNotificationContent.kind" + }, + { + "$id": "141", + "kind": "property", + "name": "mediaUri", + "serializedName": "mediaUri", + "description": "A media url for the file. Required if the type is one of the supported media types, e.g. image", + "type": { + "$id": "142", + "kind": "url", + "name": "url", + "crossLanguageDefinitionId": "TypeSpec.url", + "decorators": [] + }, + "optional": false, + "readOnly": false, + "discriminator": false, + "flatten": false, + "decorators": [], + "crossLanguageDefinitionId": "Azure.Communication.MessagesService.StickerNotificationContent.mediaUri" + } + ] + }, "template": { - "$id": "123", + "$id": "143", "kind": "model", "name": "TemplateNotificationContent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent", @@ -1180,20 +1377,20 @@ "discriminatorValue": "template", "decorators": [], "baseModel": { - "$ref": "68" + "$ref": "74" }, "properties": [ { - "$id": "124", + "$id": "144", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message notification type is template.", "type": { - "$id": "125", + "$id": "145", "kind": "constant", "valueType": { - "$id": "126", + "$id": "146", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1210,13 +1407,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.TemplateNotificationContent.kind" }, { - "$id": "127", + "$id": "147", "kind": "property", "name": "template", "serializedName": "template", "description": "The template object used to create templates.", "type": { - "$id": "128", + "$id": "148", "kind": "model", "name": "MessageTemplate", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate", @@ -1225,13 +1422,13 @@ "decorators": [], "properties": [ { - "$id": "129", + "$id": "149", "kind": "property", "name": "name", "serializedName": "name", "description": "Name of the template.", "type": { - "$id": "130", + "$id": "150", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1245,13 +1442,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.name" }, { - "$id": "131", + "$id": "151", "kind": "property", "name": "language", "serializedName": "language", "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.", "type": { - "$id": "132", + "$id": "152", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1265,17 +1462,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.language" }, { - "$id": "133", + "$id": "153", "kind": "property", "name": "values", "serializedName": "values", "description": "The template values.", "type": { - "$id": "134", + "$id": "154", "kind": "array", "name": "ArrayMessageTemplateValue", "valueType": { - "$id": "135", + "$id": "155", "kind": "model", "name": "MessageTemplateValue", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue", @@ -1283,13 +1480,13 @@ "description": "The class describes a parameter of a template.", "decorators": [], "discriminatorProperty": { - "$id": "136", + "$id": "156", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template parameter type.", "type": { - "$ref": "18" + "$ref": "22" }, "optional": false, "readOnly": false, @@ -1300,13 +1497,13 @@ }, "properties": [ { - "$id": "137", + "$id": "157", "kind": "property", "name": "name", "serializedName": "name", "description": "Template binding reference name", "type": { - "$id": "138", + "$id": "158", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1320,13 +1517,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateValue.name" }, { - "$ref": "136" + "$ref": "156" } ], "discriminatedSubtypes": { - "$id": "139", + "$id": "159", "text": { - "$id": "140", + "$id": "160", "kind": "model", "name": "MessageTemplateText", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText", @@ -1335,20 +1532,20 @@ "discriminatorValue": "text", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "141", + "$id": "161", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is text.", "type": { - "$id": "142", + "$id": "162", "kind": "constant", "valueType": { - "$id": "143", + "$id": "163", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1365,13 +1562,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateText.kind" }, { - "$id": "144", + "$id": "164", "kind": "property", "name": "text", "serializedName": "text", "description": "The text value.", "type": { - "$id": "145", + "$id": "165", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1387,7 +1584,7 @@ ] }, "image": { - "$id": "146", + "$id": "166", "kind": "model", "name": "MessageTemplateImage", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage", @@ -1396,20 +1593,20 @@ "discriminatorValue": "image", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "147", + "$id": "167", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is image.", "type": { - "$id": "148", + "$id": "168", "kind": "constant", "valueType": { - "$id": "149", + "$id": "169", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1426,13 +1623,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.kind" }, { - "$id": "150", + "$id": "170", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "151", + "$id": "171", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1446,13 +1643,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.url" }, { - "$id": "152", + "$id": "172", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "153", + "$id": "173", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1466,13 +1663,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateImage.caption" }, { - "$id": "154", + "$id": "174", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "155", + "$id": "175", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1488,7 +1685,7 @@ ] }, "document": { - "$id": "156", + "$id": "176", "kind": "model", "name": "MessageTemplateDocument", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument", @@ -1497,20 +1694,20 @@ "discriminatorValue": "document", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "157", + "$id": "177", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is document.", "type": { - "$id": "158", + "$id": "178", "kind": "constant", "valueType": { - "$id": "159", + "$id": "179", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1527,13 +1724,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.kind" }, { - "$id": "160", + "$id": "180", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "161", + "$id": "181", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1547,13 +1744,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.url" }, { - "$id": "162", + "$id": "182", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "163", + "$id": "183", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1567,13 +1764,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateDocument.caption" }, { - "$id": "164", + "$id": "184", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "165", + "$id": "185", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1589,7 +1786,7 @@ ] }, "video": { - "$id": "166", + "$id": "186", "kind": "model", "name": "MessageTemplateVideo", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo", @@ -1598,20 +1795,20 @@ "discriminatorValue": "video", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "167", + "$id": "187", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is video.", "type": { - "$id": "168", + "$id": "188", "kind": "constant", "valueType": { - "$id": "169", + "$id": "189", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1628,13 +1825,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.kind" }, { - "$id": "170", + "$id": "190", "kind": "property", "name": "uri", "serializedName": "url", "description": "The (public) URL of the media.", "type": { - "$id": "171", + "$id": "191", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -1648,13 +1845,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.url" }, { - "$id": "172", + "$id": "192", "kind": "property", "name": "caption", "serializedName": "caption", "description": "The [optional] caption of the media object.", "type": { - "$id": "173", + "$id": "193", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1668,13 +1865,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateVideo.caption" }, { - "$id": "174", + "$id": "194", "kind": "property", "name": "fileName", "serializedName": "fileName", "description": "The [optional] filename of the media file.", "type": { - "$id": "175", + "$id": "195", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1690,7 +1887,7 @@ ] }, "location": { - "$id": "176", + "$id": "196", "kind": "model", "name": "MessageTemplateLocation", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation", @@ -1699,20 +1896,20 @@ "discriminatorValue": "location", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "177", + "$id": "197", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is location.", "type": { - "$id": "178", + "$id": "198", "kind": "constant", "valueType": { - "$id": "179", + "$id": "199", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1729,13 +1926,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.kind" }, { - "$id": "180", + "$id": "200", "kind": "property", "name": "locationName", "serializedName": "locationName", "description": "The [Optional] name of the location.", "type": { - "$id": "181", + "$id": "201", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1749,13 +1946,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.locationName" }, { - "$id": "182", + "$id": "202", "kind": "property", "name": "address", "serializedName": "address", "description": "The [Optional] address of the location.", "type": { - "$id": "183", + "$id": "203", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1769,13 +1966,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.address" }, { - "$id": "184", + "$id": "204", "kind": "property", "name": "latitude", "serializedName": "latitude", "description": "The latitude of the location.", "type": { - "$id": "185", + "$id": "205", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1789,13 +1986,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateLocation.latitude" }, { - "$id": "186", + "$id": "206", "kind": "property", "name": "longitude", "serializedName": "longitude", "description": "The longitude of the location.", "type": { - "$id": "187", + "$id": "207", "kind": "float64", "name": "float64", "crossLanguageDefinitionId": "TypeSpec.float64", @@ -1811,7 +2008,7 @@ ] }, "quickAction": { - "$id": "188", + "$id": "208", "kind": "model", "name": "MessageTemplateQuickAction", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction", @@ -1820,20 +2017,20 @@ "discriminatorValue": "quickAction", "decorators": [], "baseModel": { - "$ref": "135" + "$ref": "155" }, "properties": [ { - "$id": "189", + "$id": "209", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message parameter type is quick action.", "type": { - "$id": "190", + "$id": "210", "kind": "constant", "valueType": { - "$id": "191", + "$id": "211", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1850,13 +2047,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.kind" }, { - "$id": "192", + "$id": "212", "kind": "property", "name": "text", "serializedName": "text", "description": "The [Optional] quick action text", "type": { - "$id": "193", + "$id": "213", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1870,13 +2067,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateQuickAction.text" }, { - "$id": "194", + "$id": "214", "kind": "property", "name": "payload", "serializedName": "payload", "description": "The [Optional] quick action payload", "type": { - "$id": "195", + "$id": "215", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1904,13 +2101,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplate.values" }, { - "$id": "196", + "$id": "216", "kind": "property", "name": "bindings", "serializedName": "bindings", "description": "The binding object to link values to the template specific locations", "type": { - "$id": "197", + "$id": "217", "kind": "model", "name": "MessageTemplateBindings", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateBindings", @@ -1918,13 +2115,13 @@ "description": "The binding object to link values to the template specific locations", "decorators": [], "discriminatorProperty": { - "$id": "198", + "$id": "218", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template bindings type.", "type": { - "$ref": "32" + "$ref": "36" }, "optional": false, "readOnly": false, @@ -1935,13 +2132,13 @@ }, "properties": [ { - "$ref": "198" + "$ref": "218" } ], "discriminatedSubtypes": { - "$id": "199", + "$id": "219", "whatsApp": { - "$id": "200", + "$id": "220", "kind": "model", "name": "WhatsAppMessageTemplateBindings", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings", @@ -1950,20 +2147,20 @@ "discriminatorValue": "whatsApp", "decorators": [], "baseModel": { - "$ref": "197" + "$ref": "217" }, "properties": [ { - "$id": "201", + "$id": "221", "kind": "property", "name": "kind", "serializedName": "kind", "description": "MessageTemplateBindings is whatsApp", "type": { - "$id": "202", + "$id": "222", "kind": "constant", "valueType": { - "$id": "203", + "$id": "223", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -1980,17 +2177,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.kind" }, { - "$id": "204", + "$id": "224", "kind": "property", "name": "header", "serializedName": "header", "description": "The header template bindings", "type": { - "$id": "205", + "$id": "225", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$id": "206", + "$id": "226", "kind": "model", "name": "WhatsAppMessageTemplateBindingsComponent", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent", @@ -1999,13 +2196,13 @@ "decorators": [], "properties": [ { - "$id": "207", + "$id": "227", "kind": "property", "name": "refValue", "serializedName": "refValue", "description": "The name of the referenced item in the template values.", "type": { - "$id": "208", + "$id": "228", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2031,17 +2228,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.header" }, { - "$id": "209", + "$id": "229", "kind": "property", "name": "body", "serializedName": "body", "description": "The body template bindings", "type": { - "$id": "210", + "$id": "230", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$ref": "206" + "$ref": "226" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2054,17 +2251,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.body" }, { - "$id": "211", + "$id": "231", "kind": "property", "name": "footer", "serializedName": "footer", "description": "The footer template bindings", "type": { - "$id": "212", + "$id": "232", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsComponent", "valueType": { - "$ref": "206" + "$ref": "226" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2077,17 +2274,17 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings.footer" }, { - "$id": "213", + "$id": "233", "kind": "property", "name": "buttons", "serializedName": "buttons", "description": "The button template bindings", "type": { - "$id": "214", + "$id": "234", "kind": "array", "name": "ArrayWhatsAppMessageTemplateBindingsButton", "valueType": { - "$id": "215", + "$id": "235", "kind": "model", "name": "WhatsAppMessageTemplateBindingsButton", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton", @@ -2096,13 +2293,13 @@ "decorators": [], "properties": [ { - "$id": "216", + "$id": "236", "kind": "property", "name": "subType", "serializedName": "subType", "description": "The WhatsApp button sub type", "type": { - "$ref": "36" + "$ref": "40" }, "optional": false, "readOnly": false, @@ -2112,13 +2309,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton.subType" }, { - "$id": "217", + "$id": "237", "kind": "property", "name": "refValue", "serializedName": "refValue", "description": "The name of the referenced item in the template values.", "type": { - "$id": "218", + "$id": "238", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2167,41 +2364,41 @@ } } }, - { - "$ref": "77" - }, { "$ref": "83" }, { - "$ref": "91" + "$ref": "89" }, { - "$ref": "99" + "$ref": "97" }, { - "$ref": "109" + "$ref": "105" }, { - "$ref": "117" + "$ref": "115" }, { "$ref": "123" }, { - "$ref": "128" + "$ref": "129" + }, + { + "$ref": "137" }, { - "$ref": "135" + "$ref": "143" }, { - "$ref": "140" + "$ref": "148" }, { - "$ref": "146" + "$ref": "155" }, { - "$ref": "156" + "$ref": "160" }, { "$ref": "166" @@ -2210,22 +2407,28 @@ "$ref": "176" }, { - "$ref": "188" + "$ref": "186" }, { - "$ref": "197" + "$ref": "196" }, { - "$ref": "200" + "$ref": "208" }, { - "$ref": "206" + "$ref": "217" }, { - "$ref": "215" + "$ref": "220" }, { - "$id": "219", + "$ref": "226" + }, + { + "$ref": "235" + }, + { + "$id": "239", "kind": "model", "name": "SendMessageResult", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.SendMessageResult", @@ -2234,17 +2437,17 @@ "decorators": [], "properties": [ { - "$id": "220", + "$id": "240", "kind": "property", "name": "receipts", "serializedName": "receipts", "description": "Receipts of the send message operation.", "type": { - "$id": "221", + "$id": "241", "kind": "array", "name": "ArrayMessageReceipt", "valueType": { - "$id": "222", + "$id": "242", "kind": "model", "name": "MessageReceipt", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt", @@ -2253,13 +2456,13 @@ "decorators": [], "properties": [ { - "$id": "223", + "$id": "243", "kind": "property", "name": "messageId", "serializedName": "messageId", "description": "The message id.", "type": { - "$id": "224", + "$id": "244", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2273,13 +2476,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageReceipt.messageId" }, { - "$id": "225", + "$id": "245", "kind": "property", "name": "to", "serializedName": "to", "description": "The native external platform user identifier of the recipient.", "type": { - "$id": "226", + "$id": "246", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2307,10 +2510,10 @@ ] }, { - "$ref": "222" + "$ref": "242" }, { - "$id": "227", + "$id": "247", "kind": "model", "name": "MessageTemplateItem", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem", @@ -2318,13 +2521,13 @@ "description": "The message template as returned from the service.", "decorators": [], "discriminatorProperty": { - "$id": "228", + "$id": "248", "kind": "property", "name": "kind", "serializedName": "kind", "description": "The type discriminator describing a template type.", "type": { - "$ref": "58" + "$ref": "64" }, "optional": false, "readOnly": false, @@ -2335,13 +2538,13 @@ }, "properties": [ { - "$id": "229", + "$id": "249", "kind": "property", "name": "name", "serializedName": "name", "description": "The template's name.", "type": { - "$id": "230", + "$id": "250", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2355,13 +2558,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.name" }, { - "$id": "231", + "$id": "251", "kind": "property", "name": "language", "serializedName": "language", "description": "The template's language, in the ISO 639 format, consist of a two-letter language code followed by an optional two-letter country code, e.g., 'en' or 'en_US'.", "type": { - "$id": "232", + "$id": "252", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2375,13 +2578,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.language" }, { - "$id": "233", + "$id": "253", "kind": "property", "name": "status", "serializedName": "status", "description": "The aggregated template status.", "type": { - "$ref": "48" + "$ref": "54" }, "optional": false, "readOnly": false, @@ -2391,13 +2594,13 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.MessageTemplateItem.status" }, { - "$ref": "228" + "$ref": "248" } ], "discriminatedSubtypes": { - "$id": "234", + "$id": "254", "whatsApp": { - "$id": "235", + "$id": "255", "kind": "model", "name": "WhatsAppMessageTemplateItem", "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem", @@ -2406,17 +2609,17 @@ "discriminatorValue": "whatsApp", "decorators": [], "baseModel": { - "$ref": "227" + "$ref": "247" }, "properties": [ { - "$id": "236", + "$id": "256", "kind": "property", "name": "content", "serializedName": "content", "description": "WhatsApp platform's template content. This is the payload returned from WhatsApp API.", "type": { - "$id": "237", + "$id": "257", "kind": "unknown", "name": "unknown", "crossLanguageDefinitionId": "", @@ -2430,16 +2633,16 @@ "crossLanguageDefinitionId": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem.content" }, { - "$id": "238", + "$id": "258", "kind": "property", "name": "kind", "serializedName": "kind", "description": "Message template response type is whatsApp.", "type": { - "$id": "239", + "$id": "259", "kind": "constant", "valueType": { - "$id": "240", + "$id": "260", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2460,10 +2663,10 @@ } }, { - "$ref": "235" + "$ref": "255" }, { - "$id": "241", + "$id": "261", "kind": "model", "name": "PagedMessageTemplateItem", "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage", @@ -2472,17 +2675,17 @@ "decorators": [], "properties": [ { - "$id": "242", + "$id": "262", "kind": "property", "name": "value", "serializedName": "value", "description": "The MessageTemplateItem items on this page", "type": { - "$id": "243", + "$id": "263", "kind": "array", "name": "ArrayMessageTemplateItem", "valueType": { - "$ref": "227" + "$ref": "247" }, "crossLanguageDefinitionId": "TypeSpec.Array", "decorators": [] @@ -2495,18 +2698,18 @@ "crossLanguageDefinitionId": "Azure.Core.Foundations.CustomPage.value" }, { - "$id": "244", + "$id": "264", "kind": "property", "name": "nextLink", "serializedName": "nextLink", "description": "The link to the next page of items", "type": { - "$id": "245", + "$id": "265", "kind": "url", "name": "ResourceLocation", "crossLanguageDefinitionId": "TypeSpec.Rest.ResourceLocation", "baseType": { - "$id": "246", + "$id": "266", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url", @@ -2526,23 +2729,23 @@ ], "Clients": [ { - "$id": "247", + "$id": "267", "Name": "NotificationMessagesClient", "Operations": [ { - "$id": "248", + "$id": "268", "Name": "send", "ResourceName": "NotificationMessagesClient", "Description": "Sends a notification message from Business to User.", "Accessibility": "public", "Parameters": [ { - "$id": "249", + "$id": "269", "Name": "endpoint", "NameInRequest": "endpoint", "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { - "$id": "250", + "$id": "270", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -2558,12 +2761,12 @@ "Kind": "Client" }, { - "$id": "251", + "$id": "271", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "252", + "$id": "272", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2577,25 +2780,25 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "253", + "$id": "273", "Type": { - "$id": "254", + "$id": "274", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-08-30" + "Value": "2024-11-15" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "255", + "$id": "275", "Name": "repeatabilityRequestId", "NameInRequest": "Repeatability-Request-ID", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "256", + "$id": "276", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2612,17 +2815,17 @@ "SkipUrlEncoding": false }, { - "$id": "257", + "$id": "277", "Name": "repeatabilityFirstSent", "NameInRequest": "Repeatability-First-Sent", "Description": "Specifies the date and time at which the request was first created.", "Type": { - "$id": "258", + "$id": "278", "kind": "utcDateTime", "name": "utcDateTime", "encode": "rfc7231", "wireType": { - "$id": "259", + "$id": "279", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2642,17 +2845,17 @@ "SkipUrlEncoding": false }, { - "$id": "260", + "$id": "280", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "261", + "$id": "281", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "262", + "$id": "282", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2671,15 +2874,15 @@ "SkipUrlEncoding": false }, { - "$id": "263", + "$id": "283", "Name": "contentType", "NameInRequest": "Content-Type", "Description": "Body parameter's content type. Known values are application/json", "Type": { - "$id": "264", + "$id": "284", "kind": "constant", "valueType": { - "$id": "265", + "$id": "285", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2699,14 +2902,14 @@ "SkipUrlEncoding": false }, { - "$id": "266", + "$id": "286", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "267", + "$id": "287", "kind": "constant", "valueType": { - "$id": "268", + "$id": "288", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2726,12 +2929,12 @@ "SkipUrlEncoding": false }, { - "$id": "269", + "$id": "289", "Name": "notificationContent", "NameInRequest": "notificationContent", "Description": "Details of the message to send.", "Type": { - "$ref": "68" + "$ref": "74" }, "Location": "Body", "IsApiVersion": false, @@ -2746,36 +2949,36 @@ ], "Responses": [ { - "$id": "270", + "$id": "290", "StatusCodes": [ 202 ], "BodyType": { - "$ref": "219" + "$ref": "239" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "271", + "$id": "291", "Name": "repeatabilityResult", "NameInResponse": "Repeatability-Result", "Description": "Indicates whether the repeatable request was accepted or rejected.", "Type": { - "$ref": "62" + "$ref": "68" } }, { - "$id": "272", + "$id": "292", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "273", + "$id": "293", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "274", + "$id": "294", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2805,22 +3008,22 @@ "Decorators": [] }, { - "$id": "275", + "$id": "295", "Name": "downloadMediaInternal", "ResourceName": "MessageDataStream", "Description": "Download the Media payload from a User to Business message.", "Accessibility": "internal", "Parameters": [ { - "$ref": "249" + "$ref": "269" }, { - "$id": "276", + "$id": "296", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "277", + "$id": "297", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2834,25 +3037,25 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "278", + "$id": "298", "Type": { - "$id": "279", + "$id": "299", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-08-30" + "Value": "2024-11-15" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "280", + "$id": "300", "Name": "id", "NameInRequest": "id", "Description": "The stream ID.", "Type": { - "$id": "281", + "$id": "301", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2869,17 +3072,17 @@ "SkipUrlEncoding": false }, { - "$id": "282", + "$id": "302", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "283", + "$id": "303", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "284", + "$id": "304", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2898,14 +3101,14 @@ "SkipUrlEncoding": false }, { - "$id": "285", + "$id": "305", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "286", + "$id": "306", "kind": "constant", "valueType": { - "$id": "287", + "$id": "307", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2927,12 +3130,12 @@ ], "Responses": [ { - "$id": "288", + "$id": "308", "StatusCodes": [ 200 ], "BodyType": { - "$id": "289", + "$id": "309", "kind": "bytes", "name": "bytes", "encode": "base64", @@ -2942,17 +3145,17 @@ "BodyMediaType": "Json", "Headers": [ { - "$id": "290", + "$id": "310", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "291", + "$id": "311", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "292", + "$id": "312", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2962,15 +3165,15 @@ } }, { - "$id": "293", + "$id": "313", "Name": "contentType", "NameInResponse": "content-type", "Description": "The stream content type.", "Type": { - "$id": "294", + "$id": "314", "kind": "constant", "valueType": { - "$id": "295", + "$id": "315", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -2998,36 +3201,36 @@ "Decorators": [], "Examples": [ { - "$id": "296", + "$id": "316", "kind": "http", "name": "Download media", "description": "Download media", - "filePath": "2024-08-30/Stream_GetMedia.json", + "filePath": "2024-11-15/Stream_GetMedia.json", "parameters": [ { - "$id": "297", + "$id": "317", "parameter": { - "$ref": "276" + "$ref": "296" }, "value": { - "$id": "298", + "$id": "318", "kind": "string", "type": { - "$ref": "277" + "$ref": "297" }, - "value": "2024-08-30" + "value": "2024-11-15" } }, { - "$id": "299", + "$id": "319", "parameter": { - "$ref": "280" + "$ref": "300" }, "value": { - "$id": "300", + "$id": "320", "kind": "string", "type": { - "$ref": "281" + "$ref": "301" }, "value": "d19e68ec-bdd6-4a50-8dfb-cbb1642df6ab" } @@ -3035,16 +3238,16 @@ ], "responses": [ { - "$id": "301", + "$id": "321", "response": { - "$ref": "288" + "$ref": "308" }, "statusCode": 200, "bodyValue": { - "$id": "302", + "$id": "322", "kind": "string", "type": { - "$ref": "289" + "$ref": "309" }, "value": "" } @@ -3055,33 +3258,33 @@ } ], "Protocol": { - "$id": "303" + "$id": "323" }, "Parameters": [ { - "$ref": "249" + "$ref": "269" } ], "Decorators": [] }, { - "$id": "304", + "$id": "324", "Name": "MessageTemplateClient", "Operations": [ { - "$id": "305", + "$id": "325", "Name": "getTemplates", "ResourceName": "MessageTemplateItem", "Description": "List all templates for given Azure Communication Services channel", "Accessibility": "public", "Parameters": [ { - "$id": "306", + "$id": "326", "Name": "endpoint", "NameInRequest": "endpoint", "Description": "The communication resource, for example https://my-resource.communication.azure.com", "Type": { - "$id": "307", + "$id": "327", "kind": "url", "name": "url", "crossLanguageDefinitionId": "TypeSpec.url" @@ -3097,12 +3300,12 @@ "Kind": "Client" }, { - "$id": "308", + "$id": "328", "Name": "apiVersion", "NameInRequest": "api-version", "Description": "The API version to use for this operation.", "Type": { - "$id": "309", + "$id": "329", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3116,30 +3319,30 @@ "IsRequired": true, "Kind": "Client", "DefaultValue": { - "$id": "310", + "$id": "330", "Type": { - "$id": "311", + "$id": "331", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string" }, - "Value": "2024-08-30" + "Value": "2024-11-15" }, "Decorators": [], "SkipUrlEncoding": false }, { - "$id": "312", + "$id": "332", "Name": "channelId", "NameInRequest": "channelId", "Description": "The registration ID of the channel.", "Type": { - "$id": "313", + "$id": "333", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "314", + "$id": "334", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3158,12 +3361,12 @@ "SkipUrlEncoding": false }, { - "$id": "315", + "$id": "335", "Name": "maxpagesize", "NameInRequest": "maxpagesize", "Description": "Number of objects to return per page.", "Type": { - "$id": "316", + "$id": "336", "kind": "int32", "name": "int32", "crossLanguageDefinitionId": "TypeSpec.int32", @@ -3180,17 +3383,17 @@ "SkipUrlEncoding": false }, { - "$id": "317", + "$id": "337", "Name": "clientRequestId", "NameInRequest": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "318", + "$id": "338", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "319", + "$id": "339", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3209,14 +3412,14 @@ "SkipUrlEncoding": false }, { - "$id": "320", + "$id": "340", "Name": "accept", "NameInRequest": "Accept", "Type": { - "$id": "321", + "$id": "341", "kind": "constant", "valueType": { - "$id": "322", + "$id": "342", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3238,27 +3441,27 @@ ], "Responses": [ { - "$id": "323", + "$id": "343", "StatusCodes": [ 200 ], "BodyType": { - "$ref": "241" + "$ref": "261" }, "BodyMediaType": "Json", "Headers": [ { - "$id": "324", + "$id": "344", "Name": "clientRequestId", "NameInResponse": "x-ms-client-request-id", "Description": "An opaque, globally-unique, client-generated string identifier for the request.", "Type": { - "$id": "325", + "$id": "345", "kind": "string", "name": "uuid", "crossLanguageDefinitionId": "Azure.Core.uuid", "baseType": { - "$id": "326", + "$id": "346", "kind": "string", "name": "string", "crossLanguageDefinitionId": "TypeSpec.string", @@ -3280,7 +3483,7 @@ "Path": "/messages/channels/{channelId}/templates", "BufferResponse": true, "Paging": { - "$id": "327", + "$id": "347", "ItemName": "value", "NextLinkName": "nextLink" }, @@ -3291,26 +3494,26 @@ } ], "Protocol": { - "$id": "328" + "$id": "348" }, "Parameters": [ { - "$ref": "306" + "$ref": "326" } ], "Decorators": [] } ], "Auth": { - "$id": "329", + "$id": "349", "OAuth2": { - "$id": "330", + "$id": "350", "Scopes": [ "https://communication.azure.com/.default" ] }, "ApiKey": { - "$id": "331", + "$id": "351", "Name": "Authorization" } }