From 62a1814eb7b264b9b5f0111669ee122bca338376 Mon Sep 17 00:00:00 2001 From: jiminwen-msft Date: Tue, 5 Aug 2025 12:27:44 -0700 Subject: [PATCH] Re-gen SDK --- eng/versioning/version_client.txt | 2 +- .../azure-communication-chat/CHANGELOG.md | 6 ++ .../azure-communication-chat/README.md | 2 +- .../azure-communication-chat/pom.xml | 2 +- .../models/CommunicationIdentifierModel.java | 29 ++++++++ .../CommunicationIdentifierModelKind.java | 5 ++ .../models/CreateChatThreadOptions.java | 14 ++-- .../MicrosoftTeamsUserIdentifierModel.java | 10 +-- .../models/PhoneNumberIdentifierModel.java | 68 ++++++++++++++++++- .../swagger/README.md | 2 +- 10 files changed, 120 insertions(+), 20 deletions(-) diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt index 5b42f8e3ac3a..bf3698c3d5bd 100644 --- a/eng/versioning/version_client.txt +++ b/eng/versioning/version_client.txt @@ -70,7 +70,7 @@ com.azure:azure-analytics-synapse-monitoring;1.0.0-beta.4;1.0.0-beta.5 com.azure:azure-code-customization-parent;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-communication-callautomation;1.3.3;1.5.0-beta.1 com.azure:azure-communication-callingserver;1.0.0-beta.4;1.0.0-beta.5 -com.azure:azure-communication-chat;1.5.9;1.6.0 +com.azure:azure-communication-chat;1.6.0;1.6.1 com.azure:azure-communication-common;1.4.0;1.5.0-beta.1 com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1 com.azure:azure-communication-email;1.0.21;1.1.0-beta.2 diff --git a/sdk/communication/azure-communication-chat/CHANGELOG.md b/sdk/communication/azure-communication-chat/CHANGELOG.md index 139021ef7cd8..25eed08cd25e 100644 --- a/sdk/communication/azure-communication-chat/CHANGELOG.md +++ b/sdk/communication/azure-communication-chat/CHANGELOG.md @@ -1,5 +1,11 @@ # Release History +## 1.6.1 (2025-08-05) + +### Other Changes +- Added support for a new communication identifier `TeamsExtensionUserIdentifierModel`. +- Added properties for communication identifier 'PhoneNumberIdentifierModel'. + ## 1.6.0 (2025-06-18) ### Features Added diff --git a/sdk/communication/azure-communication-chat/README.md b/sdk/communication/azure-communication-chat/README.md index d721a077d917..50ec24f4e54b 100644 --- a/sdk/communication/azure-communication-chat/README.md +++ b/sdk/communication/azure-communication-chat/README.md @@ -52,7 +52,7 @@ add the direct dependency to your project as follows. com.azure azure-communication-chat - 1.6.0 + 1.6.1 ``` diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml index e095a3352b4b..fec4f48a02cf 100644 --- a/sdk/communication/azure-communication-chat/pom.xml +++ b/sdk/communication/azure-communication-chat/pom.xml @@ -14,7 +14,7 @@ com.azure azure-communication-chat - 1.6.0 + 1.6.1 Microsoft Azure client library for chat application diff --git a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/CommunicationIdentifierModel.java b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/CommunicationIdentifierModel.java index 3aec73a3ac4d..30b7c049d367 100644 --- a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/CommunicationIdentifierModel.java +++ b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/CommunicationIdentifierModel.java @@ -48,6 +48,11 @@ public final class CommunicationIdentifierModel implements JsonSerializable getParticipants() { return this.participants; @@ -77,7 +77,7 @@ public List getParticipants() { /** * Set the participants property: Participants to be added to the chat thread. * - * @param participants the participants to set. + * @param participants the participants value to set. * @return the CreateChatThreadOptions object itself. */ public CreateChatThreadOptions setParticipants(List participants) { @@ -89,7 +89,7 @@ public CreateChatThreadOptions setParticipants(List participant * Get the metadata property: Contextual metadata for the thread. The metadata consists of name/value pairs. The * total size of all metadata pairs can be up to 1KB in size. * - * @return the metadata. + * @return the metadata value. */ public Map getMetadata() { return this.metadata; @@ -110,7 +110,7 @@ public CreateChatThreadOptions setMetadata(Map metadata) { /** * Get the retentionPolicy property: Data retention policy for auto deletion. * - * @return the retentionPolicy. + * @return the retentionPolicy value. */ public ChatRetentionPolicy getRetentionPolicy() { return this.retentionPolicy; @@ -135,9 +135,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("topic", this.topic); jsonWriter.writeArrayField("participants", this.participants, (writer, element) -> writer.writeJson(element)); - if (this.metadata != null) { - jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); - } + jsonWriter.writeMapField("metadata", this.metadata, (writer, element) -> writer.writeString(element)); jsonWriter.writeJsonField("retentionPolicy", this.retentionPolicy); return jsonWriter.writeEndObject(); } diff --git a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/MicrosoftTeamsUserIdentifierModel.java b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/MicrosoftTeamsUserIdentifierModel.java index 56b631614cb0..52cf097db84a 100644 --- a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/MicrosoftTeamsUserIdentifierModel.java +++ b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/MicrosoftTeamsUserIdentifierModel.java @@ -17,7 +17,7 @@ @Fluent public final class MicrosoftTeamsUserIdentifierModel implements JsonSerializable { /* - * The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the user. + * The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of the user. */ private String userId; @@ -38,8 +38,8 @@ public MicrosoftTeamsUserIdentifierModel() { } /** - * Get the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the - * user. + * Get the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of + * the user. * * @return the userId value. */ @@ -48,8 +48,8 @@ public String getUserId() { } /** - * Set the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the AAD object Id of the - * user. + * Set the userId property: The Id of the Microsoft Teams user. If not anonymous, this is the Entra ID object Id of + * the user. * * @param userId the userId value to set. * @return the MicrosoftTeamsUserIdentifierModel object itself. diff --git a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/PhoneNumberIdentifierModel.java b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/PhoneNumberIdentifierModel.java index 4a0cdd678a46..464d91b17cc4 100644 --- a/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/PhoneNumberIdentifierModel.java +++ b/sdk/communication/azure-communication-chat/src/main/java/com/azure/communication/chat/implementation/models/PhoneNumberIdentifierModel.java @@ -17,10 +17,22 @@ @Fluent public final class PhoneNumberIdentifierModel implements JsonSerializable { /* - * The phone number in E.164 format. + * The phone number, usually in E.164 format. */ private String value; + /* + * True if the phone number is anonymous. By default false if missing. If the phone number is anonymous, the value + * will be the string 'anonymous'. + */ + private Boolean isAnonymous; + + /* + * The asserted Id of the phone number. An asserted Id gets generated when the same phone number joins the same call + * more than once. + */ + private String assertedId; + /** * Creates an instance of PhoneNumberIdentifierModel class. */ @@ -28,7 +40,7 @@ public PhoneNumberIdentifierModel() { } /** - * Get the value property: The phone number in E.164 format. + * Get the value property: The phone number, usually in E.164 format. * * @return the value value. */ @@ -37,7 +49,7 @@ public String getValue() { } /** - * Set the value property: The phone number in E.164 format. + * Set the value property: The phone number, usually in E.164 format. * * @param value the value value to set. * @return the PhoneNumberIdentifierModel object itself. @@ -47,6 +59,50 @@ public PhoneNumberIdentifierModel setValue(String value) { return this; } + /** + * Get the isAnonymous property: True if the phone number is anonymous. By default false if missing. If the phone + * number is anonymous, the value will be the string 'anonymous'. + * + * @return the isAnonymous value. + */ + public Boolean isAnonymous() { + return this.isAnonymous; + } + + /** + * Set the isAnonymous property: True if the phone number is anonymous. By default false if missing. If the phone + * number is anonymous, the value will be the string 'anonymous'. + * + * @param isAnonymous the isAnonymous value to set. + * @return the PhoneNumberIdentifierModel object itself. + */ + public PhoneNumberIdentifierModel setIsAnonymous(Boolean isAnonymous) { + this.isAnonymous = isAnonymous; + return this; + } + + /** + * Get the assertedId property: The asserted Id of the phone number. An asserted Id gets generated when the same + * phone number joins the same call more than once. + * + * @return the assertedId value. + */ + public String getAssertedId() { + return this.assertedId; + } + + /** + * Set the assertedId property: The asserted Id of the phone number. An asserted Id gets generated when the same + * phone number joins the same call more than once. + * + * @param assertedId the assertedId value to set. + * @return the PhoneNumberIdentifierModel object itself. + */ + public PhoneNumberIdentifierModel setAssertedId(String assertedId) { + this.assertedId = assertedId; + return this; + } + /** * {@inheritDoc} */ @@ -54,6 +110,8 @@ public PhoneNumberIdentifierModel setValue(String value) { public JsonWriter toJson(JsonWriter jsonWriter) throws IOException { jsonWriter.writeStartObject(); jsonWriter.writeStringField("value", this.value); + jsonWriter.writeBooleanField("isAnonymous", this.isAnonymous); + jsonWriter.writeStringField("assertedId", this.assertedId); return jsonWriter.writeEndObject(); } @@ -75,6 +133,10 @@ public static PhoneNumberIdentifierModel fromJson(JsonReader jsonReader) throws if ("value".equals(fieldName)) { deserializedPhoneNumberIdentifierModel.value = reader.getString(); + } else if ("isAnonymous".equals(fieldName)) { + deserializedPhoneNumberIdentifierModel.isAnonymous = reader.getNullable(JsonReader::getBoolean); + } else if ("assertedId".equals(fieldName)) { + deserializedPhoneNumberIdentifierModel.assertedId = reader.getString(); } else { reader.skipChildren(); } diff --git a/sdk/communication/azure-communication-chat/swagger/README.md b/sdk/communication/azure-communication-chat/swagger/README.md index 6facb6013f8f..535734820895 100644 --- a/sdk/communication/azure-communication-chat/swagger/README.md +++ b/sdk/communication/azure-communication-chat/swagger/README.md @@ -38,7 +38,7 @@ To update generated files for chat service, run the following command tag: package-chat-2025-03-15 use: '@autorest/java@4.1.33' require: - - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/b97334ac101d4a5e6556e4d67d1bcdd46fc12139/specification/communication/data-plane/Chat/readme.md + - https://raw.githubusercontent.com/Azure/azure-rest-api-specs/667a97d5f042267a465b1e9b3e67325fccb13153/specification/communication/data-plane/Chat/readme.md java: true title: AzureCommunicationChatService output-folder: ..\