diff --git a/.vscode/cspell.json b/.vscode/cspell.json
index d00d93ad9a92..dbfcd99e83ab 100644
--- a/.vscode/cspell.json
+++ b/.vscode/cspell.json
@@ -878,7 +878,8 @@
"viseme",
"VISEME",
"webrtc",
- "WEBRTC"
+ "WEBRTC",
+ "aiservices"
]
},
{
diff --git a/eng/pipelines/patch-release.yml b/eng/pipelines/patch-release.yml
index 36c1de66addb..c780e236f501 100644
--- a/eng/pipelines/patch-release.yml
+++ b/eng/pipelines/patch-release.yml
@@ -1,45 +1,173 @@
trigger: none
pr: none
-
parameters:
- name: TestPipeline
displayName: Test Run Without Version Changes
type: boolean
default: false
-
extends:
template: /eng/pipelines/templates/stages/archetype-sdk-client-patch.yml
parameters:
TestPipeline: ${{ parameters.TestPipeline }}
artifacts:
- - name: azure-sdk-template
- groupId: com.azure
- safeName: azuresdktemplate
- skipPublishDocMs: true
- ServiceDirectory: template
- - name: azure-sdk-template-two
- groupId: com.azure
- safeName: azuresdktemplatetwo
- skipPublishDocMs: true
- ServiceDirectory: template
- - name: azure-sdk-template-three
- groupId: com.azure
- safeName: azuresdktemplatethree
- skipPublishDocMs: true
- ServiceDirectory: template
- - name: azure-sdk-template
- groupId: com.azure.v2
- safeName: azuresdktemplate
- skipPublishDocMs: true
- ServiceDirectory: template-v2
- - name: azure-sdk-template-two
- groupId: com.azure.v2
- safeName: azuresdktemplatetwo
- skipPublishDocMs: true
- ServiceDirectory: template-v2
- - name: azure-sdk-template-three
- groupId: com.azure.v2
- safeName: azuresdktemplatethree
- skipPublishDocMs: true
- ServiceDirectory: template-v2
+ - name: azure-ai-metricsadvisor
+ groupId: com.azure
+ safeName: azureaimetricsadvisor
+ ServiceDirectory: metricsadvisor
+ - name: azure-ai-textanalytics
+ groupId: com.azure
+ safeName: azureaitextanalytics
+ ServiceDirectory: textanalytics
+ - name: azure-ai-translation-document
+ groupId: com.azure
+ safeName: azureaitranslationdocument
+ ServiceDirectory: translation
+ - name: azure-communication-messages
+ groupId: com.azure
+ safeName: azurecommunicationmessages
+ ServiceDirectory: communication/azure-communication-messages
+ - name: azure-containers-containerregistry
+ groupId: com.azure
+ safeName: azurecontainerscontainerregistry
+ ServiceDirectory: containerregistry
+ - name: azure-data-tables
+ groupId: com.azure
+ safeName: azuredatatables
+ ServiceDirectory: tables
+ - name: azure-health-insights-radiologyinsights
+ groupId: com.azure
+ safeName: azurehealthinsightsradiologyinsights
+ ServiceDirectory: healthinsights
+ - name: azure-identity-extensions
+ groupId: com.azure
+ safeName: azureidentityextensions
+ ServiceDirectory: identity/azure-identity-extensions
+ - name: azure-messaging-eventgrid
+ groupId: com.azure
+ safeName: azuremessagingeventgrid
+ ServiceDirectory: eventgrid
+ - name: azure-messaging-eventgrid-namespaces
+ groupId: com.azure
+ safeName: azuremessagingeventgridnamespaces
+ ServiceDirectory: eventgrid
+ - name: azure-messaging-eventhubs-checkpointstore-blob
+ groupId: com.azure
+ safeName: azuremessagingeventhubscheckpointstoreblob
+ ServiceDirectory: eventhubs
+ - name: azure-messaging-servicebus
+ groupId: com.azure
+ safeName: azuremessagingservicebus
+ ServiceDirectory: servicebus
+ - name: azure-monitor-ingestion
+ groupId: com.azure
+ safeName: azuremonitoringestion
+ ServiceDirectory: monitor
+ - name: azure-security-keyvault-administration
+ groupId: com.azure
+ safeName: azuresecuritykeyvaultadministration
+ ServiceDirectory: keyvault
+ - name: azure-security-keyvault-certificates
+ groupId: com.azure
+ safeName: azuresecuritykeyvaultcertificates
+ ServiceDirectory: keyvault
+ - name: azure-security-keyvault-keys
+ groupId: com.azure
+ safeName: azuresecuritykeyvaultkeys
+ ServiceDirectory: keyvault
+ - name: azure-security-keyvault-secrets
+ groupId: com.azure
+ safeName: azuresecuritykeyvaultsecrets
+ ServiceDirectory: keyvault
+ - name: azure-search-documents
+ groupId: com.azure
+ safeName: azuresearch
+ ServiceDirectory: search
+ - name: azure-resourcemanager-resources
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerresources
+ ServiceDirectory: resources
+ - name: azure-resourcemanager-storage
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerstorage
+ ServiceDirectory: storage/azure-resourcemanager-storage
+ - name: azure-resourcemanager-authorization
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerauthorization
+ ServiceDirectory: authorization
+ - name: azure-resourcemanager-keyvault
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerkeyvault
+ ServiceDirectory: keyvault/azure-resourcemanager-keyvault
+ - name: azure-resourcemanager-msi
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagermsi
+ ServiceDirectory: msi
+ - name: azure-resourcemanager-network
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagernetwork
+ ServiceDirectory: network
+ - name: azure-resourcemanager-compute
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercompute
+ ServiceDirectory: compute
+ - name: azure-resourcemanager-sql
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagersql
+ ServiceDirectory: sql
+ - name: azure-resourcemanager-dns
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerdns
+ ServiceDirectory: dns
+ - name: azure-resourcemanager-appservice
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerappservice
+ ServiceDirectory: appservice
+ - name: azure-resourcemanager-cosmos
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercosmos
+ ServiceDirectory: cosmos/azure-resourcemanager-cosmos
+ - name: azure-resourcemanager-containerservice
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercontainerservice
+ ServiceDirectory: containerservice
+ - name: azure-resourcemanager-eventhubs
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagereventhubs
+ ServiceDirectory: eventhubs
+ - name: azure-resourcemanager-monitor
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagermonitor
+ ServiceDirectory: monitor
+ - name: azure-resourcemanager-containerregistry
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercontainerregistry
+ ServiceDirectory: containerregistry
+ - name: azure-resourcemanager-containerinstance
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercontainerinstance
+ ServiceDirectory: containerinstance
+ - name: azure-resourcemanager-privatedns
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerprivatedns
+ ServiceDirectory: privatedns
+ - name: azure-resourcemanager-redis
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerredis
+ ServiceDirectory: redis
+ - name: azure-resourcemanager-trafficmanager
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagertrafficmanager
+ ServiceDirectory: trafficmanager
+ - name: azure-resourcemanager-servicebus
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagerservicebus
+ ServiceDirectory: servicebus/azure-resourcemanager-servicebus
+ - name: azure-resourcemanager-cdn
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagercdn
+ ServiceDirectory: cdn
+ - name: azure-resourcemanager-search
+ groupId: com.azure.resourcemanager
+ safeName: azureresourcemanagersearch
+ ServiceDirectory: search
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 82ec7b24b721..1aacbec6498e 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -45,7 +45,7 @@ com.azure:azure-ai-documenttranslator;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-ai-formrecognizer;4.1.13;4.2.0-beta.1
com.azure:azure-ai-formrecognizer-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-inference;1.0.0-beta.5;1.0.0-beta.6
-com.azure:azure-ai-metricsadvisor;1.2.11;1.3.0-beta.1
+com.azure:azure-ai-metricsadvisor;1.2.11;1.2.12
com.azure:azure-ai-metricsadvisor-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-openai;1.0.0-beta.16;1.0.0-beta.17
com.azure:azure-ai-openai-assistants;1.0.0-beta.5;1.0.0-beta.6
@@ -54,10 +54,10 @@ com.azure:azure-ai-openai-stainless;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-personalizer;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-ai-projects;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-ai-speech-transcription;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-ai-textanalytics;5.5.11;5.6.0-beta.1
+com.azure:azure-ai-textanalytics;5.5.11;5.5.12
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-translation-text;1.1.7;2.0.0-beta.2
-com.azure:azure-ai-translation-document;1.0.6;1.1.0-beta.1
+com.azure:azure-ai-translation-document;1.0.6;1.0.7
com.azure:azure-ai-vision-face;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-ai-voicelive;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-analytics-defender-easm;1.0.0-beta.1;1.0.0-beta.2
@@ -73,7 +73,7 @@ com.azure:azure-analytics-synapse-spark;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-analytics-synapse-managedprivateendpoints;1.0.0-beta.5;1.0.0-beta.6
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.5.2;1.6.0-beta.2
+com.azure:azure-communication-callautomation;1.5.2;1.6.0
com.azure:azure-communication-callingserver;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-communication-chat;1.6.4;1.7.0-beta.1
com.azure:azure-communication-common;1.4.4;1.5.0-beta.1
@@ -81,12 +81,12 @@ com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-communication-email;1.1.1;1.2.0-beta.2
com.azure:azure-communication-identity;1.6.9;1.7.0-beta.1
com.azure:azure-communication-jobrouter;1.1.17;2.0.0-beta.1
-com.azure:azure-communication-messages;1.1.8;1.2.0-beta.2
+com.azure:azure-communication-messages;1.1.8;1.1.9
com.azure:azure-communication-phonenumbers;1.4.2;1.5.0-beta.1
com.azure:azure-communication-rooms;1.2.5;1.3.0-beta.1
com.azure:azure-communication-sms;1.1.37;1.2.0-beta.1
com.azure:azure-compute-batch;1.0.0-beta.4;1.0.0-beta.5
-com.azure:azure-containers-containerregistry;1.2.21;1.3.0-beta.1
+com.azure:azure-containers-containerregistry;1.2.21;1.2.22
com.azure:azure-containers-containerregistry-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-core;1.57.1;1.58.0-beta.1
com.azure:azure-core-amqp;2.11.3;2.12.0-beta.1
@@ -125,7 +125,7 @@ com.azure:azure-data-appconfiguration-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-data-schemaregistry;1.5.9;1.6.0-beta.1
com.azure:azure-data-schemaregistry-apacheavro;1.1.30;1.2.0-beta.3
com.azure:azure-data-schemaregistry-jsonschema;1.0.6;1.1.0-beta.1
-com.azure:azure-data-tables;12.5.8;12.6.0-beta.1
+com.azure:azure-data-tables;12.5.8;12.5.9
com.azure:azure-data-tables-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-developer-devcenter;1.0.13;1.1.0-beta.1
com.azure:azure-developer-loadtesting;1.0.27;1.1.0-beta.2
@@ -134,9 +134,9 @@ com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-health-deidentification;1.0.0;1.1.0-beta.2
com.azure:azure-health-insights-clinicalmatching;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-health-insights-cancerprofiling;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-health-insights-radiologyinsights;1.1.5;1.2.0-beta.1
+com.azure:azure-health-insights-radiologyinsights;1.1.5;1.1.6
com.azure:azure-identity;1.18.2;1.19.0-beta.2
-com.azure:azure-identity-extensions;1.2.6;1.3.0-beta.1
+com.azure:azure-identity-extensions;1.2.6;1.2.7
com.azure:azure-identity-broker;1.1.19;1.2.0-beta.1
com.azure:azure-identity-broker-samples;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1
@@ -150,16 +150,16 @@ com.azure:azure-maps-geolocation;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-maps-render;2.0.0-beta.2;2.0.0-beta.3
com.azure:azure-maps-route;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-maps-search;2.0.0-beta.2;2.0.0-beta.3
-com.azure:azure-messaging-eventgrid;4.31.4;4.32.0-beta.1
+com.azure:azure-messaging-eventgrid;4.31.4;4.31.5
com.azure:azure-messaging-eventgrid-systemevents;1.0.0;1.1.0-beta.1
-com.azure:azure-messaging-eventgrid-namespaces;1.1.8;1.2.0-beta.1
+com.azure:azure-messaging-eventgrid-namespaces;1.1.8;1.1.9
com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-messaging-eventhubs;5.21.2;5.22.0-beta.1
-com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.21.2;1.22.0-beta.1
+com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.21.2;1.21.3
com.azure:azure-messaging-eventhubs-checkpointstore-jedis;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-messaging-eventhubs-stress;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-eventhubs-track2-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-messaging-servicebus;7.17.16;7.18.0-beta.2
+com.azure:azure-messaging-servicebus;7.17.16;7.17.17
com.azure:azure-messaging-servicebus-stress;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-servicebus-track2-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-webpubsub;1.5.3;1.6.0-beta.1
@@ -167,7 +167,7 @@ com.azure:azure-messaging-webpubsub-client;1.1.6;1.2.0-beta.1
com.azure:azure-mixedreality-authentication;1.2.37;1.3.0-beta.1
com.azure:azure-monitor-opentelemetry-exporter;1.0.0-beta.32;1.0.0-beta.33
com.azure:azure-monitor-opentelemetry-autoconfigure;1.4.0;1.5.0-beta.1
-com.azure:azure-monitor-ingestion;1.2.14;1.3.0-beta.1
+com.azure:azure-monitor-ingestion;1.2.14;1.2.15
com.azure:azure-monitor-ingestion-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-monitor-query;1.5.9;1.6.0-beta.1
com.azure:azure-monitor-query-logs;1.0.3;1.1.0-beta.1
@@ -176,16 +176,16 @@ com.azure:azure-monitor-query-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-openrewrite;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-perf-test-parent;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-quantum-jobs;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-search-documents;11.8.0;11.9.0-beta.2
+com.azure:azure-search-documents;11.8.0;11.8.1
com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-security-attestation;1.1.37;1.2.0-beta.1
com.azure:azure-security-confidentialledger;1.0.33;1.1.0-beta.2
-com.azure:azure-security-keyvault-administration;4.7.4;4.8.0-beta.1
-com.azure:azure-security-keyvault-certificates;4.8.4;4.9.0-beta.1
+com.azure:azure-security-keyvault-administration;4.7.4;4.7.5
+com.azure:azure-security-keyvault-certificates;4.8.4;4.8.5
com.azure:azure-security-keyvault-jca;2.10.1;2.11.0-beta.1
com.azure:azure-security-test-keyvault-jca;1.0.0;1.0.0
-com.azure:azure-security-keyvault-keys;4.10.4;4.11.0-beta.1
-com.azure:azure-security-keyvault-secrets;4.10.4;4.11.0-beta.1
+com.azure:azure-security-keyvault-keys;4.10.4;4.10.5
+com.azure:azure-security-keyvault-secrets;4.10.4;4.10.5
com.azure:azure-security-keyvault-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-sdk-template;1.1.1234;1.2.2-beta.1
com.azure:azure-sdk-template-two;1.0.0-beta.1;1.0.0-beta.1
@@ -275,30 +275,30 @@ com.azure.spring:spring-cloud-azure-testcontainers;6.1.0;7.0.0-beta.2
com.azure:azure-spring-data-cosmos;6.1.0;7.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager;2.58.0;2.59.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-appplatform;2.51.0;2.52.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.55.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-compute;2.56.0;2.57.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.55.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.58.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.55.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.1;2.55.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.5;2.54.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-msi;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-network;2.57.0;2.58.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-appservice;2.54.1;2.54.2
+com.azure.resourcemanager:azure-resourcemanager-authorization;2.53.6;2.53.7
+com.azure.resourcemanager:azure-resourcemanager-cdn;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-compute;2.56.0;2.56.1
+com.azure.resourcemanager:azure-resourcemanager-containerinstance;2.53.6;2.53.7
+com.azure.resourcemanager:azure-resourcemanager-containerregistry;2.54.1;2.54.2
+com.azure.resourcemanager:azure-resourcemanager-containerservice;2.57.0;2.57.1
+com.azure.resourcemanager:azure-resourcemanager-cosmos;2.54.0;2.54.1
+com.azure.resourcemanager:azure-resourcemanager-dns;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-eventhubs;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-keyvault;2.54.1;2.54.2
+com.azure.resourcemanager:azure-resourcemanager-monitor;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-msi;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-network;2.57.0;2.57.1
com.azure.resourcemanager:azure-resourcemanager-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-redis;2.53.5;2.54.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-privatedns;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-resources;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-redis;2.53.5;2.53.6
com.azure.resourcemanager:azure-resourcemanager-samples;2.0.0-beta.1;2.0.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-search;2.54.4;2.55.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.5;2.54.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-sql;2.53.5;2.54.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-storage;2.55.2;2.56.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.5;2.54.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-search;2.54.4;2.54.5
+com.azure.resourcemanager:azure-resourcemanager-servicebus;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-sql;2.53.5;2.53.6
+com.azure.resourcemanager:azure-resourcemanager-storage;2.55.2;2.55.3
+com.azure.resourcemanager:azure-resourcemanager-trafficmanager;2.53.5;2.53.6
com.azure.resourcemanager:azure-resourcemanager-test;2.0.0-beta.2;2.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-mediaservices;2.4.0;2.5.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-mysql;1.0.2;1.1.0-beta.1
diff --git a/sdk/ai/azure-ai-voicelive/CHANGELOG.md b/sdk/ai/azure-ai-voicelive/CHANGELOG.md
index 0f0827d6483a..0c1e6cd1a11f 100644
--- a/sdk/ai/azure-ai-voicelive/CHANGELOG.md
+++ b/sdk/ai/azure-ai-voicelive/CHANGELOG.md
@@ -11,7 +11,6 @@
- Enhanced session creation with new overloads:
- Added `startSession(String model, VoiceLiveRequestOptions requestOptions)` for model with custom options
- Added `startSession(VoiceLiveRequestOptions requestOptions)` for custom options without explicit model parameter
- - Original `startSession(String model)` and `startSession()` methods preserved for backward compatibility
### Breaking Changes
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioFormatTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioFormatTests.java
new file mode 100644
index 000000000000..bafae1ceb810
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioFormatTests.java
@@ -0,0 +1,441 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptions;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel;
+import com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection;
+import com.azure.ai.voicelive.models.AzureStandardVoice;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.OpenAIVoice;
+import com.azure.ai.voicelive.models.OpenAIVoiceName;
+import com.azure.ai.voicelive.models.OutputAudioFormat;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.ServerVadTurnDetection;
+import com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStarted;
+import com.azure.ai.voicelive.models.SessionUpdateInputAudioBufferSpeechStopped;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta;
+import com.azure.ai.voicelive.models.SessionUpdateSessionUpdated;
+import com.azure.ai.voicelive.models.TurnDetection;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import com.azure.core.util.BinaryData;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.Arguments;
+import org.junit.jupiter.params.provider.MethodSource;
+
+import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+import java.util.stream.Stream;
+
+/**
+ * Live tests for VoiceLive audio format handling.
+ */
+public class VoiceLiveAudioFormatTests extends VoiceLiveTestBase {
+
+ static Stream modelAndSamplingRateProvider() {
+ return Stream.of(Arguments.of("gpt-4o-realtime-preview", 16000), Arguments.of("gpt-4o-realtime", 44100),
+ Arguments.of("gpt-4o-realtime", 8000), Arguments.of("gpt-4o", 16000), Arguments.of("gpt-4o", 44100),
+ Arguments.of("gpt-4.1", 8000), Arguments.of("phi4-mm-realtime", 16000),
+ Arguments.of("phi4-mm-realtime", 44100));
+ }
+
+ static Stream modelAndInputAudioFormatProvider() {
+ return Stream.of(Arguments.of("gpt-4o", "g711_ulaw", "azure_semantic_vad"),
+ Arguments.of("gpt-4o", "g711_alaw", "azure_semantic_vad"),
+ Arguments.of("gpt-4o-realtime-preview", "g711_ulaw", "azure_semantic_vad"),
+ Arguments.of("gpt-4o-realtime-preview", "g711_ulaw", "server_vad"),
+ Arguments.of("gpt-4o-realtime-preview", "g711_alaw", "azure_semantic_vad"),
+ Arguments.of("gpt-4o-realtime-preview", "g711_alaw", "server_vad"),
+ Arguments.of("phi4-mm-realtime", "g711_ulaw", "azure_semantic_vad"),
+ Arguments.of("phi4-mm-realtime", "g711_alaw", "azure_semantic_vad"),
+ Arguments.of("phi4-mini", "g711_ulaw", "azure_semantic_vad"),
+ Arguments.of("phi4-mini", "g711_alaw", "azure_semantic_vad"));
+ }
+
+ static Stream modelAndOutputAudioFormatAzureVoiceProvider() {
+ return Stream.of(Arguments.of("gpt-4.1", "pcm16"), Arguments.of("gpt-4.1", "pcm16_8000hz"),
+ Arguments.of("gpt-4.1", "pcm16_16000hz"), Arguments.of("gpt-4.1", "pcm16_22050hz"),
+ Arguments.of("gpt-4.1", "pcm16_24000hz"), Arguments.of("gpt-4.1", "pcm16_44100hz"),
+ Arguments.of("gpt-4.1", "pcm16_48000hz"), Arguments.of("gpt-4.1", "g711_ulaw"),
+ Arguments.of("gpt-4.1", "g711_alaw"), Arguments.of("phi4-mini", "pcm16"),
+ Arguments.of("phi4-mini", "pcm16_8000hz"), Arguments.of("phi4-mini", "pcm16_16000hz"),
+ Arguments.of("phi4-mini", "pcm16_22050hz"), Arguments.of("phi4-mini", "pcm16_24000hz"),
+ Arguments.of("phi4-mini", "pcm16_44100hz"), Arguments.of("phi4-mini", "pcm16_48000hz"),
+ Arguments.of("phi4-mini", "g711_ulaw"), Arguments.of("phi4-mini", "g711_alaw"));
+ }
+
+ static Stream modelAndOutputAudioFormatOpenAIVoiceProvider() {
+ return Stream.of(Arguments.of("gpt-4o-realtime", "pcm16"), Arguments.of("gpt-4o-realtime", "g711_ulaw"),
+ Arguments.of("gpt-4o-realtime", "g711_alaw"));
+ }
+
+ @ParameterizedTest
+ @MethodSource("modelAndInputAudioFormatProvider")
+ @LiveOnly
+ public void testRealtimeServiceWithInputAudioFormat(String model, String audioFormat, String turnDetectionType)
+ throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ String audioFile = "g711_ulaw".equals(audioFormat) ? "largest_lake.ulaw" : "largest_lake.alaw";
+ byte[] audioData = loadAudioFile(audioFile);
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicReference sessionUpdatedEvent = new AtomicReference<>();
+ CountDownLatch sessionUpdatedLatch = new CountDownLatch(1);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ InputAudioFormat inputFormat = parseInputAudioFormat(audioFormat);
+
+ TurnDetection turnDetection = "server_vad".equals(turnDetectionType)
+ ? new ServerVadTurnDetection()
+ : new AzureSemanticVadTurnDetection();
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions().setInputAudioFormat(inputFormat)
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-AriaNeural")))
+ .setInstructions("You are a helpful assistant. Please respond briefly to the user's question.")
+ .setTurnDetection(turnDetection)
+ .setInputAudioTranscription(getSpeechRecognitionSetting(model));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.SESSION_UPDATED) {
+ if (event instanceof SessionUpdateSessionUpdated) {
+ sessionUpdatedEvent.set((SessionUpdateSessionUpdated) event);
+ }
+ sessionUpdatedLatch.countDown();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DONE) {
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ sessionUpdatedLatch.countDown();
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ sessionUpdatedLatch.countDown();
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ boolean sessionUpdated = sessionUpdatedLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(sessionUpdated, "Should receive session updated event");
+ Assertions.assertNotNull(sessionUpdatedEvent.get(), "Session updated event should not be null");
+
+ SessionUpdateSessionUpdated updatedEvent = sessionUpdatedEvent.get();
+ if (updatedEvent.getSession() != null) {
+ InputAudioFormat actualFormat = updatedEvent.getSession().getInputAudioFormat();
+ Assertions.assertEquals(inputFormat, actualFormat,
+ "Expected audio format " + inputFormat + ", got " + actualFormat);
+
+ Integer actualSamplingRate = updatedEvent.getSession().getInputAudioSamplingRate();
+ if (actualSamplingRate != null) {
+ Assertions.assertEquals(8000, actualSamplingRate.intValue(),
+ "Expected sampling rate 8000 for g711 formats, got " + actualSamplingRate);
+ }
+ }
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes(8000, 2.0)).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioResponseBytes.get() > MIN_AUDIO_BYTES_LARGE,
+ "Output audio too short for " + audioFormat + " format: " + audioResponseBytes.get() + " bytes");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @MethodSource("modelAndSamplingRateProvider")
+ @LiveOnly
+ public void testRealtimeServiceWithInputAudioSamplingRate(String model, int samplingRate)
+ throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ String audioFile = getAudioFileForSamplingRate(samplingRate);
+ byte[] audioData = loadAudioFile(audioFile);
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicReference sessionUpdatedEvent = new AtomicReference<>();
+ AtomicReference speechStartedEvent = new AtomicReference<>();
+ AtomicReference speechStoppedEvent = new AtomicReference<>();
+ CountDownLatch sessionUpdatedLatch = new CountDownLatch(1);
+ CountDownLatch speechStartedLatch = new CountDownLatch(1);
+ CountDownLatch speechStoppedLatch = new CountDownLatch(1);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-AriaNeural")))
+ .setInputAudioSamplingRate(samplingRate)
+ .setInputAudioTranscription(getSpeechRecognitionSetting(model))
+ .setInstructions(
+ "You are a helpful assistant. Please respond briefly to the user's question about lakes.")
+ .setTurnDetection(new ServerVadTurnDetection());
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.SESSION_UPDATED) {
+ if (event instanceof SessionUpdateSessionUpdated) {
+ sessionUpdatedEvent.set((SessionUpdateSessionUpdated) event);
+ }
+ sessionUpdatedLatch.countDown();
+ } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ if (event instanceof SessionUpdateInputAudioBufferSpeechStarted) {
+ speechStartedEvent.set((SessionUpdateInputAudioBufferSpeechStarted) event);
+ }
+ speechStartedLatch.countDown();
+ } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STOPPED) {
+ if (event instanceof SessionUpdateInputAudioBufferSpeechStopped) {
+ speechStoppedEvent.set((SessionUpdateInputAudioBufferSpeechStopped) event);
+ }
+ speechStoppedLatch.countDown();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DONE) {
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ sessionUpdatedLatch.countDown();
+ speechStartedLatch.countDown();
+ speechStoppedLatch.countDown();
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ sessionUpdatedLatch.countDown();
+ speechStartedLatch.countDown();
+ speechStoppedLatch.countDown();
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ boolean sessionUpdated = sessionUpdatedLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(sessionUpdated, "Should receive session updated event");
+ Assertions.assertNotNull(sessionUpdatedEvent.get(), "Session updated event should not be null");
+ if (sessionUpdatedEvent.get().getSession() != null) {
+ Integer actualSamplingRate = sessionUpdatedEvent.get().getSession().getInputAudioSamplingRate();
+ Assertions.assertEquals(samplingRate, actualSamplingRate.intValue(),
+ "Expected sampling rate " + samplingRate + ", got " + actualSamplingRate);
+ }
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes(samplingRate, 2.0)).block(SEND_TIMEOUT);
+
+ boolean speechStarted = speechStartedLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(speechStarted, "Should receive speech started event");
+ Assertions.assertNotNull(speechStartedEvent.get(), "Speech started event should not be null");
+ Assertions.assertEquals(0, speechStartedEvent.get().getAudioStartMs(), "Audio start ms should be 0");
+
+ boolean speechStopped = speechStoppedLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(speechStopped, "Should receive speech stopped event");
+ Assertions.assertNotNull(speechStoppedEvent.get(), "Speech stopped event should not be null");
+ int audioEndMs = speechStoppedEvent.get().getAudioEndMs();
+ int expectedEndMs = 1664;
+ double tolerance = 0.02;
+ Assertions.assertTrue(Math.abs(audioEndMs - expectedEndMs) <= expectedEndMs * tolerance,
+ "Audio end ms should be approximately " + expectedEndMs + " (got " + audioEndMs + ")");
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioResponseBytes.get() > MIN_AUDIO_BYTES_LARGE, "Output audio too short: "
+ + audioResponseBytes.get() + " bytes (expected > " + MIN_AUDIO_BYTES_LARGE + ")");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @Disabled
+ @MethodSource("modelAndOutputAudioFormatAzureVoiceProvider")
+ @LiveOnly
+ public void testOutputFormatsWithAzureVoice(String model, String outputFormat)
+ throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("largest_lake.wav");
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicInteger audioDoneEvents = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ OutputAudioFormat format = parseOutputAudioFormat(outputFormat);
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions().setOutputAudioFormat(format)
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-AriaNeural")))
+ .setInputAudioTranscription(getSpeechRecognitionSetting(model))
+ .setInstructions("You are a helpful assistant.")
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DONE) {
+ audioDoneEvents.incrementAndGet();
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioDoneEvents.get() >= 1, "Should receive audio done events");
+ Assertions.assertTrue(audioResponseBytes.get() > MIN_AUDIO_BYTES,
+ "Output audio too short: " + audioResponseBytes.get() + " bytes");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @MethodSource("modelAndOutputAudioFormatOpenAIVoiceProvider")
+ @LiveOnly
+ public void testOutputFormatsWithOpenAIVoice(String model, String outputFormat)
+ throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("largest_lake.wav");
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicInteger audioDoneEvents = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ OutputAudioFormat format = parseOutputAudioFormat(outputFormat);
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions().setOutputAudioFormat(format)
+ .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY)))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setInstructions("You are a helpful assistant.")
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DONE) {
+ audioDoneEvents.incrementAndGet();
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioDoneEvents.get() >= 1, "Should receive audio done events");
+ Assertions.assertTrue(audioResponseBytes.get() > MIN_AUDIO_BYTES,
+ "Output audio too short: " + audioResponseBytes.get() + " bytes");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioTests.java
new file mode 100644
index 000000000000..a4fa7c906794
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveAudioTests.java
@@ -0,0 +1,217 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AudioEchoCancellation;
+import com.azure.ai.voicelive.models.AudioNoiseReduction;
+import com.azure.ai.voicelive.models.AudioNoiseReductionType;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.InteractionModality;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Live tests for VoiceLive audio processing.
+ */
+public class VoiceLiveAudioTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1", "phi4-mm-realtime", "phi4-mini" })
+ @LiveOnly
+ public void testRealtimeServiceWithAudio(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicBoolean audioResponseReceived = new AtomicBoolean(false);
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ CountDownLatch audioResponseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16);
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ audioResponseReceived.set(true);
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ audioResponseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ audioResponseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ audioResponseLatch.countDown();
+ });
+
+ Thread.sleep(SETUP_DELAY_MS);
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ Thread.sleep(SETUP_DELAY_MS);
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+
+ boolean received = audioResponseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioResponseReceived.get(), "Should receive audio response delta events");
+ Assertions.assertTrue(audioResponseBytes.get() > 0,
+ "Should receive audio data (got " + audioResponseBytes.get() + " bytes)");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithAudioEnhancements(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicInteger speechStartedEvents = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setInputAudioNoiseReduction(
+ new AudioNoiseReduction(AudioNoiseReductionType.AZURE_DEEP_NOISE_SUPPRESSION))
+ .setInputAudioEchoCancellation(new AudioEchoCancellation());
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithEchoCancellation(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicInteger speechStartedEvents = new AtomicInteger(0);
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setInputAudioTranscription(getSpeechRecognitionSetting(model))
+ .setInputAudioEchoCancellation(new AudioEchoCancellation());
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(speechStartedEvents.get() >= 1, "Should have at least 1 speech segment");
+ Assertions.assertTrue(audioResponseBytes.get() > 0, "Audio bytes should be greater than 0");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveConversationTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveConversationTests.java
new file mode 100644
index 000000000000..63fef5b9d33a
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveConversationTests.java
@@ -0,0 +1,148 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.OpenAIVoice;
+import com.azure.ai.voicelive.models.OpenAIVoiceName;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import com.azure.core.util.BinaryData;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+/**
+ * Live tests for VoiceLive conversation item operations (retrieve, truncate).
+ */
+public class VoiceLiveConversationTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime" })
+ @LiveOnly
+ public void testRealtimeServiceRetrieveItem(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("largest_lake.wav");
+
+ AtomicBoolean outputItemReceived = new AtomicBoolean(false);
+ AtomicBoolean itemRetrieved = new AtomicBoolean(false);
+ CountDownLatch outputItemLatch = new CountDownLatch(1);
+ CountDownLatch retrieveLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setInstructions("You are a helpful assistant.")
+ .setVoice(BinaryData.fromObject(new OpenAIVoice(OpenAIVoiceName.ALLOY)));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_OUTPUT_ITEM_DONE) {
+ outputItemReceived.set(true);
+ outputItemLatch.countDown();
+ } else if (eventType == ServerEventType.CONVERSATION_ITEM_RETRIEVED) {
+ itemRetrieved.set(true);
+ retrieveLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ outputItemLatch.countDown();
+ retrieveLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ outputItemLatch.countDown();
+ retrieveLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean outputReceived = outputItemLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(outputReceived, "Should receive output item");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime" })
+ @LiveOnly
+ public void testRealtimeServiceTruncateItem(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("largest_lake.wav");
+
+ AtomicBoolean outputItemReceived = new AtomicBoolean(false);
+ AtomicBoolean itemTruncated = new AtomicBoolean(false);
+ CountDownLatch outputItemLatch = new CountDownLatch(1);
+ CountDownLatch truncateLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setInstructions("You are a helpful assistant.");
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_OUTPUT_ITEM_DONE) {
+ outputItemReceived.set(true);
+ outputItemLatch.countDown();
+ } else if (eventType == ServerEventType.CONVERSATION_ITEM_TRUNCATED) {
+ itemTruncated.set(true);
+ truncateLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ outputItemLatch.countDown();
+ truncateLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ outputItemLatch.countDown();
+ truncateLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+
+ boolean outputReceived = outputItemLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(outputReceived, "Should receive output item");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveSessionTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveSessionTests.java
new file mode 100644
index 000000000000..2b4c9c59c0ad
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveSessionTests.java
@@ -0,0 +1,83 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.InteractionModality;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.SessionUpdateSessionUpdated;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Live tests for VoiceLive session management.
+ */
+public class VoiceLiveSessionTests extends VoiceLiveTestBase {
+
+ @Test
+ @LiveOnly
+ public void testSessionUpdateEventIsReceived() throws InterruptedException {
+ VoiceLiveAsyncClient client = createClient();
+
+ AtomicBoolean sessionUpdatedReceived = new AtomicBoolean(false);
+ AtomicReference receivedEvent = new AtomicReference<>();
+ CountDownLatch eventLatch = new CountDownLatch(1);
+ VoiceLiveSessionAsyncClient session = null;
+
+ try {
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setInstructions("You are a helpful AI assistant for testing.")
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16);
+
+ session = client.startSession(TEST_MODEL).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+ Assertions.assertTrue(session.isConnected(), "Session should be connected");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.SESSION_UPDATED) {
+ sessionUpdatedReceived.set(true);
+ if (event instanceof SessionUpdateSessionUpdated) {
+ receivedEvent.set((SessionUpdateSessionUpdated) event);
+ }
+ eventLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ eventLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ eventLatch.countDown();
+ });
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ boolean received = eventLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive an event within timeout");
+ Assertions.assertTrue(sessionUpdatedReceived.get(), "Should receive session.updated event");
+ Assertions.assertNotNull(receivedEvent.get(), "Received event should not be null");
+ Assertions.assertEquals(ServerEventType.SESSION_UPDATED, receivedEvent.get().getType());
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ } finally {
+ closeSession(session);
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTestBase.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTestBase.java
new file mode 100644
index 000000000000..2a9d6f82775c
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTestBase.java
@@ -0,0 +1,196 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveClientBuilder;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptions;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.OutputAudioFormat;
+import com.azure.ai.voicelive.models.SessionUpdate;
+import com.azure.ai.voicelive.models.SessionUpdateError;
+import com.azure.core.credential.KeyCredential;
+import com.azure.core.test.TestProxyTestBase;
+import com.azure.core.util.BinaryData;
+import com.azure.core.util.Configuration;
+import org.junit.jupiter.api.Assertions;
+
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.time.Duration;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * Base class for VoiceLive live tests with shared utilities.
+ */
+@SuppressWarnings("unused")
+public abstract class VoiceLiveTestBase extends TestProxyTestBase {
+
+ // Model constants
+ protected static final String MODEL_GPT_4O = "gpt-4o";
+ protected static final String MODEL_GPT_4O_REALTIME = "gpt-4o-realtime";
+ protected static final String MODEL_GPT_4O_REALTIME_PREVIEW = "gpt-4o-realtime-preview";
+ protected static final String MODEL_GPT_4O_REALTIME_PREVIEW_2025_06_03 = "gpt-4o-realtime-preview-2025-06-03";
+ protected static final String MODEL_GPT_41 = "gpt-4.1";
+ protected static final String MODEL_GPT_5 = "gpt-5";
+ protected static final String MODEL_GPT_5_CHAT = "gpt-5-chat";
+ protected static final String MODEL_PHI4_MM_REALTIME = "phi4-mm-realtime";
+ protected static final String MODEL_PHI4_MINI = "phi4-mini";
+
+ // Default models for non-parameterized tests
+ protected static final String TEST_MODEL = MODEL_GPT_4O;
+ protected static final String TEST_MODEL_REALTIME = MODEL_GPT_4O_REALTIME_PREVIEW;
+
+ // Timeout constants
+ protected static final Duration SESSION_TIMEOUT = Duration.ofSeconds(30);
+ protected static final Duration SEND_TIMEOUT = Duration.ofSeconds(10);
+ protected static final int EVENT_TIMEOUT_SECONDS = 60;
+ protected static final int SETUP_DELAY_MS = 2000;
+
+ // Audio thresholds
+ protected static final int MIN_AUDIO_BYTES = 10 * 1024;
+ protected static final int MIN_AUDIO_BYTES_LARGE = 50 * 1000;
+
+ // Default silence settings
+ protected static final int DEFAULT_SAMPLE_RATE = 24000;
+ protected static final double DEFAULT_SILENCE_DURATION = 2.0;
+
+ protected String getEndpoint() {
+ String endpoint = Configuration.getGlobalConfiguration().get("AI_SERVICES_ENDPOINT");
+ if (endpoint == null || endpoint.trim().isEmpty()) {
+ Assertions.fail("AI_SERVICES_ENDPOINT environment variable must be set and not empty.");
+ }
+ return endpoint;
+ }
+
+ protected String getApiKey() {
+ String apiKey = Configuration.getGlobalConfiguration().get("AI_SERVICES_KEY");
+ if (apiKey == null || apiKey.trim().isEmpty()) {
+ Assertions.fail("AI_SERVICES_KEY environment variable must be set and not empty.");
+ }
+ return apiKey;
+ }
+
+ protected VoiceLiveAsyncClient createClient() {
+ return new VoiceLiveClientBuilder().endpoint(getEndpoint())
+ .credential(new KeyCredential(getApiKey()))
+ .buildAsyncClient();
+ }
+
+ protected byte[] loadAudioFile(String filename) throws IOException {
+ Path testResourcesPath = Paths.get("test-resources", filename);
+ if (Files.exists(testResourcesPath)) {
+ return Files.readAllBytes(testResourcesPath);
+ }
+
+ try (InputStream is = getClass().getClassLoader().getResourceAsStream(filename)) {
+ if (is != null) {
+ return readAllBytes(is);
+ }
+ }
+
+ Path srcTestResourcesPath = Paths.get("src", "test", "resources", filename);
+ if (Files.exists(srcTestResourcesPath)) {
+ return Files.readAllBytes(srcTestResourcesPath);
+ }
+
+ throw new IOException("Could not find audio file: " + filename);
+ }
+
+ protected byte[] readAllBytes(InputStream is) throws IOException {
+ ByteArrayOutputStream buffer = new ByteArrayOutputStream();
+ int bytesRead;
+ byte[] data = new byte[8192];
+ while ((bytesRead = is.read(data, 0, data.length)) != -1) {
+ buffer.write(data, 0, bytesRead);
+ }
+ return buffer.toByteArray();
+ }
+
+ protected byte[] getTrailingSilenceBytes(int sampleRate, double durationSeconds) {
+ int numSamples = (int) (sampleRate * durationSeconds);
+ return new byte[numSamples * 2];
+ }
+
+ protected byte[] getTrailingSilenceBytes() {
+ return getTrailingSilenceBytes(DEFAULT_SAMPLE_RATE, DEFAULT_SILENCE_DURATION);
+ }
+
+ protected void handleError(SessionUpdate event) {
+ if (event instanceof SessionUpdateError) {
+ SessionUpdateError errorEvent = (SessionUpdateError) event;
+ System.err.println(
+ "Error in session: " + errorEvent.getError().getCode() + " - " + errorEvent.getError().getMessage());
+ }
+ }
+
+ protected AudioInputTranscriptionOptions getSpeechRecognitionSetting(String model) {
+ AudioInputTranscriptionOptionsModel transcriptionModel
+ = model.startsWith("gpt-4o-realtime") || model.startsWith("gpt-4o-mini-realtime")
+ ? AudioInputTranscriptionOptionsModel.WHISPER_1
+ : AudioInputTranscriptionOptionsModel.AZURE_SPEECH;
+ return new AudioInputTranscriptionOptions(transcriptionModel).setLanguage("en-US");
+ }
+
+ protected OutputAudioFormat parseOutputAudioFormat(String format) {
+ return OutputAudioFormat.fromString(format);
+ }
+
+ protected InputAudioFormat parseInputAudioFormat(String format) {
+ return "g711_ulaw".equals(format) ? InputAudioFormat.G711_ULAW : InputAudioFormat.G711_ALAW;
+ }
+
+ protected String getAudioFileForSamplingRate(int samplingRate) {
+ switch (samplingRate) {
+ case 16000:
+ return "largest_lake.16kHz.wav";
+
+ case 44100:
+ return "largest_lake.44kHz.wav";
+
+ case 8000:
+ default:
+ return "largest_lake.8kHz.wav";
+ }
+ }
+
+ protected void closeSession(VoiceLiveSessionAsyncClient session) {
+ if (session != null) {
+ try {
+ session.close();
+ } catch (Exception e) {
+ System.err.println("Error closing session: " + e.getMessage());
+ }
+ }
+ }
+
+ protected void waitForSetup() throws InterruptedException {
+ Thread.sleep(SETUP_DELAY_MS);
+ }
+
+ protected BinaryData createFunctionParameters(String... requiredFields) {
+ Map params = new HashMap<>();
+ params.put("type", "object");
+
+ Map properties = new HashMap<>();
+ for (String field : requiredFields) {
+ Map fieldDef = new HashMap<>();
+ fieldDef.put("type", "string");
+ fieldDef.put("description", "The " + field + " parameter.");
+ properties.put(field, fieldDef);
+ }
+ params.put("properties", properties);
+ params.put("required", Arrays.asList(requiredFields));
+
+ return BinaryData.fromObject(params);
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveToolCallTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveToolCallTests.java
new file mode 100644
index 000000000000..8e9e66e4d728
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveToolCallTests.java
@@ -0,0 +1,461 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptions;
+import com.azure.ai.voicelive.models.AudioInputTranscriptionOptionsModel;
+import com.azure.ai.voicelive.models.AzureStandardVoice;
+import com.azure.ai.voicelive.models.ClientEventConversationItemCreate;
+import com.azure.ai.voicelive.models.ClientEventResponseCreate;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.FunctionCallOutputItem;
+import com.azure.ai.voicelive.models.ItemType;
+import com.azure.ai.voicelive.models.ResponseFunctionCallItem;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.ServerVadTurnDetection;
+import com.azure.ai.voicelive.models.SessionUpdateConversationItemCreated;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioTranscriptDone;
+import com.azure.ai.voicelive.models.SessionUpdateResponseFunctionCallArgumentsDone;
+import com.azure.ai.voicelive.models.ToolChoiceFunctionSelection;
+import com.azure.ai.voicelive.models.VoiceLiveFunctionDefinition;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.ai.voicelive.models.VoiceLiveToolDefinition;
+import com.azure.core.test.annotation.LiveOnly;
+import com.azure.core.util.BinaryData;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Live tests for VoiceLive tool/function call features.
+ */
+public class VoiceLiveToolCallTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime", "gpt-4o" })
+ @LiveOnly
+ public void testRealtimeServiceToolCall(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("ask_weather.wav");
+
+ AtomicBoolean functionCallReceived = new AtomicBoolean(false);
+ List functionCallArguments = new ArrayList<>();
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveFunctionDefinition weatherTool
+ = new VoiceLiveFunctionDefinition("get_weather").setDescription("Get the weather for a given location.")
+ .setParameters(createFunctionParameters("location"));
+
+ List tools = Arrays.asList(weatherTool);
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setInstructions(
+ "You are a helpful assistant with tools. If asked about weather, call get_weather function.")
+ .setTools(tools)
+ .setToolChoice(BinaryData.fromString("auto"))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.CONVERSATION_ITEM_CREATED) {
+ if (event instanceof SessionUpdateConversationItemCreated) {
+ SessionUpdateConversationItemCreated itemCreated = (SessionUpdateConversationItemCreated) event;
+ if (itemCreated.getItem() != null
+ && itemCreated.getItem().getType() == ItemType.FUNCTION_CALL) {
+ functionCallReceived.set(true);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE) {
+ if (event instanceof SessionUpdateResponseFunctionCallArgumentsDone) {
+ SessionUpdateResponseFunctionCallArgumentsDone funcDone
+ = (SessionUpdateResponseFunctionCallArgumentsDone) event;
+ functionCallArguments.add(funcDone.getArguments());
+ }
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(functionCallReceived.get(), "Should receive function call item created event");
+ Assertions.assertFalse(functionCallArguments.isEmpty(), "Should have function call arguments");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o", "gpt-5-chat" })
+ @LiveOnly
+ public void testRealtimeServiceToolChoice(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("ask_weather.wav");
+
+ AtomicReference functionNameCalled = new AtomicReference<>();
+ AtomicReference functionArguments = new AtomicReference<>();
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveFunctionDefinition weatherTool
+ = new VoiceLiveFunctionDefinition("get_weather").setDescription("Get the weather for a given location.")
+ .setParameters(createFunctionParameters("location"));
+
+ VoiceLiveFunctionDefinition timeTool = new VoiceLiveFunctionDefinition("get_time")
+ .setDescription("Get the current time in a given location.")
+ .setParameters(createFunctionParameters("location"));
+
+ List tools = Arrays.asList(weatherTool, timeTool);
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setInstructions("You are a helpful assistant with tools.")
+ .setTools(tools)
+ .setToolChoice(BinaryData.fromObject(new ToolChoiceFunctionSelection("get_time")))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE) {
+ if (event instanceof SessionUpdateResponseFunctionCallArgumentsDone) {
+ SessionUpdateResponseFunctionCallArgumentsDone funcDone
+ = (SessionUpdateResponseFunctionCallArgumentsDone) event;
+ functionNameCalled.set(funcDone.getName());
+ functionArguments.set(funcDone.getArguments());
+ }
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertEquals("get_time", functionNameCalled.get(),
+ "Should call get_time function as forced by tool_choice");
+ Assertions.assertNotNull(functionArguments.get(), "Should have function arguments");
+ Assertions.assertTrue(functionArguments.get().contains("北京") || functionArguments.get().contains("Beijing"),
+ "Arguments should contain Beijing location, got: " + functionArguments.get());
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o", "gpt-4o-realtime" })
+ @LiveOnly
+ public void testLiveSessionUpdateWithTools(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("ask_weather.wav");
+
+ AtomicInteger firstResponseBytes = new AtomicInteger(0);
+ AtomicReference functionCallName = new AtomicReference<>();
+ CountDownLatch firstResponseLatch = new CountDownLatch(1);
+ CountDownLatch functionCallLatch = new CountDownLatch(1);
+ AtomicBoolean waitingForFunctionCall = new AtomicBoolean(false);
+
+ try {
+ VoiceLiveSessionOptions initialSession = new VoiceLiveSessionOptions()
+ .setInstructions("You are a helpful assistant that can answer questions.")
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-AvaMultilingualNeural")))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_TRANSCRIPT_DONE) {
+ if (!waitingForFunctionCall.get()) {
+ firstResponseLatch.countDown();
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null && !waitingForFunctionCall.get()) {
+ firstResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE) {
+ if (event instanceof SessionUpdateResponseFunctionCallArgumentsDone) {
+ SessionUpdateResponseFunctionCallArgumentsDone funcDone
+ = (SessionUpdateResponseFunctionCallArgumentsDone) event;
+ functionCallName.set(funcDone.getName());
+ }
+ functionCallLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ firstResponseLatch.countDown();
+ functionCallLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ firstResponseLatch.countDown();
+ functionCallLatch.countDown();
+ });
+
+ waitForSetup();
+
+ session.sendEvent(new ClientEventSessionUpdate(initialSession)).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean firstReceived = firstResponseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(firstReceived, "Should receive first response");
+ Assertions.assertTrue(firstResponseBytes.get() > 0, "First response should have audio");
+
+ waitingForFunctionCall.set(true);
+
+ VoiceLiveFunctionDefinition weatherTool
+ = new VoiceLiveFunctionDefinition("get_weather").setDescription("Get the weather for a given location.")
+ .setParameters(createFunctionParameters("location"));
+
+ VoiceLiveSessionOptions updatedSession = new VoiceLiveSessionOptions()
+ .setInstructions("You are a helpful assistant with tools.")
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-AvaMultilingualNeural")))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setTools(Arrays.asList(weatherTool))
+ .setToolChoice(BinaryData.fromString("auto"))
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ session.sendEvent(new ClientEventSessionUpdate(updatedSession)).block(SEND_TIMEOUT);
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean functionCallReceived = functionCallLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(functionCallReceived, "Should receive function call");
+ Assertions.assertEquals("get_weather", functionCallName.get(), "Should call get_weather function");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4.1", "gpt-5", "phi4-mm-realtime" })
+ @LiveOnly
+ public void testRealtimeServiceToolCallParameter(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("ask_weather.wav");
+
+ AtomicReference functionCallName = new AtomicReference<>();
+ AtomicReference functionArguments = new AtomicReference<>();
+ AtomicReference callId = new AtomicReference<>();
+ AtomicReference previousItemId = new AtomicReference<>();
+ AtomicReference finalTranscript = new AtomicReference<>();
+ CountDownLatch functionCallLatch = new CountDownLatch(1);
+ CountDownLatch responseDoneLatch = new CountDownLatch(1);
+ CountDownLatch finalResponseLatch = new CountDownLatch(1);
+ AtomicBoolean waitingForFinalResponse = new AtomicBoolean(false);
+
+ try {
+ Map params = new HashMap<>();
+ params.put("type", "object");
+ Map properties = new HashMap<>();
+ Map locationProp = new HashMap<>();
+ locationProp.put("type", "string");
+ locationProp.put("description", "The location to get the weather for.");
+ properties.put("location", locationProp);
+ params.put("properties", properties);
+ params.put("required", Arrays.asList("location"));
+
+ VoiceLiveFunctionDefinition weatherTool = new VoiceLiveFunctionDefinition("get_weather")
+ .setDescription("Retrieve the weather of given location.")
+ .setParameters(BinaryData.fromObject(params));
+
+ List tools = Arrays.asList(weatherTool);
+
+ String instructions = "You are a helpful assistant with tools.";
+ if (!"phi4-mm-realtime".equals(model)) {
+ instructions
+ += " If you are asked about the weather, please respond with `I will get the weather for you. Please wait a moment.` and then call the get_weather function with the location parameter.";
+ }
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions().setInstructions(instructions)
+ .setTools(tools)
+ .setToolChoice(BinaryData.fromString("auto"))
+ .setInputAudioTranscription(
+ new AudioInputTranscriptionOptions(AudioInputTranscriptionOptionsModel.WHISPER_1))
+ .setTurnDetection(
+ new ServerVadTurnDetection().setThreshold(0.5).setPrefixPaddingMs(300).setSilenceDurationMs(200));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.CONVERSATION_ITEM_CREATED) {
+ if (event instanceof SessionUpdateConversationItemCreated) {
+ SessionUpdateConversationItemCreated itemCreated = (SessionUpdateConversationItemCreated) event;
+ if (itemCreated.getItem() != null
+ && itemCreated.getItem().getType() == ItemType.FUNCTION_CALL) {
+ ResponseFunctionCallItem funcItem = (ResponseFunctionCallItem) itemCreated.getItem();
+ callId.set(funcItem.getCallId());
+ previousItemId.set(funcItem.getId());
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_FUNCTION_CALL_ARGUMENTS_DONE) {
+ if (event instanceof SessionUpdateResponseFunctionCallArgumentsDone) {
+ SessionUpdateResponseFunctionCallArgumentsDone funcDone
+ = (SessionUpdateResponseFunctionCallArgumentsDone) event;
+ functionCallName.set(funcDone.getName());
+ functionArguments.set(funcDone.getArguments());
+ }
+ functionCallLatch.countDown();
+ } else if (eventType == ServerEventType.RESPONSE_DONE) {
+ if (!waitingForFinalResponse.get()) {
+ responseDoneLatch.countDown();
+ } else {
+ finalResponseLatch.countDown();
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_TRANSCRIPT_DONE) {
+ if (waitingForFinalResponse.get() && event instanceof SessionUpdateResponseAudioTranscriptDone) {
+ SessionUpdateResponseAudioTranscriptDone transcriptDone
+ = (SessionUpdateResponseAudioTranscriptDone) event;
+ finalTranscript.set(transcriptDone.getTranscript());
+ }
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ functionCallLatch.countDown();
+ responseDoneLatch.countDown();
+ finalResponseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ functionCallLatch.countDown();
+ responseDoneLatch.countDown();
+ finalResponseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean functionCallReceived = functionCallLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(functionCallReceived, "Should receive function call within timeout");
+ Assertions.assertEquals("get_weather", functionCallName.get(), "Should call get_weather function");
+ Assertions.assertNotNull(functionArguments.get(), "Should have function arguments");
+ Assertions.assertTrue(functionArguments.get().contains("北京") || functionArguments.get().contains("Beijing"),
+ "Arguments should contain Beijing location, got: " + functionArguments.get());
+
+ boolean firstResponseDone = responseDoneLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(firstResponseDone, "Should receive first response done");
+
+ waitingForFinalResponse.set(true);
+
+ String toolOutput = "{\"location\": \"Beijing\", \"weather\": \"sunny\", \"temp_c\": 25}";
+
+ FunctionCallOutputItem outputItem = new FunctionCallOutputItem(callId.get(), toolOutput);
+ ClientEventConversationItemCreate createItemEvent
+ = new ClientEventConversationItemCreate().setItem(outputItem).setPreviousItemId(previousItemId.get());
+ session.sendEvent(createItemEvent).block(SEND_TIMEOUT);
+
+ session.sendEvent(new ClientEventResponseCreate()).block(SEND_TIMEOUT);
+
+ boolean finalResponseReceived = finalResponseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+ Assertions.assertTrue(finalResponseReceived, "Should receive final response within timeout");
+
+ Assertions.assertNotNull(finalTranscript.get(), "Should have final transcript");
+ boolean hasSunny = finalTranscript.get().contains("æ™´") || finalTranscript.get().contains("sunny");
+ boolean hasTemp = finalTranscript.get().contains("25");
+ Assertions.assertTrue(hasSunny || hasTemp,
+ "Transcript should contain weather info (sunny/æ™´ or 25), got: " + finalTranscript.get());
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTranscriptionTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTranscriptionTests.java
new file mode 100644
index 000000000000..4c1253146e5e
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTranscriptionTests.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.InteractionModality;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.SessionUpdateConversationItemInputAudioTranscriptionCompleted;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicReference;
+
+/**
+ * Live tests for VoiceLive transcription features.
+ */
+public class VoiceLiveTranscriptionTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testInputAudioTranscriptionWithWhisper(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicBoolean transcriptionReceived = new AtomicBoolean(false);
+ AtomicReference transcriptText = new AtomicReference<>("");
+ CountDownLatch transcriptionLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16)
+ .setInputAudioTranscription(getSpeechRecognitionSetting(model));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.CONVERSATION_ITEM_INPUT_AUDIO_TRANSCRIPTION_COMPLETED) {
+ transcriptionReceived.set(true);
+ if (event instanceof SessionUpdateConversationItemInputAudioTranscriptionCompleted) {
+ SessionUpdateConversationItemInputAudioTranscriptionCompleted transcriptionEvent
+ = (SessionUpdateConversationItemInputAudioTranscriptionCompleted) event;
+ if (transcriptionEvent.getTranscript() != null) {
+ transcriptText.set(transcriptionEvent.getTranscript());
+ }
+ }
+ transcriptionLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ transcriptionLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ transcriptionLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = transcriptionLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive transcription within timeout");
+ Assertions.assertTrue(transcriptionReceived.get(), "Should receive transcription completed event");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTurnDetectionTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTurnDetectionTests.java
new file mode 100644
index 000000000000..6569ca131a1a
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveTurnDetectionTests.java
@@ -0,0 +1,344 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AzureSemanticVadTurnDetection;
+import com.azure.ai.voicelive.models.AzureSemanticVadTurnDetectionMultilingual;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.InputAudioFormat;
+import com.azure.ai.voicelive.models.InteractionModality;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Live tests for VoiceLive turn detection and VAD features.
+ */
+public class VoiceLiveTurnDetectionTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithoutTurnDetection(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicBoolean speechStartedReceived = new AtomicBoolean(false);
+ AtomicBoolean speechStoppedReceived = new AtomicBoolean(false);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16);
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedReceived.set(true);
+ } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STOPPED) {
+ speechStoppedReceived.set(true);
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(speechStartedReceived.get(), "Should receive speech started event");
+ Assertions.assertTrue(speechStoppedReceived.get(), "Should receive speech stopped event");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithSemanticVadMultilingual(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicInteger speechStartedEvents = new AtomicInteger(0);
+ AtomicInteger speechStoppedEvents = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16)
+ .setTurnDetection(new AzureSemanticVadTurnDetection());
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STOPPED) {
+ speechStoppedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(speechStartedEvents.get() >= 1, "Should have at least 1 speech started event");
+ Assertions.assertTrue(speechStoppedEvents.get() >= 1, "Should have at least 1 speech stopped event");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithFillerWordRemoval(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicBoolean audioResponseReceived = new AtomicBoolean(false);
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setInputAudioFormat(InputAudioFormat.PCM16)
+ .setTurnDetection(new AzureSemanticVadTurnDetection().setRemoveFillerWords(true));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ audioResponseReceived.set(true);
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioResponseReceived.get(), "Should receive audio response delta events");
+ Assertions.assertTrue(audioResponseBytes.get() > 0, "Should receive audio data");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4o-realtime" })
+ @LiveOnly
+ public void testRealtimeServiceWithAzureSemanticVadMultilingual(String model)
+ throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicInteger speechStartedEvents = new AtomicInteger(0);
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ CountDownLatch responseLatch = new CountDownLatch(1);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setTurnDetection(new AzureSemanticVadTurnDetectionMultilingual());
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(audioResponseBytes.get() > 0, "Should receive audio bytes");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @Test
+ @LiveOnly
+ public void testRealtimeServiceWithFillerWordRemovalSpecial() throws InterruptedException, IOException {
+ String model = "gpt-4o-realtime-preview";
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("filler_word_24kHz.wav");
+
+ AtomicInteger speechStartedEvents = new AtomicInteger(0);
+ AtomicBoolean collectingEvents = new AtomicBoolean(true);
+
+ try {
+ AzureSemanticVadTurnDetection turnDetection
+ = new AzureSemanticVadTurnDetection().setRemoveFillerWords(true);
+
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setModalities(Arrays.asList(InteractionModality.TEXT, InteractionModality.AUDIO))
+ .setTurnDetection(turnDetection);
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ if (!collectingEvents.get()) {
+ return;
+ }
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.INPUT_AUDIO_BUFFER_SPEECH_STARTED) {
+ speechStartedEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+
+ Thread.sleep(10000);
+ collectingEvents.set(false);
+
+ Assertions.assertEquals(0, speechStartedEvents.get(),
+ "Should have no speech started events when filler words are removed");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveVoicePropertiesTests.java b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveVoicePropertiesTests.java
new file mode 100644
index 000000000000..ac07a49acda1
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/java/com/azure/ai/voicelive/livetests/VoiceLiveVoicePropertiesTests.java
@@ -0,0 +1,168 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.voicelive.livetests;
+
+import com.azure.ai.voicelive.VoiceLiveAsyncClient;
+import com.azure.ai.voicelive.VoiceLiveSessionAsyncClient;
+import com.azure.ai.voicelive.models.AnimationOptions;
+import com.azure.ai.voicelive.models.AnimationOutputType;
+import com.azure.ai.voicelive.models.AudioTimestampType;
+import com.azure.ai.voicelive.models.AzureStandardVoice;
+import com.azure.ai.voicelive.models.ClientEventSessionUpdate;
+import com.azure.ai.voicelive.models.ServerEventType;
+import com.azure.ai.voicelive.models.SessionUpdateResponseAudioDelta;
+import com.azure.ai.voicelive.models.VoiceLiveSessionOptions;
+import com.azure.core.test.annotation.LiveOnly;
+import com.azure.core.util.BinaryData;
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.params.ParameterizedTest;
+import org.junit.jupiter.params.provider.ValueSource;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * Live tests for VoiceLive voice properties and animation features.
+ */
+public class VoiceLiveVoicePropertiesTests extends VoiceLiveTestBase {
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime", "gpt-4.1", "phi4-mm-realtime" })
+ @LiveOnly
+ public void testRealtimeServiceWithVoiceProperties(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("largest_lake.wav");
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicInteger contentPartAddedEvents = new AtomicInteger(0);
+ java.util.concurrent.CountDownLatch responseLatch = new java.util.concurrent.CountDownLatch(1);
+
+ try {
+ AzureStandardVoice voice = new AzureStandardVoice("en-us-emma:DragonHDLatestNeural").setTemperature(0.7)
+ .setRate("1.2")
+ .setPreferLocales(Arrays.asList("en-IN"));
+
+ VoiceLiveSessionOptions sessionOptions
+ = new VoiceLiveSessionOptions().setVoice(BinaryData.fromObject(voice))
+ .setInputAudioTranscription(getSpeechRecognitionSetting(model));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_CONTENT_PART_ADDED) {
+ contentPartAddedEvents.incrementAndGet();
+ responseLatch.countDown();
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ responseLatch.countDown();
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ responseLatch.countDown();
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+ session.sendInputAudio(getTrailingSilenceBytes()).block(SEND_TIMEOUT);
+
+ boolean received = responseLatch.await(EVENT_TIMEOUT_SECONDS, java.util.concurrent.TimeUnit.SECONDS);
+
+ Assertions.assertTrue(received, "Should receive response within timeout");
+ Assertions.assertTrue(contentPartAddedEvents.get() >= 1, "Should receive content part added events");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "gpt-4o-realtime-preview", "gpt-4.1" })
+ @LiveOnly
+ public void testRealtimeServiceWithAudioTimestampAndViseme(String model) throws InterruptedException, IOException {
+ VoiceLiveAsyncClient client = createClient();
+
+ byte[] audioData = loadAudioFile("4-1.wav");
+
+ AtomicInteger audioResponseBytes = new AtomicInteger(0);
+ AtomicInteger timestampEvents = new AtomicInteger(0);
+ AtomicInteger visemeEvents = new AtomicInteger(0);
+ AtomicBoolean collectingEvents = new AtomicBoolean(true);
+
+ try {
+ VoiceLiveSessionOptions sessionOptions = new VoiceLiveSessionOptions()
+ .setVoice(BinaryData.fromObject(new AzureStandardVoice("en-US-NancyNeural")))
+ .setAnimation(new AnimationOptions().setOutputs(Arrays.asList(AnimationOutputType.VISEME_ID)))
+ .setOutputAudioTimestampTypes(Arrays.asList(AudioTimestampType.WORD));
+
+ VoiceLiveSessionAsyncClient session = client.startSession(model).block(SESSION_TIMEOUT);
+
+ Assertions.assertNotNull(session, "Session should be created successfully");
+
+ session.receiveEvents().subscribe(event -> {
+ if (!collectingEvents.get()) {
+ return;
+ }
+ ServerEventType eventType = event.getType();
+
+ if (eventType == ServerEventType.RESPONSE_AUDIO_DELTA) {
+ if (event instanceof SessionUpdateResponseAudioDelta) {
+ SessionUpdateResponseAudioDelta audioDelta = (SessionUpdateResponseAudioDelta) event;
+ if (audioDelta.getDelta() != null) {
+ audioResponseBytes.addAndGet(audioDelta.getDelta().length);
+ }
+ }
+ } else if (eventType == ServerEventType.RESPONSE_AUDIO_TIMESTAMP_DELTA) {
+ timestampEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.RESPONSE_ANIMATION_VISEME_DELTA) {
+ visemeEvents.incrementAndGet();
+ } else if (eventType == ServerEventType.ERROR) {
+ handleError(event);
+ }
+ }, error -> {
+ System.err.println("Error receiving events: " + error.getMessage());
+ });
+
+ waitForSetup();
+
+ ClientEventSessionUpdate updateEvent = new ClientEventSessionUpdate(sessionOptions);
+ session.sendEvent(updateEvent).block(SEND_TIMEOUT);
+
+ waitForSetup();
+
+ session.sendInputAudio(audioData).block(SEND_TIMEOUT);
+
+ Thread.sleep(10000);
+ collectingEvents.set(false);
+
+ Assertions.assertTrue(audioResponseBytes.get() > 0, "Should receive audio bytes");
+ Assertions.assertTrue(timestampEvents.get() > 0, "Should receive audio timestamp events");
+ Assertions.assertTrue(visemeEvents.get() > 0, "Should receive viseme events");
+
+ session.close();
+ } catch (Exception e) {
+ Assertions.fail("Test failed with exception: " + e.getMessage());
+ }
+ }
+}
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/4-1.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/4-1.wav
new file mode 100644
index 000000000000..6207bdbc95d1
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/4-1.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.mp3 b/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.mp3
new file mode 100644
index 000000000000..60aef6262d45
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.mp3 differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.wav
new file mode 100644
index 000000000000..b94b098c6738
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/ask_weather.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/filler_word_24kHz.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/filler_word_24kHz.wav
new file mode 100644
index 000000000000..0d804c5e9882
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/filler_word_24kHz.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.16kHz.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.16kHz.wav
new file mode 100644
index 000000000000..3e94e899a2fe
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.16kHz.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.44kHz.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.44kHz.wav
new file mode 100644
index 000000000000..568d2ac27e26
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.44kHz.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.8kHz.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.8kHz.wav
new file mode 100644
index 000000000000..e7c32075f414
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.8kHz.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.alaw b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.alaw
new file mode 100644
index 000000000000..b3b36f491a55
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.alaw differ
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.ulaw b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.ulaw
new file mode 100644
index 000000000000..e88beb94cb76
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.ulaw
@@ -0,0 +1,7 @@
+ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿ~ÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿÿÿ~~~~~~~~~~~~~~~~~~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~ÿ~~~ÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ~~~~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿþÿÿþÿþÿþþÿÿÿþþþþÿÿÿÿþþþ~~~~}~~~~~~~~~}}}}~~~}~~~~~~~}}}~~ÿÿ~}}~~~}}}~~}~~~}}|}~ÿþÿ~~~~þýüüýýýþþ~}|{zyz|{{zyz|~þûøöõööö÷øø÷øøúüý~|{zyxz{|}}~ýüüüüüûøø÷ööùüÿ~~ÿþÿ}{|}}ÿýüùöñïïîîðôúÿ{wronnnljihhhgghijmnryÿûôëæååçééêêìííòøý{vrnkhgfedcddegilr{÷íçâÞÜÚÙØ×רÙÛßçôn^UMHB=:767:>FRuÕÆ½¸´±¯¯°±´¸¼ÂÌÜnSF=83/-,+,.7?KhàÔÈÀ½º¸¸¹¹¹º¼½¾ÀÁÂÂÄÆÉÍÓÞ}ZMD>:630//037;AKZõ×ËÄ¿½»¹·¶µ¶·¸¹»½ÁÈÏâ`K>70-*(((+/4:@J[æÌÁ»·³°®®®®®®®®®¯´¹¿ÊÛmN>4.+(%##%*/7=DNdÜȾ¹µ³°¯¯¯¯¯¯®®®¯´»ÄÏæcM?6/,($! $+5=FP^|ØÈ½¹·²¯²±®®¯±±¯®¯´»ÂÊ×ZB:3-(# ,>nɾ¿ÆÊÇ¿¹·³²µ··¸¸µ²±®®°·¿ÔX?7/,($"6Ë®§©¯¼Èɽ¸²³·½Ã˹°«§¦§¹ØF4-(% .¶œ–˜žÅÚɼ¹ÁïLJp¼«¢žž¢©·ÐJ4*"
Ï“’—¡µÄÍÉÔI42@¼¦œž£§ª®¶á2!
8¥””›«¼ÆÏb?18Ö©œ˜› ©¬¬»W(
!¹–“𦵴»å:*.Ç£–•šŸ§©¦«Ë0
+- ™¦µ±¬¾:%$P£—”𣣠£ß'
+ N›‘—¦ª§ ª?"!9¦™›Ÿ§£™™ŸÄ+$)#
+
+5£™œ¥¢œž±/*Ú¥£§¡œ™ž¯h<;8
6¬œŸžªÙ,(F½«§¨¡¡¯Íáy?#2®Ÿšª×.0wı«¨Ÿž£©·ÃÃN)
(¼¢ž¡›™¢¶>2ùǹ¯¬¡ž¤©µ¾À7
+J·¬¢˜–ž°çå»ÂÝɯ¢ž¤«º."?À—›¢°¸²Ä̾©£ª¯±Æ)!.û¢˜šŸ¥ ž©ºË»¬®ÀÑÿ>#0¿¤Ÿ ¢Ÿ¡¬´·²¶ÜdXA1"/87:>hÌÒôª««©¬»¾¾ÓSK@7307=<;99>HZãɽºº¼¼½½ÁÈÎÙëgPF@==<;<=@DLXcìÚÓÌÉÇÄÄÅÈÎÓÙáðqg\UQNNNNNOT^pïßÖÏÌËËËËÍÏÔÙÞçðýuponnmnmlpüëãÞÛÚÙ×ÖÕÖÖרÛäòzmkjs|~ýùóíìéèåæéìïññïìíëíòø{ts{ùýûûùöóðððïùzrmklmnqtsrpqr}ñòïîïïðòóóñù{rmjgffghhggiov~ùñìêéêêêíô}rlgcaabcdegjmrzüôïîîîïïððò÷þumidbabcdfhjnsþöïíìêêêëíðõýxplifdcddefjns{ÿúóïíììììîðõü{uokjhfeefgilpxþúôðïîïðóööû}yuspnnmnmnttqu{xyúùüúùýý}wqûîó|{ó}rÜõgxlinwrþqntþïïûõíïùøðôÿý}wÿyqusvÿvmwyýw}óùöúññøõûø|xxqqvvpvzyz|úþù|~íí÷ýïìõ~}ðÿwyvy}pz|~úôít~íæûôãëïþüíì~{úûþøìþpxìî{ïøzöü|}þîróïrüûð|qþü}pÿ÷~x}õûrrëïmþñò}õ}õèon÷ùvqýèïûqjnýëuøðëîigíçzìëþpzuj}úuúë~ùjrpox÷åöz{vìæmykc}mq{èáåhekfóçxk}ðtlfñíýõólRXtâøP`ÕÖcäÍ_RRZwycßÞc^týûaWjålüÙàýku}pb`þåwèâñïèohiqänZZäåwlëéboj^]köíòä}|ðWXzw`sÞú}qkúìY`äonÖæXXðÚêèwpå]pòìÞþxa[uëðçèåâãÐÎåoìéqlooiúêçÜÓÓ{óÑÜâéël`kzðéàÞìàëìÞÞûîßüjxñßÞÙðþÜãrn÷ïëòònuðîunÞèlx~áãxìäôsîúçä{ýsùòtz~ìûlooåäîj`qöãüol`òðõëîæmc]hvyoh~ui_jþìôùpÿëïïk^jnkb^`zùqoiëßÞßÝÖØâûggcSE>=>A?>AK|ǹ´°¯®®°µÆX7)# #,Fº¦›š›Ÿ§´f1#2¦“•ž¥«°°ºÈD*= ’œ¯»³¬§«²Ê?+! ¯”Œ»Ü¹¬¥´ÊâM7.% '©–£¼µª¥«ÃlQÚÝm=-$
%¬’™¨Â²¨£¯ç>D¿¶±Ý>(
4£“𬹝©§ÂN4Vº¬ÌB'
,¨”“˜§±µ¬ÈG/Dɬ©²Ì6+?ž——¨ª®©º{60MÄ««¯Å@.=¡›™ž¥¨ª§·Õ2-8ú®«©´ÊM,j© ž¥¥¦¢¤®É5//N½¯©³æ3@·©®©¦Ÿž£°I2+6_¼¬«©³Ñ.$FØÁĽ¬¢šš«|4+2K¼¬¨©¶h)(?O_UÕ±¢š˜š§Ê9,1I¿±¯»ì:'",9>DFÕ²¡š—š¥»?//=ݼ±²¸ÏL."&.4//8OÐÀ¼¿Éo@-##.=ðÆµ¬¤žœœŸ©ÁF0-2?Þ¹º¾È`=+ !/Gʸ®©¤ž¡ªÁH4.3>ñ帻ÀÝI0#(=ͳ¬¨¥ Ÿž ©¹Y7./:Vǹ´µ¹¿ÚF. '?Ưª¥£Ÿžž ª½K3,.:Zø²´¸½Ël:(/𴩦£ žžŸ¦µý5,+2GÖ¹°¯³»Ér;*(L¹©¥¡ žž¡É<-),9WÁ³¬²½ÏQ7((Jºª¥¡Ÿž£¯Ó<-+-9Uò¬ª«®¼Ö\@1&4Ê«£ ŸžŸ¡§¶^2'&+?Ä«¡ž ¦±Ø<+#*»œ—–›£®ÃÌL<+&(0Õž›œž¥«¹Ë[:2++)(iœ•”›¬Ì?=<3/*1_™š¢±ËàȼºÅV>38/)
%¦Œ‹¡6$$/M4-%5°š‘•£g&+[¨œŸS17Kä7
+ ÁˆŠš>+Ik/'/»™“¦-;¥——žºVDdßF'
=˜ŒŠ–í!>XK5F™’™Å![¢˜š ªµµÍ='!®‰ŽºD¯¬ËIÞ¢˜š¾"æž—›¨¶´«®_&(0)
1–‰Š¡A¤ªC*@¥’“Òœ˜£½Þ°ž½'2ÓM"h‘ŠŽ´$Í«Î*-±™šG,šž¸ê¾§œ£O"$Z¼7
(›œ/#5þS41®˜“šÁ-À£¢°Ú¸¨¡¦Æ,'/:M4M–ޤ#">k\=M¥••¢L<°¥§²Ä¯¦¨¹U.0AA2&ã“’'WXE:äž’–- i¨¦¹½¥«ËC8AG=,! ã‘”´*Åó7:ÍŸ‘•µ($þ§©¸½®¦¤®q:=çl4%! &/’‹’®%'»Å+)Øž’“«&)á®®»¿« ¡¯ò?Aïn3$""("
—‹’²*%»°-L”–¦2/¼·á빦ž±I>ëÌD)#%%)!"”Š•Ù+&3¸¹&=𑙝:(8»¼A:ºŸ› ±}Lyá<'#'(+!
!–‹˜T,1M¹Ã'3’œ½A@Û·Ì1,Æžš¤¼×Ä»Ø.),)7‘Œ --İ¿6ø˜•«JäÌ4)8°ž¯Ê¼«¯D!'/)½Ž½)â¤: ,±›ŸÊtªž®=,7Í®ª±»´¨¨À. $-'#žŽ›B<§ŸØ )j®¨µÁ«¢Ñ1;Í·¾Ì¿®¦§·C+*/*@—’>²›¨,%CÐÆÈ¿ª²FNº´æ@í¤«¿ûN>0'#¤”žÝ¾ÿ3RLLמœ¦Ã̰¯Û:Lµª¯ÀÔçM4(¬—ŸÊ³ššÈ"#:K2-H®Ÿž©±¬¥¬Þ<]¸²ÁÝÒÌm9*ºš¥ê¯–—º*-PF*$2½¤¡ª¬¡œ£ÅKÜ»À\ANÝp8*# ºŸµPª”—¼3GÌF&!.ƨ©´«›—¡Âáµ°ß46Ro=-)'$'®¬AX“ŸoN¸¼7"%7ó½À¤—˜©º¬¤·;3Ws6(*,'?³ÿ0º˜—³Sµ¦È*$1Píaé´ž™«¨ž¥Ó=^ß7$$+* !ÝÏ5E ˜¦Ö²¢®?.4=HUF]¬ž©¤œž®ÌÌË@+$%'$,sC3Àž¸¾¢ À?HM>?G?Y¯¦««Ÿœ£®±³Ì>0+)'#'<.+Ó£©Ä®œŸ¶ÂµÁQNL;AÎÀË·¨§¬«±ÊcP=0.0,$ ,5+&5ÕÝB»ª³½¼½ÁÆÉÉÃÀÄľ¾ÂÂÀÇá\MD=82-)+/,&)6>:E̺»¹¯¯°°³···½ÃÃÁÄÌÔÑÑâeYTKA<971-,//*+3<;?~À¼º³®®®¯´··¸½Â¿ÂÉÎÐÕækZOJF@<972--//,-6>@MÒ½º¶°¯°°°µº¹¹¾Á¾ÀÊÎÎÛwjeSKKJD><:51/02129@HYØÄ½¹´´µ´´·¹¹¹½¿¿ÀÆËÓÞïr^QKJHB?><85313668>HOlÑÅ¿º··¸·¸º»»½¿ÁÅÍÔÛìj^\WQNLJGC@=;9669::=DIQ}ØÌ¼¼¼¹¹¼½½¿ÂÅÉËËÏÛàâæ|mj`ZPLID><:779:;>FL[ùÜÎþ½¼»»½¾ÀÅÉÌÎÐÒÔ×ÙÚåùüýþz`QJE?;87538=>D]RÝJEÔ¼¯¸Å¾¼oÇÃÏÉÕàÖÝ`íÝnØê[YM;8>.09/987BPRåÈ˺½º¯·»ºº¾ÆÁ×ÅÏÎÐÎÔíÐjXïDI;C8-4--70-EB<ÊÍÓ¬¼¶¬µ½··ÕºÅпÀÕºÁѽÁmÊâ7Õ.-6%(*+':34ÃLŰ¼®°¸»ÏµÝÂÃÎÁ½¶¿¹¾½½tjP?30*&% +*)<5ßÛȸµª³«¶°´ÑºÚÉÆÀ½¹³¶°·¾ÇÅhI1:0$%#*$740-)$"&*0;hȽ¯©¥£¦ª¬°´¹¸¶¶°¯°´·¹¾ÏúLA<2-+('$ "(+.3DÞÄ»±¬¨§«®®¯¸»»»·¶¶··ºÀÍÚrSJ>821.+)('')+/7@Pï̼·°¯¯®¯±¸¹¹ºº¸¹¸¿ÀÄÍáá^XQ><65530.10/16=HG[xÕËȾ½µ¶¸¸µ·¸¸»½½¾ÎÜÉÝs[X\G?>==:::==;>>EHK[efçÝÏÊÉÂÀÁ¿¿¹¾ÄÂÅËËÎÎæçúZY]XOMHIIDHMIILLLYZcY{ýåÛàÑÍÍÌÓÎÍÓÌÆÕØÕØëí×ìüa`_^ZY\YUXY`_`ZZanjpyêßmp÷ÞÙàñÙÚçêÙÚÛîçë÷öîol}~]_pýleu|y`^nuyikyùrplóëýzpïèôxíáéuoûôùyñôúvv}{}~trùêüoéæzloéímgý÷ökhðüpoíst~ëìñèíð}sõëþ÷þ÷íðïïûöäæ|èðtô{vmsïozøhwýømséùyr÷ÿv}þé}tzôîýþèðnýõðësnúüÿnÿíü}þl~ø~vsw{îþnmòö÷ø}øûúp|ôù÷ïz|òwqúüþíõÿùtôùlq{{øøjkíâñklvqþüùsvþ{þsòùqpoùüoÿôøyqøûmüë~sws|üt|jk{ôw÷÷mnø{úörüüuý{o÷øxøõypûíõpjÿêüpjüøtjöìnxpmöìmjþñ}}tz~px{ìtkwû{rítk|û÷õinü÷étpùüíkkxs~|ä}nþî~x~÷ñtéàójùï÷ypmiíóöçðûvûëýûouñkmõëú}öyóöüþòúqüwisþëðí}vò÷loõþzyûÿõþ|qûî}mûûüv~ìür{ò}{þyøóö|pyý{ð÷ngäàs`wìëì|u|wøéðmgnùîqròñzûñppmuqzklzòéumvüöôtpmuð{dkuzüøùö}rü~þ{t}wuhru~êòunp}wýsnuvzy{ywúþq}u{õþtêìgräóoûyûýpôuüåÙëqç|rrkqhshbfgwqûëîííïëæßåêâåêíéììökzrrsef_``]_^ch`_aq|tìíãÞßÛÝØÚÛÛÞÚÜÛÜàâééêíöqaXQMIC=953348=ImÊ·§¤¤¦©¬°¹ÁÓmTNRX]TE:1-)#?ª˜˜™™™•˜ Ü#&3;DE¾¨š ¬ÅÚÉÑë9+*,==, E£§Ÿ›––¡½.',5E;?z¶¦¦«¼ÎÆÅÆnIUÙÀÈT8-#;¦–›œ—–“£I!*:KGL° œ¢¹ôwÌÌN8?ʪ¶oC>;#
Ö¢˜œ™‘”šü# &940W±››£²È½ÉH1.R¶²½»³¹_,$
c¡˜¡–•Ð!%-<Ùªžž²³»Î90@콾õ°²ÈB70-Ižœž—˜¥É+/5/01Ê©¥¦«¨¸ù<=ìêüÔÀ¯ÁàUY;(W¨ž¡¡“”§f-JG'%/¹¨´±¨Ÿ£ÇRéÒä<@¿µºÖà¼ÄC.+*N¼¹¥“—°·ËÔ< *IcÕü®Ÿ¦ª´´¯oCLSÎQ^ÄÇÊhGN>)EÎϬ “˜±©®À=#3K0<ú¯¦²©¥®¯ÓÜÆG[]gßMmæD?-'L>:–žœ¥Z<6=/$BÀм¤¥³®®ÈâgíiCSÓæQKo=' +;'È œ¥›œÈçÅ8+(3O;V¬®¯©¨¨·ÄµÏCagTLIúe4..#2C¡¨¥™›°µ¨D*;5,2GÃÀ»§¦«¨²¹ÛîxBDIDE;00"%*<©À¯œšŸ©£¥K<Ô/$>A6ì¹³©¢©°©°ìÎÛ>>E:60/(-½½e£œ¡£Ÿ¤µoÓK)/F.7ÇÇ¿©¥©¨¥©µ¼¾`BI9.2,"+1ºeÀŸ ¦Ÿ ¬»ÁÝ80>5/OÞo·ª¬©£¦«®°ÀúyN446*&'"++ÎAk¤§¬ž ¬³ÒL=>70?TIɰ²¬¤¦«©¼ÉÑN;94-*+&*("6N8á·²¢©³«±×ÔàE@HEJ]н¹²«¬¯®±¿ÇÐPA>623/--),2,-=;:ÞÈÛ¹¯¼¸±¾ËÁÐmðöevàÑÈĽº¼½»ÀÍÍÝ[WSEDJC@EA=?>;;==>FNVkßÔÑÍÉÌÏËÌÕÑÌÐÏÊÉÊÆÅÅÄÆÉÌÐÛçìrgf\WWUQQNKJFDCA?AACHLR`üâÖÎËÉÇÇÉËÍÐÕÙÞåêóùöôîêééèêíòüsia\XTQPOOPSVZ^foýðëåáââãåæèêíîïñðîïðîïñññôöõ÷úüü~z{ysuvtv{}þ÷óðîìëêéèèèçèéèéêêêëëìîðñöùûþ||{{|{|~~ÿþý}~}{wutonmkjkklnpu}úõîìëèèééêíïñøüý}z|{|~þýüüüüÿ}{wtrommllmnorwy|ýúø÷õôôöõ÷ùûýüý~~úûÿ}}{zwttvþ}szïìéÞß׿ÆWOÞãMNôê_[ì×ïjà×ôinõîk[e{b^tumxteoýnmp`_hbh~{he~zgk|k_gfhfdkmh`aigeemz{øñëìõîí÷öîíéìñïõôþtqwqiqrpnjxzjnütpî÷ýïìïðéëøêçðøúý~û{gcpj_jm_dyøneúîqðÜãïæçÚÑÞïÞÔÙììÝÝçìåÝäúzcZWQY^ROXbaWWüÕÓÓÌÊËÊËÊÈÎÔÏÕéæàîthlj\TPMLMGDFEBFNOQfäÏÆ¿º¶´³µ¶¶¹¿ÄÊÜvZJA<951.--*')+/;Lß¾´¬¦¨¬«¬µ½¼»¼¼½¾½Ã×]A6/+&!)6VÏ»ª¥£¢¤¨©¬³·º¾º¶¹¶±°®³·¼Ï|I60,(&$%.?V鼯¬¨«®®°°¶¼½¾»µ³²²²³²·¾ÌøSJ>6/-+(%$,6;IÖ»®©ª«¬«¬±ºÁÈ¿ºººº¼¹¸¼½ÃÎÎ×oSA861-('/9:KÌ·«§ª¬®®¬®¶ÃÜîÏÁ½¼¼»¶³´·¼ÄÇÌÜgK?=<81)",9HIi¾¯¨¦¬³¸»¹»ÊýQNkλ¶±¬«²»ÆÉÌ×rM?<;5-%2ô¼½Ç»³®¹ÝRRïÈËçXXؽ³°¯®«ª¬µÇùyØÊÉÚfQLH;-!6ïµÅǼ²¯¼ðDCbǾÅß[í¿°ª¨©ª¬®¶ÅuMOwÒÏÝXB;4-%0é©·ØòË´°ºp=;Qƶ·ÊòèÀ®¦¥¨¯»ÇÎÑÙínûÛÌÈÐa@2*#+ú®§«¹Îíͽ»ÃoDAVλº¿ÉËÀ³«¨©¯½ÕùåÏÈÄÈÏÛçyXD4) :¿«¨¯¿ÚñÎÁ¾ÉlGDP×¾¹º½Âº³®¯·ÂÐÕÏÇÀ¿ÂÌâ\K>5,#-z°¨©³Æ}mÞÊÆÎzRNZÛż¹º½½¼¸´²³·½ÃÉÌÉÅÄÇÐzL=4-'!#6Û²«µÂÙíÞÏÍÐßügiíÓÈ¿¼»»º¹¸¸¸¹»¾ÂÇÌÍÍÎÕôR?4-)$ -EŰ®µÀÓæèÞÔÓÕÛë~÷âÐý¹··¸º¼¾¾¼½¿ÂÈÑÛåû`N?5.)%!$.AÏ´®¯¸ÆØízîáÚØÜèñðÞ̼·¶¸º¼¿ÄÁ¿¿ÁÄËÔã|`PE;3-*&" !(3Mű¯¹ÇÞk]e|åÝÞêöúäÐ¶¸»¿ÅÅÄÅÅÆÌÑÜ÷bRG=6/,)%""'/B×·®¬³¿ÔqURZkîààåèåØÊÀº¶µ¶¸¼ÄÈÉÌÌÊËÎÔÞý^MB;4.,($"#)5OƳ¯¸Åß^OPYjíÝÜÞÞÚÏÆ¾¹·µ·º¿ÆËÎÐÎÌÍÎÑÚñ`M@:4.+'$"$+9]¿¯¬¬®¸ÈëUJKSbóàßÝÙÓËÁ¼¸µµ¸¼ÂÌÔÙÙÓÍËËÌÐÞqRD<6/,)%"#(2Lİ«ªµÆxMCCKZoçÞÜØÏÈÀ»·µ¶ºÀÌÞøðÞÒÈÁÀÃÈÒñXI>82-*'#!$,<Þµ«©ª¯½ãNC?CN^xäÜÚÐÆ¾¹µ´·¼ÅÓñnýÞÏÅ¿½¾ÁÈÖ{RD<60-)$ %/N¼ª¥¦«·ÖK?>BNlóý{öà˼´°¯³»ÌöXR]ãËÀ»¹º¾ÄÏûRE<60-)"!,M·¦ £«»b<87aº«§ª±ÅXETϽ¸·½ÎåÔÁ¸³´¾î@4/00-';¬šJ-/DÕ¾½Ü;.4X»«¥¨µéHK|³¯·Îbcؾ°¬®¼ïE:7:=9-#>§šš ·=,3öº¼Ý?0-;Ä«¦«¶ÎSMß¼µ¹ÄØwîÅ´®¯·ÀÎå}kS?5/,' ×–›¬f2/D½²È:+-?Ä«¥«ÁTOÚ¾¸¹ÅuK^Á²°¹ÃÌÊ¿·¶ÅK4/374,#øœ“˜@,1\¸´á/%-𦪶×Vp÷¼ÞLQØ¿¹¸»ÅÑɹ°³ÁrF>=?>6)*±˜• å/3V¿¸Í:)*J¯¤ª¾öéȼ¼ÅxDEض²Á`ZDz®±½áNOæËé<,())& Qœ‘˜»+(G´«º<&%<¯ ¤½FCÒµ³ÁS;>Ó°½N?鲪®ÀjMZÕÇÜ>+&'(%ñ›‘™Å()hªÄ0#(y¦žªw9K¾°¸ßB>g¹´÷=Dɰ³Åt\ÛÀ¿ö8,-48/' (Ûž•™¯>2F;ÏA/3⬦®ÈkmßÏÊÔ_NḮ¶ÚIGü¾²°»ÝdØÃÉ\;0-./.)!#(-U¥—™®>.6LÏÀÜ;5¬½éIC_ÅÃî\ι¸¿ÖO=@ê¼¶¸»½ÂÈÓoI>;;=?;0*(&'&"%}“˜¬D**Dº¸M/:ª¤ªÈ8/A˽ÄÒàл°¸f9:WÄ·´»ÉÌÂÀÔO=88=B>3,))*,,+5¼ž™ž¯H*+@ÏÎ^L[ɳ·ý>=MϹ¶½ÊÌÌÏâ[C=Hãż¸ºÂÌÎÕîlc\^óßnK=4.,*'%&'&.¾œ•˜£j%"3ÞÄÉë]Ñ®¦¬×7*,J¶¬®¹ÆÖÍÇà@43<{½¸ÀØmZX_VHETßǾ¾Ì~UIDGLOT^qîàßòf\]zÚÎÎÙû^]þÞÝï\H?>>C[J*%;¯¤®Æ^{éM>Gl¾«¦«»ðA=MîÚÕÝöãÌÍúC3,,=¿ª§Â?/1=OvfMNíǽ¼ÓG:=VÀ°¯¹ÌXEHRSLC;68:986/)(=®—š«<'%.R¼¾ÉÐ̽®¯ÃI.)1í´©©³×TDFT\HCH]ʶ´½à?34?cÊÁÅÈÉÆÂÆáO@>IúÔÑæTHJOTN@98?[Ⱥ¹½ÊëdôÙÍËÔónýÛËÆËß^LHGA9/'#'>¾©¢¨Æ<*%+<é¹®´ÃaB449KÛº³¯¯¶Æq@8:DòÁ¸¹¿ÛSFCEMWb|ßÏž¿Ê÷KAFpŸ¶Áû@88FæÀ¹ºÂÖZB:2-+-6W¿°®´ÂmICGYÝÌÿ¿ÀÆÔrODDJ\âÑÛ_=.'!#+N° Ÿ¬Ù8,,7LÛÅ¿¾½ÀÕV?9>Sθ°¯´ÀîI<:?MóÌÆÉÏãÿtlkdWPOVÿÒÈÆÓ^C:9BeȺ¸ºÁÐàéæÛåX?2++/F®©ª·Z,!.ZÀ´³¼ÄËÙ×qSF@Exų®´Ç\D@KòÍ¿¿ÄËÕàïka_cøÝÒÍÐØédQG@>@GSjúhPHCFOmÖÉÄÂÄÉÍØßêìÞÒÊÃÁÁÅÚM1#"6½¤Ÿ¡¬ÎG88@EHA>Dz¿®¬®½[916Lι´¹ÁÖêäÚÔÝfPJQõË¿¾ÅÕo[_ðÑÈÃÄÊÜaH=99@RêÕÞhKAAFSel_PLM[æÐÊÌÕâóëÙÎÇÄÄÈÌÏÑÒÑÑÑ×ïK6'(J® ¬ÅM886997;Bù½°«¬´ËL<8?[п¾ÁÊ×ÚÛØÞmQGFSÝÀ·µ¸ÂÞWIHJLMJHHNdáÒÔéYG><>CN_ñßÙÔÐÍÊÉËÐÜölnïÖÉ¿ÂÉÐÚëR;)#<µ£Ÿ§´ÔUH@>743;Z¯©©¼äH?COüØÔÓ×ÎÈÀ¾ÁËêWMKR[]YMIHLYvçésZNJILOY_rëÛÏÊÅÄÆÉÐÚåíèÞÔÍÊËÔðWJB:0( *F¶¦ ¢ª¶ÌoYMF<759Kз«¶Äßigzéæ÷}ûÙÉ¿¼½ÆØhVT\jfUE;76:BN\_\Z_tÛÎÌÏÝ}cdùÚÍÉÈÈÊÉÇÃÁÁÅÎå^ME<5,&"!(3a½±®¯³¶¹»ÂÕT?99@VÖÁ¼º»¼½½¾ÄÎådZ[näÖÏÏÐÒÓÔÔ×Þø^OGA>=>?@BCEIP_ûâßàâÞÖÎÊÉËÎÑÓÑÎÌÍÏÕÜàâãçøbQG@<962//18?OkâÒÊÀ»·¶·»ÀÈÍÏÐÖÞòjdfwíãßàßÜ×ÐÍËËÍÒÚáìüpbXOID@>>=<==?AFLUkãÓËÆÂÀÀÂÂÂÃÄÈÍÔÜßààâìze]ZXVQMIEA?>>=>>?BHRdëÙÐËÆÁ¾¼¼¼¾ÀÃÆÈËÏ×àîüyy{|ytw~òéäâäèíõzl`YQLHDA>=<=?DJQ^{ßÑÉÿ¾¾¿ÁÄÇÊÏØäÿh_\[YYZ[^dks{þ~xpjc]YUQOMLJJJKMQX`têÛÑËÆÃÁÀÀÁÂÄÆÊÎÔÝì{j`[WTRQRSUVWXYZZZZYXVTSQPPQSW\euîߨÐÌÉÇÆÅÅÅÆÈÊÍÑØßëþmc]ZXVVVXYZ\^adfhhhhhgfdba``bglvøìäÞÛØÕÓÒÑÑÒÔÖÙÝãë÷wmfb_^^^_behkmprsrqnmjgda_]\\\]^`djp}ñèáÝÚØ×ÖÖרÚÝàåéíòøþytnliecb`__``__adkmqmefghiebcackq||}ùðíìèææèêéèåäããàßâîøýtrkddd__baeknt}ûõîìììíîîîñðõ}vuv{uðà×}lßãÜÞçêéîvw|úúys~îêãÞÝÚÜâé÷pjf_]_cefgglqqnllmqsuxzur|üú÷÷úûûûûû|{z|ýúüútjvöííþyqkisùxnsúviywóöuîþêÝõðóòò÷~xìíwýú}ñóÿýíñúéåèíûîóvröïmöøúõóûrsýþyx|øòñxtwnntpmpkhlnlqþùûþûññûsntÿ÷óôÿnhehqwxtt{úôþ|~nsúéçptpm_pÿõæöõÿyüúøôû~~ýõ÷û|z|ÿûþzmúó{ø~~þ|ý~ÿý~}~~þÿÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.wav b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.wav
new file mode 100644
index 000000000000..5d213a6f692b
Binary files /dev/null and b/sdk/ai/azure-ai-voicelive/src/test/resources/largest_lake.wav differ
diff --git a/sdk/ai/azure-ai-voicelive/test-resources/test-resources.json b/sdk/ai/azure-ai-voicelive/test-resources/test-resources.json
new file mode 100644
index 000000000000..e3ca8f7e7422
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/test-resources/test-resources.json
@@ -0,0 +1,566 @@
+{
+ "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {
+ "baseName": {
+ "type": "string",
+ "defaultValue": "[resourceGroup().name]",
+ "metadata": {
+ "description": "The base resource name for AI Services."
+ }
+ },
+ "location": {
+ "type": "string",
+ "defaultValue": "[resourceGroup().location]",
+ "metadata": {
+ "description": "The location of the resource. By default, this is the same as the resource group."
+ }
+ },
+ "tenantId": {
+ "type": "string",
+ "defaultValue": "72f988bf-86f1-41af-91ab-2d7cd011db47",
+ "metadata": {
+ "description": "The tenant ID to which the application and resources belong."
+ }
+ },
+ "testApplicationOid": {
+ "type": "string",
+ "defaultValue": "b3653439-8136-4cd5-aac3-2a9460871ca6",
+ "metadata": {
+ "description": "The client OID to grant access to test resources."
+ }
+ },
+ "tagValues": {
+ "type": "object",
+ "defaultValue": {}
+ },
+ "allowProjectManagement": {
+ "type": "bool",
+ "defaultValue": true
+ },
+ "virtualNetworkType": {
+ "type": "string",
+ "defaultValue": "None"
+ },
+ "vnet": {
+ "type": "object",
+ "defaultValue": {}
+ },
+ "ipRules": {
+ "type": "array",
+ "defaultValue": []
+ },
+ "privateEndpoints": {
+ "type": "array",
+ "defaultValue": []
+ },
+ "privateDnsZone": {
+ "type": "string",
+ "defaultValue": "privatelink.aiservices.azure.com"
+ },
+ "resourceGroupName": {
+ "type": "string",
+ "defaultValue": "[resourceGroup().name]"
+ },
+ "resourceGroupId": {
+ "type": "string",
+ "defaultValue": "[resourceGroup().id]"
+ },
+ "uniqueId": {
+ "type": "string",
+ "defaultValue": "[newGuid()]"
+ },
+ "defaultProjectName": {
+ "type": "string",
+ "defaultValue": "[concat(toLower(parameters('baseName')), '-ai-defaultproject')]"
+ },
+ "identity": {
+ "type": "object",
+ "defaultValue": {
+ "type": "SystemAssigned"
+ }
+ },
+ "userAssignedIdentityName": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "userIdentityResourceGroupName": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "identityType": {
+ "type": "string",
+ "defaultValue": "SystemAssigned"
+ },
+ "encryption_status": {
+ "type": "string",
+ "defaultValue": " "
+ },
+ "cmk_keyvault": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "resource_cmk_uri": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "userAssignedIdentityId": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "keyVaultName": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "keyVaultLocation": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "keyVaultResourceGroupName": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "keyVersion": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "keyName": {
+ "type": "string",
+ "defaultValue": ""
+ },
+ "hasRoleAssignment": {
+ "type": "bool",
+ "defaultValue": false
+ },
+ "roleDefinitionId": {
+ "type": "string",
+ "defaultValue": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '53ca6127-db72-4b80-b1b0-d745d6d5456d')]"
+ },
+ "enableRbac": {
+ "type": "bool",
+ "defaultValue": false
+ },
+ "cryptoUserRoleAssignmentName": {
+ "type": "string",
+ "defaultValue": "[guid(concat(parameters('cmk_keyvault'), 'KeyVaultCryptoUser'))]"
+ }
+ },
+ "variables": {
+ "aiServicesName": "[concat(parameters('baseName'), '-ai')]"
+ },
+ "resources": [
+ {
+ "type": "Microsoft.Resources/deployments",
+ "apiVersion": "2017-05-10",
+ "name": "deployVnet",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "parameters": {},
+ "variables": {},
+ "resources": [
+ {
+ "type": "Microsoft.Network/virtualNetworks",
+ "apiVersion": "2020-04-01",
+ "name": "[if(equals(parameters('virtualNetworkType'), 'External'), parameters('vnet').name, variables('defaultVNetName'))]",
+ "location": "[parameters('location')]",
+ "properties": {
+ "addressSpace": {
+ "addressPrefixes": "[if(equals(parameters('virtualNetworkType'), 'External'), parameters('vnet').addressPrefixes, json(concat('[{\"', variables('defaultAddressPrefix'),'\"}]')))]"
+ },
+ "subnets": [
+ {
+ "name": "[if(equals(parameters('virtualNetworkType'), 'External'), parameters('vnet').subnets.subnet.name, variables('defaultSubnetName'))]",
+ "properties": {
+ "serviceEndpoints": [
+ {
+ "service": "Microsoft.CognitiveServices",
+ "locations": [
+ "[parameters('location')]"
+ ]
+ }
+ ],
+ "addressPrefix": "[if(equals(parameters('virtualNetworkType'), 'External'), parameters('vnet').subnets.subnet.addressPrefix, variables('defaultAddressPrefix'))]"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ },
+ "parameters": {}
+ },
+ "condition": "[and(and(not(empty(parameters('vnet'))), equals(parameters('vnet').newOrExisting, 'new')), equals(parameters('virtualNetworkType'), 'External'))]"
+ },
+ {
+ "apiVersion": "2025-04-01-preview",
+ "name": "[variables('aiServicesName')]",
+ "location": "[parameters('location')]",
+ "type": "Microsoft.CognitiveServices/accounts",
+ "kind": "AIServices",
+ "sku": {
+ "name": "S0"
+ },
+ "identity": "[parameters('identity')]",
+ "tags": "[if(contains(parameters('tagValues'), 'Microsoft.CognitiveServices/accounts'), parameters('tagValues')['Microsoft.CognitiveServices/accounts'], json('{}'))]",
+ "properties": {
+ "customSubDomainName": "[toLower(variables('aiServicesName'))]",
+ "defaultProjectName": "[toLower(variables('aiServicesName'))]",
+ "publicNetworkAccess": "[if(equals(parameters('virtualNetworkType'), 'Internal'), 'Disabled', 'Enabled')]",
+ "networkAcls": {
+ "defaultAction": "[if(equals(parameters('virtualNetworkType'), 'External'), 'Deny', 'Allow')]",
+ "virtualNetworkRules": "[if(equals(parameters('virtualNetworkType'), 'External'), json(concat('[{\"id\": \"', concat(subscription().id, '/resourceGroups/', parameters('vnet').resourceGroup, '/providers/Microsoft.Network/virtualNetworks/', parameters('vnet').name, '/subnets/', parameters('vnet').subnets.subnet.name), '\"}]')), json('[]'))]",
+ "ipRules": "[if(or(empty(parameters('ipRules')), empty(parameters('ipRules')[0].value)), json('[]'), parameters('ipRules'))]"
+ },
+ "identity": "[parameters('identity')]",
+ "userAssignedIdentityName": "[if(equals(parameters('identity').type, 'UserAssigned'), parameters('userAssignedIdentityName'), json('null'))]",
+ "userIdentityResourceGroupName": "[if(equals(parameters('identity').type, 'UserAssigned'), parameters('userIdentityResourceGroupName'), json('null'))]",
+ "encryption_status": "[parameters('encryption_status')]",
+ "keyVaultName": "[parameters('keyVaultName')]",
+ "keyVaultLocation": "[parameters('keyVaultLocation')]",
+ "keyVaultResourceGroupName": "[parameters('keyVaultResourceGroupName')]",
+ "cmk_keyvault": "[parameters('cmk_keyvault')]",
+ "resource_cmk_uri": "[parameters('resource_cmk_uri')]",
+ "keyVersion": "[parameters('keyVersion')]",
+ "allowProjectManagement": "[parameters('allowProjectManagement')]"
+ },
+ "resources": [
+ {
+ "type": "projects",
+ "apiVersion": "2025-04-01-preview",
+ "name": "[parameters('defaultProjectName')]",
+ "location": "[parameters('location')]",
+ "identity": {
+ "type": "SystemAssigned"
+ },
+ "sku": {
+ "name": "S0"
+ },
+ "properties": {
+ "displayName": "[parameters('defaultProjectName')]",
+ "description": "Default project created with the resource"
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
+ ]
+ }
+ ],
+ "dependsOn": [
+ "[concat('Microsoft.Resources/deployments/', 'deployVnet')]"
+ ]
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "name": "[concat('patchAccessPolicy-', parameters('keyVaultName'))]",
+ "apiVersion": "2021-04-01",
+ "condition": "[and(equals(parameters('enableRbac'), bool('false')), equals(parameters('encryption_status'), 'Enabled'))]",
+ "resourceGroup": "[parameters('keyVaultResourceGroupName')]",
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "type": "Microsoft.KeyVault/vaults/accessPolicies",
+ "apiVersion": "2019-09-01",
+ "name": "[concat(parameters('keyVaultName'), '/add')]",
+ "properties": {
+ "accessPolicies": [
+ {
+ "tenantId": "[subscription().tenantId]",
+ "objectId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2025-04-01-preview', 'Full').identity.principalId]",
+ "permissions": {
+ "keys": [
+ "get",
+ "wrapKey",
+ "unwrapKey"
+ ]
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
+ ]
+ },
+ {
+ "type": "Microsoft.Authorization/roleAssignments",
+ "apiVersion": "2022-04-01",
+ "name": "[guid(concat(parameters('cmk_keyvault'), '-', variables('aiServicesName'), 'KeyVaultCryptoUser'))]",
+ "scope": "[parameters('cmk_keyvault')]",
+ "condition": "[and(equals(parameters('hasRoleAssignment'), bool('true')), equals(parameters('enableRbac'), bool('true')))]",
+ "properties": {
+ "roleDefinitionId": "[subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '14b46e9e-c2b7-41b4-b07b-48a6ebf60603')]",
+ "principalId": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2025-04-01-preview', 'Full').identity.principalId]"
+ },
+ "dependsOn": [
+ "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]"
+ ]
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "apiVersion": "2021-04-01",
+ "name": "patchCMKEncryption",
+ "condition": "[and(equals(parameters('enableRbac'), bool('false')), equals(parameters('encryption_status'), 'Enabled'))]",
+ "dependsOn": [
+ "[concat('patchAccessPolicy-', parameters('keyVaultName'))]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "type": "Microsoft.CognitiveServices/accounts",
+ "apiVersion": "2025-04-01-preview",
+ "name": "[variables('aiServicesName')]",
+ "location": "[parameters('location')]",
+ "kind": "AIServices",
+ "sku": {
+ "name": "S0"
+ },
+ "properties": {
+ "customSubDomainName": "[toLower(variables('aiServicesName'))]",
+ "publicNetworkAccess": "[if(equals(parameters('virtualNetworkType'), 'Internal'), 'Disabled', 'Enabled')]",
+ "networkAcls": {
+ "defaultAction": "[if(equals(parameters('virtualNetworkType'), 'External'), 'Deny', 'Allow')]",
+ "virtualNetworkRules": [],
+ "ipRules": []
+ },
+ "encryption": {
+ "status": "[parameters('encryption_status')]",
+ "keySource": "Microsoft.Keyvault",
+ "keyVaultProperties": {
+ "keyName": "[parameters('keyName')]",
+ "keyVersion": "[parameters('keyVersion')]",
+ "keyVaultUri": "[reference(parameters('cmk_keyvault'), '2021-04-01-preview').vaultUri]",
+ "identityClientId": "[json('null')]"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "type": "Microsoft.Resources/deployments",
+ "apiVersion": "2021-04-01",
+ "name": "patchCMKEncryptionWithRbac",
+ "condition": "[and(equals(parameters('enableRbac'), bool('true')), equals(parameters('encryption_status'), 'Enabled'))]",
+ "dependsOn": [
+ "[resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))]",
+ "[concat('Microsoft.KeyVault/vaults/', parameters('keyVaultName'), '/providers/Microsoft.Authorization/roleAssignments/', guid(concat(parameters('cmk_keyvault'), '-', variables('aiServicesName'), 'KeyVaultCryptoUser')))]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "type": "Microsoft.CognitiveServices/accounts",
+ "apiVersion": "2025-04-01-preview",
+ "name": "[variables('aiServicesName')]",
+ "location": "[parameters('location')]",
+ "kind": "AIServices",
+ "sku": {
+ "name": "S0"
+ },
+ "properties": {
+ "customSubDomainName": "[toLower(variables('aiServicesName'))]",
+ "publicNetworkAccess": "[if(equals(parameters('virtualNetworkType'), 'Internal'), 'Disabled', 'Enabled')]",
+ "networkAcls": {
+ "defaultAction": "[if(equals(parameters('virtualNetworkType'), 'External'), 'Deny', 'Allow')]",
+ "virtualNetworkRules": [],
+ "ipRules": []
+ },
+ "identity": {
+ "type": "SystemAssigned"
+ },
+ "encryption": {
+ "status": "[parameters('encryption_status')]",
+ "keySource": "Microsoft.Keyvault",
+ "keyVaultProperties": {
+ "keyName": "[parameters('keyName')]",
+ "keyVersion": "[parameters('keyVersion')]",
+ "keyVaultUri": "[reference(parameters('cmk_keyvault'), '2021-04-01-preview').vaultUri]",
+ "identityClientId": "[json('null')]"
+ }
+ }
+ }
+ }
+ ]
+ }
+ }
+ },
+ {
+ "apiVersion": "2018-05-01",
+ "name": "[concat('deployPrivateEndpoint-', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name)]",
+ "type": "Microsoft.Resources/deployments",
+ "resourceGroup": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.resourceGroup.value.name]",
+ "subscriptionId": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.subscription.subscriptionId]",
+ "dependsOn": [
+ "[concat('Microsoft.CognitiveServices/accounts/', variables('aiServicesName'))]"
+ ],
+ "condition": "[equals(parameters('virtualNetworkType'), 'Internal')]",
+ "copy": {
+ "name": "privateendpointscopy",
+ "count": "[length(parameters('privateEndpoints'))]"
+ },
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "location": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.location]",
+ "name": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name]",
+ "type": "Microsoft.Network/privateEndpoints",
+ "apiVersion": "2021-05-01",
+ "properties": {
+ "subnet": {
+ "id": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.properties.subnet.id]"
+ },
+ "privateLinkServiceConnections": [
+ {
+ "name": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name]",
+ "properties": {
+ "privateLinkServiceId": "[concat(parameters('resourceGroupId'), '/providers/Microsoft.CognitiveServices/accounts/', variables('aiServicesName'))]",
+ "groupIds": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.properties.privateLinkServiceConnections[0].properties.groupIds]"
+ }
+ }
+ ],
+ "customNetworkInterfaceName": "[concat(parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name, '-nic')]"
+ },
+ "tags": {}
+ }
+ ]
+ }
+ }
+ },
+ {
+ "apiVersion": "2018-05-01",
+ "name": "[concat('deployDnsZoneGroup-', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name)]",
+ "type": "Microsoft.Resources/deployments",
+ "resourceGroup": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.resourceGroup.value.name]",
+ "subscriptionId": "[parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.subscription.subscriptionId]",
+ "dependsOn": [
+ "[concat('deployPrivateEndpoint-', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name)]"
+ ],
+ "condition": "[and(equals(parameters('virtualNetworkType'), 'Internal'), parameters('privateEndpoints')[copyIndex()].privateDnsZoneConfiguration.integrateWithPrivateDnsZone)]",
+ "copy": {
+ "name": "privateendpointdnscopy",
+ "count": "[length(parameters('privateEndpoints'))]"
+ },
+ "properties": {
+ "mode": "Incremental",
+ "template": {
+ "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
+ "contentVersion": "1.0.0.0",
+ "resources": [
+ {
+ "type": "Microsoft.Network/privateDnsZones",
+ "apiVersion": "2018-09-01",
+ "name": "[parameters('privateDnsZone')]",
+ "location": "global",
+ "tags": {},
+ "properties": {}
+ },
+ {
+ "type": "Microsoft.Network/privateDnsZones/virtualNetworkLinks",
+ "apiVersion": "2018-09-01",
+ "name": "[concat(parameters('privateDnsZone'), '/', replace(uniqueString(parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.properties.subnet.id), '/subnets/default', ''))]",
+ "location": "global",
+ "dependsOn": [
+ "[parameters('privateDnsZone')]"
+ ],
+ "properties": {
+ "virtualNetwork": {
+ "id": "[split(parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.properties.subnet.id, '/subnets/')[0]]"
+ },
+ "registrationEnabled": false
+ }
+ },
+ {
+ "apiVersion": "2017-05-10",
+ "name": "[concat('EndpointDnsRecords-', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name)]",
+ "type": "Microsoft.Resources/deployments",
+ "dependsOn": [
+ "[parameters('privateDnsZone')]"
+ ],
+ "properties": {
+ "mode": "Incremental",
+ "templatelink": {
+ "uri": "https://go.microsoft.com/fwlink/?linkid=2264916"
+ },
+ "parameters": {
+ "privateDnsName": {
+ "value": "[parameters('privateDnsZone')]"
+ },
+ "privateEndpointNicResourceId": {
+ "value": "[concat('/subscriptions/', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.subscription.subscriptionId, '/resourceGroups/', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.resourceGroup.value.name, '/providers/Microsoft.Network/networkInterfaces/', parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name, '-nic')]"
+ },
+ "nicRecordsTemplateUri": {
+ "value": "https://go.microsoft.com/fwlink/?linkid=2264719"
+ },
+ "ipConfigRecordsTemplateUri": {
+ "value": "https://go.microsoft.com/fwlink/?linkid=2265018"
+ },
+ "uniqueId": {
+ "value": "[parameters('uniqueId')]"
+ },
+ "existingRecords": {
+ "value": {}
+ }
+ }
+ }
+ },
+ {
+ "type": "Microsoft.Network/privateEndpoints/privateDnsZoneGroups",
+ "apiVersion": "2020-03-01",
+ "name": "[concat(parameters('privateEndpoints')[copyIndex()].privateEndpointConfiguration.privateEndpoint.name, '/', 'default')]",
+ "location": "[parameters('location')]",
+ "dependsOn": [
+ "[parameters('privateDnsZone')]"
+ ],
+ "properties": {
+ "privateDnsZoneConfigs": [
+ {
+ "name": "privatelink-cognitiveservices",
+ "properties": {
+ "privateDnsZoneId": "[concat(parameters('resourceGroupId'), '/providers/Microsoft.Network/privateDnsZones/', parameters('privateDnsZone'))]"
+ }
+ }
+ ]
+ }
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "outputs": {
+ "AI_SERVICES_NAME": {
+ "type": "string",
+ "value": "[variables('aiServicesName')]"
+ },
+ "AI_SERVICES_ENDPOINT": {
+ "type": "string",
+ "value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName'))).endpoints['AI Foundry API']]"
+ },
+ "AI_SERVICES_KEY": {
+ "type": "string",
+ "value": "[listKeys(resourceId('Microsoft.CognitiveServices/accounts', variables('aiServicesName')), '2025-04-01-preview').key1]"
+ }
+ }
+}
\ No newline at end of file
diff --git a/sdk/ai/azure-ai-voicelive/tests.yml b/sdk/ai/azure-ai-voicelive/tests.yml
new file mode 100644
index 000000000000..88a9a4f33971
--- /dev/null
+++ b/sdk/ai/azure-ai-voicelive/tests.yml
@@ -0,0 +1,20 @@
+trigger: none
+
+extends:
+ template: /eng/pipelines/templates/stages/archetype-sdk-tests.yml
+ parameters:
+ ServiceDirectory: ai/azure-ai-voicelive
+ TestResourceDirectories:
+ - ai/azure-ai-voicelive/test-resources
+ TimeoutInMinutes: 240
+ EnvVars:
+ AZURE_LOG_LEVEL: 2
+ CloudConfig:
+ Public:
+ ${{ if not(contains(variables['Build.DefinitionName'], 'tests-weekly')) }}:
+ MatrixFilters:
+ - ArmTemplateParameters=^(?!.*enableHsm.*true)
+ Artifacts:
+ - name: azure-ai-voicelive
+ groupId: com.azure
+ safeName: azureaivoicelive
diff --git a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md
index 8c54c9ff760a..5508cd3cbbab 100644
--- a/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md
+++ b/sdk/appservice/azure-resourcemanager-appservice/CHANGELOG.md
@@ -10,6 +10,18 @@
### Other Changes
+## 2.54.2 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-resourcemanager-keyvault` from `2.54.0` to version `2.54.1`.
+- Upgraded `azure-resourcemanager-msi` from `2.53.4` to version `2.53.5`.
+- Upgraded `azure-resourcemanager-dns` from `2.53.4` to version `2.53.5`.
+- Upgraded `azure-resourcemanager-storage` from `2.55.1` to version `2.55.2`.
+
+
## 2.54.1 (2025-11-24)
### Other Changes
diff --git a/sdk/appservice/azure-resourcemanager-appservice/README.md b/sdk/appservice/azure-resourcemanager-appservice/README.md
index 43424decb56c..dab4c68a6ffb 100644
--- a/sdk/appservice/azure-resourcemanager-appservice/README.md
+++ b/sdk/appservice/azure-resourcemanager-appservice/README.md
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
com.azure.resourcemanager
azure-resourcemanager-appservice
- 2.54.0
+ 2.54.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/appservice/azure-resourcemanager-appservice/pom.xml b/sdk/appservice/azure-resourcemanager-appservice/pom.xml
index e3825f3f74c3..78f1f28df4b8 100644
--- a/sdk/appservice/azure-resourcemanager-appservice/pom.xml
+++ b/sdk/appservice/azure-resourcemanager-appservice/pom.xml
@@ -14,7 +14,7 @@
com.azure.resourcemanager
azure-resourcemanager-appservice
- 2.55.0-beta.1
+ 2.54.2
jar
Microsoft Azure SDK for App Service Management
diff --git a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md
index 17c6aa4a4f07..18490f013031 100644
--- a/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md
+++ b/sdk/authorization/azure-resourcemanager-authorization/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 2.53.7 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+
+
## 2.53.6 (2025-11-24)
### Other Changes
diff --git a/sdk/authorization/azure-resourcemanager-authorization/README.md b/sdk/authorization/azure-resourcemanager-authorization/README.md
index db48598accdc..e3b3676fee86 100644
--- a/sdk/authorization/azure-resourcemanager-authorization/README.md
+++ b/sdk/authorization/azure-resourcemanager-authorization/README.md
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
com.azure.resourcemanager
azure-resourcemanager-authorization
- 2.53.5
+ 2.53.7
```
[//]: # ({x-version-update-end})
diff --git a/sdk/authorization/azure-resourcemanager-authorization/pom.xml b/sdk/authorization/azure-resourcemanager-authorization/pom.xml
index 61630d4517d5..1448e3cc2e6c 100644
--- a/sdk/authorization/azure-resourcemanager-authorization/pom.xml
+++ b/sdk/authorization/azure-resourcemanager-authorization/pom.xml
@@ -14,7 +14,7 @@
com.azure.resourcemanager
azure-resourcemanager-authorization
- 2.54.0-beta.1
+ 2.53.7
jar
Microsoft Azure SDK for Authorization Management
diff --git a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md
index 62f72956a8d9..2bbda7e4a943 100644
--- a/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md
+++ b/sdk/cdn/azure-resourcemanager-cdn/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 2.53.6 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+
+
## 2.53.5 (2025-11-24)
### Other Changes
diff --git a/sdk/cdn/azure-resourcemanager-cdn/README.md b/sdk/cdn/azure-resourcemanager-cdn/README.md
index 0a200cf74644..4d7cf7157a23 100644
--- a/sdk/cdn/azure-resourcemanager-cdn/README.md
+++ b/sdk/cdn/azure-resourcemanager-cdn/README.md
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
com.azure.resourcemanager
azure-resourcemanager-cdn
- 2.53.1
+ 2.53.6
```
[//]: # ({x-version-update-end})
diff --git a/sdk/cdn/azure-resourcemanager-cdn/pom.xml b/sdk/cdn/azure-resourcemanager-cdn/pom.xml
index ef51da163680..80ad53288efc 100644
--- a/sdk/cdn/azure-resourcemanager-cdn/pom.xml
+++ b/sdk/cdn/azure-resourcemanager-cdn/pom.xml
@@ -14,7 +14,7 @@
com.azure.resourcemanager
azure-resourcemanager-cdn
- 2.54.0-beta.1
+ 2.53.6
jar
Microsoft Azure SDK for CDN Management
diff --git a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointImpl.java b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointImpl.java
index faa9fbd5610e..cbea4240b353 100644
--- a/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointImpl.java
+++ b/sdk/cdn/azure-resourcemanager-cdn/src/main/java/com/azure/resourcemanager/cdn/implementation/CdnEndpointImpl.java
@@ -194,8 +194,8 @@ public Mono updateResourceAsync() {
.serviceClient()
.getCustomDomains()
.deleteAsync(this.parent().resourceGroupName(), this.parent().name(), this.name(),
- itemToDelete.name())
- .then(Mono.just(itemToDelete)), 32, 32);
+ itemToDelete.name()),
+ 32, 32);
}
Mono customDomainTask
diff --git a/sdk/communication/azure-communication-callautomation/CHANGELOG.md b/sdk/communication/azure-communication-callautomation/CHANGELOG.md
index b04adfbf680e..65017d06e264 100644
--- a/sdk/communication/azure-communication-callautomation/CHANGELOG.md
+++ b/sdk/communication/azure-communication-callautomation/CHANGELOG.md
@@ -1,14 +1,10 @@
# Release History
-## 1.6.0-beta.2 (Unreleased)
+## 1.6.0 (2026-01-27)
### Features Added
-### Breaking Changes
-
-### Bugs Fixed
-
-### Other Changes
+- Support for MicrosoftTeamsAppIdentifier CommunicationIdentifier
## 1.5.2 (2025-10-27)
diff --git a/sdk/communication/azure-communication-callautomation/README.md b/sdk/communication/azure-communication-callautomation/README.md
index ceb6c1978bf5..2a4d80b3b540 100644
--- a/sdk/communication/azure-communication-callautomation/README.md
+++ b/sdk/communication/azure-communication-callautomation/README.md
@@ -22,7 +22,7 @@ This package contains a Java SDK for Azure Communication Call Automation Service
com.azure
azure-communication-callautomation
- 1.5.0
+ 1.6.0
```
diff --git a/sdk/communication/azure-communication-callautomation/pom.xml b/sdk/communication/azure-communication-callautomation/pom.xml
index 43b8a1a9a2ea..1fbd402ce88c 100644
--- a/sdk/communication/azure-communication-callautomation/pom.xml
+++ b/sdk/communication/azure-communication-callautomation/pom.xml
@@ -15,7 +15,7 @@
com.azure
azure-communication-callautomation
jar
- 1.6.0-beta.2
+ 1.6.0
Microsoft Azure client library for Call Automation service
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java
index a8f46242f707..3e32da898f68 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CallInvite.java
@@ -8,6 +8,7 @@
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.communication.common.MicrosoftTeamsUserIdentifier;
import com.azure.communication.common.PhoneNumberIdentifier;
import com.azure.communication.common.TeamsExtensionUserIdentifier;
@@ -65,6 +66,16 @@ public CallInvite(TeamsExtensionUserIdentifier targetIdentity) {
this.customCallingContext = new CustomCallingContext(null, new HashMap<>());
}
+ /**
+ * Create a CallInvite object with MicrosoftTeamsAppIdentifier
+ * @param targetIdentity Target's MicrosoftTeamsAppIdentifier
+ */
+ public CallInvite(MicrosoftTeamsAppIdentifier targetIdentity) {
+ this.targetParticipant = targetIdentity;
+ this.sourceCallerIdNumber = null;
+ this.customCallingContext = new CustomCallingContext(null, new HashMap<>());
+ }
+
/**
* Get target's CommunicationIdentifier
* @return target's CommunicationIdentifier
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java
index 2cf8a30837ac..65455f87ea1a 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/TransferCallToParticipantOptions.java
@@ -7,6 +7,7 @@
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.communication.common.MicrosoftTeamsUserIdentifier;
import com.azure.communication.common.PhoneNumberIdentifier;
import com.azure.communication.common.TeamsExtensionUserIdentifier;
@@ -90,6 +91,17 @@ public TransferCallToParticipantOptions(TeamsExtensionUserIdentifier targetParti
this.customCallingContext = new CustomCallingContext(null, new HashMap<>());
}
+ /**
+ * Constructor
+ *
+ * @param targetParticipant {@link MicrosoftTeamsAppIdentifier} contains information for TransferTarget(to whom the call is transferred).
+ */
+ public TransferCallToParticipantOptions(MicrosoftTeamsAppIdentifier targetParticipant) {
+ this.targetParticipant = targetParticipant;
+ this.sourceCallerIdNumber = null;
+ this.customCallingContext = new CustomCallingContext(null, new HashMap<>());
+ }
+
/**
* Get the operationContext.
*
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java
index b44f72d2f7a1..53bc76b3a1b9 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationAsyncClientUnitTests.java
@@ -15,8 +15,10 @@
import com.azure.communication.callautomation.models.ConnectCallOptions;
import com.azure.communication.callautomation.models.ConnectCallResult;
import com.azure.communication.callautomation.models.RoomCallLocator;
+import com.azure.communication.common.CommunicationCloudEnvironment;
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.core.http.rest.Response;
import org.junit.jupiter.api.Test;
@@ -177,6 +179,67 @@ public void rejectCallWithResponse() {
assertEquals(204, rejectCallResponse.getStatusCode());
}
+ @Test
+ public void createCallWithMicrosoftTeamsAppIdentifier() {
+ CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(
+ Collections.singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID,
+ CALL_SERVER_CALL_ID, CALL_CALLER_ID, CALL_CALLER_DISPLAY_NAME, CALL_TARGET_ID, CALL_CONNECTION_STATE,
+ CALL_SUBJECT, CALL_CALLBACK_URL, null, null), 201))));
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite callInvite = new CallInvite(teamsAppIdentifier);
+
+ CreateCallResult createCallResult = callAutomationAsyncClient.createCall(callInvite, CALL_CALLBACK_URL).block();
+ assertNotNull(createCallResult);
+ }
+
+ @Test
+ public void createCallWithResponseMicrosoftTeamsAppIdentifier() {
+ CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(
+ Collections.singletonList(new AbstractMap.SimpleEntry<>(generateCallProperties(CALL_CONNECTION_ID,
+ CALL_SERVER_CALL_ID, CALL_CALLER_ID, CALL_CALLER_DISPLAY_NAME, CALL_TARGET_ID, CALL_CONNECTION_STATE,
+ CALL_SUBJECT, CALL_CALLBACK_URL, null, null), 201))));
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite callInvite = new CallInvite(teamsAppIdentifier);
+ CreateCallOptions callOptions = new CreateCallOptions(callInvite, CALL_CALLBACK_URL);
+ callOptions.setOperationContext(CALL_SUBJECT);
+
+ Response createCallResult
+ = callAutomationAsyncClient.createCallWithResponse(callOptions).block();
+
+ assertNotNull(createCallResult);
+ assertEquals(201, createCallResult.getStatusCode());
+ assertNotNull(createCallResult.getValue());
+ }
+
+ @Test
+ public void redirectCallWithMicrosoftTeamsAppIdentifier() {
+ CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(
+ new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204))));
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite target = new CallInvite(teamsAppIdentifier);
+
+ callAutomationAsyncClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target);
+ }
+
+ @Test
+ public void redirectCallWithResponseMicrosoftTeamsAppIdentifier() {
+ CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(
+ new ArrayList<>(Collections.singletonList(new AbstractMap.SimpleEntry<>("", 204))));
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite target = new CallInvite(teamsAppIdentifier);
+ RedirectCallOptions redirectCallOptions = new RedirectCallOptions(CALL_INCOMING_CALL_CONTEXT, target);
+ Response redirectCallResponse
+ = callAutomationAsyncClient.redirectCallWithResponse(redirectCallOptions).block();
+
+ assertNotNull(redirectCallResponse);
+ assertEquals(204, redirectCallResponse.getStatusCode());
+ }
+
@Test
public void connect() {
CallAutomationAsyncClient callAutomationAsyncClient = getCallAutomationAsyncClient(new ArrayList<>(
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java
index 138902f8c85b..7b5d2fe0bacb 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationClientUnitTests.java
@@ -11,8 +11,10 @@
import com.azure.communication.callautomation.models.CreateCallResult;
import com.azure.communication.callautomation.models.RedirectCallOptions;
import com.azure.communication.callautomation.models.RejectCallOptions;
+import com.azure.communication.common.CommunicationCloudEnvironment;
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
import org.junit.jupiter.api.Test;
@@ -119,6 +121,32 @@ public void redirectCallWithResponse() {
assertEquals(204, redirectCallResponse.getStatusCode());
}
+ @Test
+ public void redirectCallWithMicrosoftTeamsAppIdentifier() {
+ CallAutomationClient callAutomationClient
+ = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204))));
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite target = new CallInvite(teamsAppIdentifier);
+
+ callAutomationClient.redirectCall(CALL_INCOMING_CALL_CONTEXT, target);
+ }
+
+ @Test
+ public void redirectCallWithResponseMicrosoftTeamsAppIdentifier() {
+ CallAutomationClient callAutomationClient
+ = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>("", 204))));
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite target = new CallInvite(teamsAppIdentifier);
+ RedirectCallOptions redirectCallOptions = new RedirectCallOptions(CALL_INCOMING_CALL_CONTEXT, target);
+
+ Response redirectCallResponse
+ = callAutomationClient.redirectCallWithResponse(redirectCallOptions, Context.NONE);
+
+ assertEquals(204, redirectCallResponse.getStatusCode());
+ }
+
@Test
public void rejectCall() {
CallAutomationClient callAutomationClient
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java
index 6abad88ce601..552bc1c39f6d 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionAsyncUnitTests.java
@@ -21,7 +21,9 @@
import com.azure.communication.callautomation.models.RemoveParticipantResult;
import com.azure.communication.callautomation.models.TransferCallResult;
import com.azure.communication.callautomation.models.TransferCallToParticipantOptions;
+import com.azure.communication.common.CommunicationCloudEnvironment;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.communication.common.PhoneNumberIdentifier;
import com.azure.core.http.rest.Response;
import com.azure.core.exception.HttpResponseException;
@@ -163,6 +165,40 @@ public void transferToParticipantCallPhoneNumberIdentifier() {
assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext());
}
+ @Test
+ public void transferToParticipantCallMicrosoftTeamsAppIdentifier() {
+ CallConnectionAsync callConnectionAsync
+ = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>(
+ serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202))))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ TransferCallResult transferCallResult
+ = callConnectionAsync.transferCallToParticipant(teamsAppIdentifier).block();
+ assertNotNull(transferCallResult);
+ assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext());
+ }
+
+ @Test
+ public void transferToParticipantCallWithResponseMicrosoftTeamsAppIdentifier() {
+ CallConnectionAsync callConnectionAsync
+ = getCallAutomationAsyncClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>(
+ serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202))))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ TransferCallToParticipantOptions transferCallToParticipantOptions
+ = new TransferCallToParticipantOptions(teamsAppIdentifier).setOperationContext(CALL_OPERATION_CONTEXT);
+ Response transferCallResultResponse
+ = callConnectionAsync.transferCallToParticipantWithResponse(transferCallToParticipantOptions).block();
+
+ assertNotNull(transferCallResultResponse);
+ assertEquals(202, transferCallResultResponse.getStatusCode());
+ assertNotNull(transferCallResultResponse.getValue());
+ }
+
@Test
public void transferToParticipantCallWithResponse() {
CallConnectionAsync callConnectionAsync
@@ -309,6 +345,38 @@ public void addParticipantsWithResponse() {
assertNotNull(addParticipantsResultResponse.getValue());
}
+ @Test
+ public void addParticipantWithMicrosoftTeamsAppIdentifier() {
+ CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient(
+ new ArrayList<>(Collections.singletonList(new SimpleEntry<>(generateAddParticipantsResponse(), 202))))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ AddParticipantResult addParticipantsResult
+ = callConnectionAsync.addParticipant(new CallInvite(teamsAppIdentifier)).block();
+
+ assertNotNull(addParticipantsResult);
+ }
+
+ @Test
+ public void addParticipantWithResponseMicrosoftTeamsAppIdentifier() {
+ CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient(
+ new ArrayList<>(Collections.singletonList(new SimpleEntry<>(generateAddParticipantsResponse(), 202))))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ AddParticipantOptions addParticipantsOptions
+ = new AddParticipantOptions(new CallInvite(teamsAppIdentifier)).setOperationContext(CALL_OPERATION_CONTEXT);
+ Response addParticipantsResultResponse
+ = callConnectionAsync.addParticipantWithResponse(addParticipantsOptions).block();
+
+ assertNotNull(addParticipantsResultResponse);
+ assertEquals(202, addParticipantsResultResponse.getStatusCode());
+ assertNotNull(addParticipantsResultResponse.getValue());
+ }
+
@Test
public void removeParticipants() {
CallConnectionAsync callConnectionAsync
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java
index 86c606513cc8..472a8bfcba26 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallConnectionUnitTests.java
@@ -21,7 +21,9 @@
import com.azure.communication.callautomation.models.TransferCallResult;
import com.azure.communication.callautomation.models.TransferCallToParticipantOptions;
import com.azure.communication.callautomation.models.SipHeaderPrefix;
+import com.azure.communication.common.CommunicationCloudEnvironment;
import com.azure.communication.common.CommunicationUserIdentifier;
+import com.azure.communication.common.MicrosoftTeamsAppIdentifier;
import com.azure.communication.common.PhoneNumberIdentifier;
import com.azure.core.http.rest.Response;
import com.azure.core.util.Context;
@@ -165,6 +167,37 @@ public void transferToParticipantCallPhoneNumberIdentifier() {
assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext());
}
+ @Test
+ public void transferToParticipantCallMicrosoftTeamsAppIdentifier() {
+ CallConnection callConnection
+ = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>(
+ serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202))))
+ .getCallConnection(CALL_CONNECTION_ID);
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ TransferCallResult transferCallResult = callConnection.transferCallToParticipant(teamsAppIdentifier);
+
+ assertNotNull(transferCallResult);
+ assertEquals(CALL_OPERATION_CONTEXT, transferCallResult.getOperationContext());
+ }
+
+ @Test
+ public void transferToParticipantCallWithResponseMicrosoftTeamsAppIdentifier() {
+ CallConnection callConnection
+ = getCallAutomationClient(new ArrayList<>(Collections.singletonList(new SimpleEntry<>(
+ serializeObject(new TransferCallResponseInternal().setOperationContext(CALL_OPERATION_CONTEXT)), 202))))
+ .getCallConnection(CALL_CONNECTION_ID);
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ Response transferCallResultResponse = callConnection.transferCallToParticipantWithResponse(
+ new TransferCallToParticipantOptions(teamsAppIdentifier).setOperationContext(CALL_OPERATION_CONTEXT),
+ Context.NONE);
+
+ assertNotNull(transferCallResultResponse);
+ assertEquals(202, transferCallResultResponse.getStatusCode());
+ assertNotNull(transferCallResultResponse.getValue());
+ }
+
@Test
public void transferToParticipantCallWithResponse() {
CallConnection callConnection
@@ -247,6 +280,35 @@ public void addParticipantsWithResponse() {
assertNotNull(addParticipantsResultResponse.getValue());
}
+ @Test
+ public void addParticipantWithMicrosoftTeamsAppIdentifier() {
+ CallConnection callConnection = getCallAutomationClient(
+ new ArrayList<>(Collections.singletonList(new SimpleEntry<>(generateAddParticipantsResponse(), 202))))
+ .getCallConnection(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ AddParticipantResult addParticipantsResult = callConnection.addParticipant(new CallInvite(teamsAppIdentifier));
+ assertNotNull(addParticipantsResult);
+ }
+
+ @Test
+ public void addParticipantWithResponseMicrosoftTeamsAppIdentifier() {
+ CallConnection callConnection = getCallAutomationClient(
+ new ArrayList<>(Collections.singletonList(new SimpleEntry<>(generateAddParticipantsResponse(), 202))))
+ .getCallConnection(CALL_CONNECTION_ID);
+
+ MicrosoftTeamsAppIdentifier teamsAppIdentifier
+ = new MicrosoftTeamsAppIdentifier(CALL_TARGET_ID, CommunicationCloudEnvironment.PUBLIC);
+ CallInvite callInvite = new CallInvite(teamsAppIdentifier);
+ Response addParticipantsResultResponse = callConnection.addParticipantWithResponse(
+ new AddParticipantOptions(callInvite).setOperationContext(CALL_OPERATION_CONTEXT), Context.NONE);
+
+ assertNotNull(addParticipantsResultResponse);
+ assertEquals(202, addParticipantsResultResponse.getStatusCode());
+ assertNotNull(addParticipantsResultResponse.getValue());
+ }
+
@Test
public void removeParticipants() {
CallConnection callConnection
diff --git a/sdk/communication/azure-communication-messages/CHANGELOG.md b/sdk/communication/azure-communication-messages/CHANGELOG.md
index 0ff645935357..d0eaef269dc3 100644
--- a/sdk/communication/azure-communication-messages/CHANGELOG.md
+++ b/sdk/communication/azure-communication-messages/CHANGELOG.md
@@ -10,6 +10,18 @@
### Other Changes
+## 1.1.9 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-communication-common` from `1.4.3` to version `1.4.4`.
+- Upgraded `azure-core` from `1.57.0` to version `1.57.1`.
+- Upgraded `azure-core-http-netty` from `1.16.2` to version `1.16.3`.
+- Upgraded `azure-json` from `1.5.0` to version `1.5.1`.
+
+
## 1.1.8 (2025-10-27)
### Other Changes
diff --git a/sdk/communication/azure-communication-messages/README.md b/sdk/communication/azure-communication-messages/README.md
index 9833d5f5e92d..7035ed9acf4e 100644
--- a/sdk/communication/azure-communication-messages/README.md
+++ b/sdk/communication/azure-communication-messages/README.md
@@ -14,11 +14,11 @@ Various documentation is available to help you get started
### Prerequisites
-- [Java Development Kit (JDK)](https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above.
+- [Java Development Kit (JDK)](https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable) version 8 or above.
- [Apache Maven](https://maven.apache.org/download.cgi).
- You must have an [Azure subscription][azure_sub] to use this package.
- An existing Communication Services resource. If you need to create the resource, you can use the [Azure Portal][azure_portal], the [Azure PowerShell][azure_powershell], or the [Azure CLI][azure_cli].
-- See [how to register whatsapp business account & create a channel][register_whatsapp_business_account] for registering whatsapp channel to your Communication Services resource.
+- See [how to register whatsapp business account and create a channel][register_whatsapp_business_account] for registering whatsapp channel to your Communication Services resource.
### Adding the package to your product
@@ -58,7 +58,7 @@ add the direct dependency to your project as follows.
com.azure
azure-communication-messages
- 1.2.0-beta.2
+ 1.1.9
```
[//]: # ({x-version-update-end})
@@ -274,127 +274,6 @@ public void sendDocumentMessage() {
result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
}
```
-```java readme-sample-sendStickerMessage
-/*
- * This sample shows how to send sticker message with below details
- * Supported sticker type - (.webp)
- * Note: Business cannot initiate conversation with media message.
- * */
-public static void sendStickerMessage() {
- //Update the Media URL
- String mediaUrl = "https://www.gstatic.com/webp/gallery/1.sm.webp";
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new StickerNotificationContent("", recipients, mediaUrl));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-}
-```
-```java readme-sample-sendReactionMessage
-/*
- * This sample shows how to send reaction message with below details
- * Emoji - unicode for emoji character.
- * Reply Message ID - ID of the message to be replied with emoji
- * Note: Business cannot initiate conversation with media message.
- * */
-public static void sendReactionMessage() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new ReactionNotificationContent("", recipients, "\uD83D\uDE00", ""));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-}
-```
-```java readme-sample-sendInteractiveMessageWithButtonAction
-/*
- * This sample shows how to send interactive message with Button Action
- * Note: Business cannot initiate conversation with interactive message.
- * */
-public void sendInteractiveMessageWithButtonAction() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-}
-```
-```java readme-sample-sendInteractiveMessageWithListAction
-/*
- * This sample shows how to send list action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
-public static void sendInteractiveMessageWithListAction() {
- List group1 = new ArrayList<>();
- group1.add(new ActionGroupItem("priority_express", "Priority Mail Express", "Delivered on same day!"));
- group1.add(new ActionGroupItem("priority_mail", "Priority Mail", "Delivered in 1-2 days"));
-
- List group2 = new ArrayList<>();
- group2.add(new ActionGroupItem("usps_ground_advantage", "USPS Ground Advantage", "Delivered in 2-5 days"));
- group2.add(new ActionGroupItem("media_mail", "Media Mail", "Delivered in 5-8 days"));
-
- List options = new ArrayList<>();
- options.add(new ActionGroup("Express Delivery", group1));
- options.add(new ActionGroup("Normal Delivery", group2));
-
- ActionGroupContent actionGroupContent = new ActionGroupContent("Shipping Options", options);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Which shipping option do you want?"), new WhatsAppListActionBindings(actionGroupContent));
- interactiveMessage.setFooter(new TextMessageContent("Eagle Logistic"));
- interactiveMessage.setHeader(new TextMessageContent("Shipping Options"));
-
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-
-}
-```
-```java readme-sample-sendInteractiveMessageWithUrlAction
-/*
- * This sample shows how to send url action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
-public static void sendInteractiveMessageWithUrlAction() {
- LinkContent urlAction = new LinkContent("Rocket is the best!", "https://wallpapercave.com/wp/wp2163723.jpg");
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("The best Guardian of Galaxy"), new WhatsAppUrlActionBindings(urlAction));
- interactiveMessage.setFooter(new TextMessageContent("Intergalactic New Ltd"));
-
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-}
-```
-
### Get Template List for given channel example:
```java readme-sample-ListTemplates
MessageTemplateClient templateClient =
@@ -438,7 +317,7 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:opencode@microsoft.com
-[product_docs]: https://learn.microsoft.com/azure/communication-services/
+[product_docs]: https://docs.microsoft.com/azure/communication-services/
[package]: https://central.sonatype.com/artifact/com.azure/azure-communication-messages
[api_documentation]: https://aka.ms/java-docs
[azure_communication_messaging_qs]: https://learn.microsoft.com/azure/communication-services/concepts/advanced-messaging/whatsapp/whatsapp-overview
@@ -447,9 +326,9 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[create-manage-whatsapp-template]: https://developers.facebook.com/docs/whatsapp/business-management-api/message-templates/
[azure_identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity
[defaultazurecredential]: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/identity/identity#defaultazurecredential
-[azure_cli]: https://learn.microsoft.com/cli/azure
+[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[azure_portal]: https://portal.azure.com
-[azure_powershell]: https://learn.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
-
+[azure_powershell]: https://docs.microsoft.com/powershell/module/az.communication/new-azcommunicationservice
+
diff --git a/sdk/communication/azure-communication-messages/assets.json b/sdk/communication/azure-communication-messages/assets.json
index f44dcf14cecd..99d7da0bd362 100644
--- a/sdk/communication/azure-communication-messages/assets.json
+++ b/sdk/communication/azure-communication-messages/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo" : "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath" : "java",
"TagPrefix" : "java/communication/azure-communication-messages",
- "Tag" : "java/communication/azure-communication-messages_d7e86da684"
+ "Tag" : "java/communication/azure-communication-messages_d7c7441f3b"
}
diff --git a/sdk/communication/azure-communication-messages/checkstyle-suppressions.xml b/sdk/communication/azure-communication-messages/checkstyle-suppressions.xml
deleted file mode 100644
index c44e72b1dac8..000000000000
--- a/sdk/communication/azure-communication-messages/checkstyle-suppressions.xml
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/sdk/communication/azure-communication-messages/ci.yml b/sdk/communication/azure-communication-messages/ci.yml
index c4f78ce61dff..6d744588493a 100644
--- a/sdk/communication/azure-communication-messages/ci.yml
+++ b/sdk/communication/azure-communication-messages/ci.yml
@@ -28,7 +28,7 @@ pr:
extends:
template: ../../../eng/pipelines/templates/stages/archetype-sdk-client.yml
parameters:
- ServiceDirectory: communication/azure-communication-messages
+ ServiceDirectory: communication
Artifacts:
- name: azure-communication-messages
groupId: com.azure
diff --git a/sdk/communication/azure-communication-messages/customization/pom.xml b/sdk/communication/azure-communication-messages/customization/pom.xml
index 20d8d9104e2b..ab73b0f827a8 100644
--- a/sdk/communication/azure-communication-messages/customization/pom.xml
+++ b/sdk/communication/azure-communication-messages/customization/pom.xml
@@ -4,15 +4,21 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
- com.azure
- azure-code-customization-parent
- 1.0.0-beta.1
- ../../../parents/azure-code-customization-parent
-
+ com.azure
+ 1.0.0-beta.1
+ customization
- com.azure.tools
- azure-communication-messages-autorest-customization
- 1.2.0-beta.2
- jar
+
+ 17
+ 17
+ UTF-8
+
+
+
+
+ com.azure.tools
+ azure-autorest-customization
+ 1.0.0-beta.8
+
+
diff --git a/sdk/communication/azure-communication-messages/customization/src/main/java/MessagesSdkCustomization.java b/sdk/communication/azure-communication-messages/customization/src/main/java/MessagesSdkCustomization.java
index 4fafb9be7a02..c1b3621219e8 100644
--- a/sdk/communication/azure-communication-messages/customization/src/main/java/MessagesSdkCustomization.java
+++ b/sdk/communication/azure-communication-messages/customization/src/main/java/MessagesSdkCustomization.java
@@ -11,15 +11,10 @@
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.type.ClassOrInterfaceType;
import com.github.javaparser.javadoc.Javadoc;
-import com.github.javaparser.javadoc.JavadocBlockTag;
+import com.github.javaparser.javadoc.description.JavadocDescription;
import com.github.javaparser.javadoc.description.JavadocSnippet;
import org.slf4j.Logger;
-import java.util.List;
-
-import static com.github.javaparser.StaticJavaParser.parseBlock;
-import static com.github.javaparser.javadoc.description.JavadocDescription.parseText;
-
public class MessagesSdkCustomization extends Customization {
@Override
@@ -37,24 +32,13 @@ public void customize(LibraryCustomization libraryCustomization, Logger logger)
customizeMessageTemplateLocation(modelsPackage);
customizeMessageTemplateItemModel(modelsPackage);
- //Handle Interactive message content models
- updateModelClassModifierToAbstract(modelsPackage, "MessageContent");
- updateModelClassModifierToAbstract(modelsPackage, "ActionBindings");
- updateJavaDocForMethodFromJson(modelsPackage, "ActionBindings");
- updateJavaDocForMethodFromJson(modelsPackage, "MessageContent");
- customizeInteractiveMessage(modelsPackage);
-
PackageCustomization channelsModelsPackage = libraryCustomization.getPackage(
"com.azure.communication.messages.models.channels");
updateWhatsAppMessageTemplateItemWithBinaryDataContent(channelsModelsPackage);
- addDeprecateAnnotationToMediaNotificationContent(modelsPackage);
-
- addDeprecateAnnotationForImageV0CommunicationKind(modelsPackage);
+ AddDeprecateAnnotationToMediaNotificationContent(modelsPackage);
- customizeActionGroup(modelsPackage);
- customizeActionGroupContent(modelsPackage);
- customizeButtonSetContent(modelsPackage);
+ AddDeprecateAnnotationForImageV0CommunicationKind(modelsPackage);
}
private void updateModelClassModifierToAbstract(PackageCustomization modelsPackage, String className) {
@@ -66,10 +50,12 @@ private void updateModelClassModifierToAbstract(PackageCustomization modelsPacka
}
private void customizeMessageTemplateItemModel(PackageCustomization modelsPackage) {
- modelsPackage.getClass("MessageTemplateItem").customizeAst(ast -> {
- ast.addImport("com.azure.communication.messages.implementation.accesshelpers.MessageTemplateItemAccessHelper");
- ast.getClassByName("MessageTemplateItem").ifPresent(clazz -> clazz.addStaticInitializer()
- .addStatement("MessageTemplateItemAccessHelper.setAccessor(MessageTemplateItem::setName);"));
+ modelsPackage.getClass("MessageTemplateItem")
+ .customizeAst(ast -> {
+ ast.addImport(
+ "com.azure.communication.messages.implementation.accesshelpers.MessageTemplateItemAccessHelper");
+ ast.getClassByName("MessageTemplateItem").ifPresent(clazz -> clazz.addStaticInitializer()
+ .addStatement("MessageTemplateItemAccessHelper.setAccessor(MessageTemplateItem::setName);"));
});
}
@@ -103,55 +89,58 @@ private void updateBuilderClass(PackageCustomization packageCustomization, Strin
}
clazz.addMethod("connectionString", Modifier.Keyword.PUBLIC)
- .addMarkerAnnotation("Override")
+ .addAnnotation("Override")
.addParameter("String", "connectionString")
.setType(className)
- .setBody(parseBlock("{"
+ .setBody(StaticJavaParser.parseBlock("{"
+ "CommunicationConnectionString connection = new CommunicationConnectionString(connectionString);"
+ "this.credential(new KeyCredential(connection.getAccessKey()));"
- + "this.endpoint(connection.getEndpoint()); return this; }"))
- .setJavadocComment(new Javadoc(parseText("Set a connection string for authorization."))
- .addBlockTag("param", "connectionString", "valid connectionString as a string.")
+ + "this.endpoint(connection.getEndpoint());" + "return this;" + "}"))
+ .setJavadocComment(new Javadoc(
+ JavadocDescription.parseText("Set a connection string for authorization.")).addBlockTag("param",
+ "connectionString", "valid connectionString as a string.")
.addBlockTag("return", "the updated " + className + " object."));
clazz.addMethod("createHttpPipelineAuthPolicy", Modifier.Keyword.PRIVATE)
.setType("HttpPipelinePolicy")
- .setBody(parseBlock("{ if (tokenCredential != null) {"
+ .setBody(StaticJavaParser.parseBlock("{" + "if (tokenCredential != null) {"
+ "return new BearerTokenAuthenticationPolicy(tokenCredential, DEFAULT_SCOPES);"
+ "} else if (keyCredential != null) {"
+ "return new HmacAuthenticationPolicy(new AzureKeyCredential(keyCredential.getKey()));"
+ "} else {"
+ "throw LOGGER.logExceptionAsError(new IllegalStateException(\"Missing credential information while building a client.\"));"
- + "} }"));
-
- clazz.getMethodsByName("createHttpPipeline").get(0)
- .setBody(parseBlock("{"
- + "Configuration buildConfiguration = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;"
- + "HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;"
- + "ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;"
- + "List policies = new ArrayList<>();"
- + "String clientName = PROPERTIES.getOrDefault(SDK_NAME, \"UnknownName\");"
- + "String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, \"UnknownVersion\");"
- + "String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);"
- + "policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));"
- + "policies.add(new RequestIdPolicy());"
- + "policies.add(new AddHeadersFromContextPolicy());"
- + "HttpHeaders headers = new HttpHeaders();"
- + "localClientOptions.getHeaders()"
- + " .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue()));"
- + "if (headers.getSize() > 0) { policies.add(new AddHeadersPolicy(headers)); }"
- + "this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)"
- + " .forEach(p -> policies.add(p));"
- + "HttpPolicyProviders.addBeforeRetryPolicies(policies);"
- + "policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));"
- + "policies.add(new AddDatePolicy());"
- + "policies.add(createHttpPipelineAuthPolicy());"
- + "this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)"
- + " .forEach(p -> policies.add(p));"
- + "HttpPolicyProviders.addAfterRetryPolicies(policies);"
- + "policies.add(new HttpLoggingPolicy(localHttpLogOptions));"
- + "return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))"
- + " .httpClient(httpClient).clientOptions(localClientOptions).build(); }"));
+ + "}" + "}"));
+
+ clazz.getMethodsByName("createHttpPipeline")
+ .get(0)
+ .setBody(StaticJavaParser.parseBlock("{Configuration buildConfiguration"
+ + " = (configuration == null) ? Configuration.getGlobalConfiguration() : configuration;"
+ + " HttpLogOptions localHttpLogOptions = this.httpLogOptions == null ? new HttpLogOptions() : this.httpLogOptions;"
+ + " ClientOptions localClientOptions = this.clientOptions == null ? new ClientOptions() : this.clientOptions;"
+ + " List policies = new ArrayList<>();"
+ + " String clientName = PROPERTIES.getOrDefault(SDK_NAME, \"UnknownName\");"
+ + " String clientVersion = PROPERTIES.getOrDefault(SDK_VERSION, \"UnknownVersion\");"
+ + " String applicationId = CoreUtils.getApplicationId(localClientOptions, localHttpLogOptions);"
+ + " policies.add(new UserAgentPolicy(applicationId, clientName, clientVersion, buildConfiguration));"
+ + " policies.add(new RequestIdPolicy());"
+ + " policies.add(new AddHeadersFromContextPolicy());"
+ + " HttpHeaders headers = new HttpHeaders();" + " localClientOptions.getHeaders()"
+ + " .forEach(header -> headers.set(HttpHeaderName.fromString(header.getName()), header.getValue()));"
+ + " if (headers.getSize() > 0) {"
+ + " policies.add(new AddHeadersPolicy(headers));" + " }"
+ + " this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_CALL)"
+ + " .forEach(p -> policies.add(p));"
+ + " HttpPolicyProviders.addBeforeRetryPolicies(policies);"
+ + " policies.add(ClientBuilderUtil.validateAndGetRetryPolicy(retryPolicy, retryOptions, new RetryPolicy()));"
+ + " policies.add(new AddDatePolicy());"
+ + " policies.add(createHttpPipelineAuthPolicy());"
+ + " this.pipelinePolicies.stream().filter(p -> p.getPipelinePosition() == HttpPipelinePosition.PER_RETRY)"
+ + " .forEach(p -> policies.add(p));"
+ + " HttpPolicyProviders.addAfterRetryPolicies(policies);"
+ + " policies.add(new HttpLoggingPolicy(localHttpLogOptions));"
+ + " HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))"
+ + " .httpClient(httpClient).clientOptions(localClientOptions).build();"
+ + " return httpPipeline;}"));
});
});
}
@@ -167,8 +156,9 @@ private void customizeMessageTemplateLocation(PackageCustomization modelsPackage
.setBody(new BlockStmt(new NodeList<>(StaticJavaParser.parseStatement("super(refValue);"),
StaticJavaParser.parseStatement("this.latitude = geoPosition.getLatitude();"),
StaticJavaParser.parseStatement("this.longitude = geoPosition.getLongitude();"))))
- .setJavadocComment(new Javadoc(parseText("Creates an instance of MessageTemplateLocation class."))
- .addBlockTag("param", "refValue", "the refValue value to set.")
+ .setJavadocComment(new Javadoc(JavadocDescription.parseText(
+ "Creates an instance of MessageTemplateLocation class.")).addBlockTag("param", "refValue",
+ "the refValue value to set.")
.addBlockTag("param", "geoPosition", "the geoPosition value to set."));
clazz.getMethodsByName("getLatitude").forEach(Node::remove);
@@ -176,136 +166,78 @@ private void customizeMessageTemplateLocation(PackageCustomization modelsPackage
clazz.addMethod("getPosition", Modifier.Keyword.PUBLIC)
.setType("GeoPosition")
- .setBody(parseBlock("{return new GeoPosition(this.longitude, this.latitude);}"))
- .setJavadocComment(new Javadoc(parseText("Get the geo position: The longitude and latitude of the location."))
- .addBlockTag("return", "the GeoPosition object."));
+ .setBody(StaticJavaParser.parseBlock("{return new GeoPosition(this.longitude, this.latitude);}"))
+ .setJavadocComment(new Javadoc(JavadocDescription.parseText(
+ "Get the geo position: The longitude and latitude of the location.")).addBlockTag("return",
+ "the GeoPosition object."));
});
});
}
- private void customizeInteractiveMessage(PackageCustomization modelsPackage) {
- modelsPackage.getClass("InteractiveMessage").customizeAst(ast -> ast.getClassByName("InteractiveMessage")
- .ifPresent(clazz -> {
- clazz.getMethodsByName("getHeaderProperty").forEach(m -> {
- m.setName("getHeader");
- m.getJavadoc().ifPresent(javadoc -> m.setJavadocComment(new Javadoc(
- parseText(javadoc.getDescription().toText().replace("headerProperty", "header")))
- .addBlockTag("retrun", javadoc.getBlockTags().get(0).toText()
- .replace("headerProperty", "header"))));
- });
-
- clazz.getMethodsByName("setHeaderProperty").forEach(m -> {
- m.setName("setHeader");
- m.getParameter(0).setName("header");
- m.setBody(parseBlock("{ this.headerProperty = header; return this; }"));
- m.getJavadoc().ifPresent(javadoc -> {
- Javadoc newJavadoc = new Javadoc(parseText(javadoc.getDescription().toText()
- .replace("headerProperty", "header")));
- for (int i = 0; i < javadoc.getBlockTags().size(); i++) {
- JavadocBlockTag tag = javadoc.getBlockTags().get(i);
- if (tag.getType() != JavadocBlockTag.Type.PARAM
- || !tag.getName().map("headerProperty"::equals).orElse(false)) {
- newJavadoc.getBlockTags().add(tag);
- } else {
- newJavadoc.addBlockTag("param", "header",
- tag.getContent().toString().replace("headerProperty", "header"));
- }
- }
- m.setJavadocComment(newJavadoc);
- });
- });
- }));
- }
-
private void updateWhatsAppMessageTemplateItemWithBinaryDataContent(PackageCustomization channelsModelsPackage) {
channelsModelsPackage.getClass("WhatsAppMessageTemplateItem").customizeAst(ast -> {
- // ast.addImport("com.azure.core.util.BinaryData");
- ast.addImport("com.azure.communication.messages.implementation.accesshelpers.MessageTemplateItemAccessHelper");
+ ast.addImport("com.azure.core.util.BinaryData");
+ ast.addImport(
+ "com.azure.communication.messages.implementation.accesshelpers.MessageTemplateItemAccessHelper");
ast.getClassByName("WhatsAppMessageTemplateItem").ifPresent(clazz -> {
- // clazz.getMethodsByName("getContent")
- // .get(0)
- // .setType("BinaryData")
- // .setBody(StaticJavaParser.parseBlock("{return BinaryData.fromObject(this.content);}"));
+ clazz.getMethodsByName("getContent")
+ .get(0)
+ .setType("BinaryData")
+ .setBody(StaticJavaParser.parseBlock("{return BinaryData.fromObject(this.content);}"));
- clazz.getMethodsByName("fromJson").forEach(method -> method.getBody().ifPresent(body -> {
- String bodyStr = body.toString().replace("deserializedWhatsAppMessageTemplateItem.setName(name);",
+ String fromJson = clazz.getMethodsByName("fromJson").get(0).getBody().get().toString()
+ .replace("deserializedWhatsAppMessageTemplateItem.setName(name);",
"MessageTemplateItemAccessHelper.setName(deserializedWhatsAppMessageTemplateItem, name);");
- method.setBody(parseBlock(bodyStr));
- }));
+ clazz.getMethodsByName("fromJson").get(0).setBody(StaticJavaParser.parseBlock(fromJson));
});
});
}
private void removeJsonKnownDiscriminatorMethod(PackageCustomization modelPackage, String className) {
- modelPackage.getClass(className).customizeAst(ast -> ast.getClassByName(className).ifPresent( clazz -> {
- clazz.getMethodsByName("fromJson").forEach(method -> method.getBody().ifPresent(body -> {
- String bodyStr = body.toString().replace("return fromJsonKnownDiscriminator(readerToUse.reset());",
- "throw new IllegalStateException(\"Invalid Kind value - \" +discriminatorValue);");
- method.setBody(parseBlock(bodyStr));
- }));
- clazz.getMethodsByName("fromJsonKnownDiscriminator").forEach(Node::remove);
- }));
+ modelPackage.getClass(className).customizeAst(ast -> {
+ ast.getClassByName(className).ifPresent( clazz -> {
+ String fromJson = clazz.getMethodsByName("fromJson")
+ .get(0).getBody().get().toString()
+ .replace("return fromJsonKnownDiscriminator(readerToUse.reset());",
+ "throw new IllegalStateException(\"Invalid Kind value - \"+discriminatorValue); ");
+ clazz.getMethodsByName("fromJson").get(0).setBody(StaticJavaParser.parseBlock(fromJson));
+ clazz.getMethodsByName("fromJsonKnownDiscriminator").get(0).remove();
+ });
+ });
}
- private void addDeprecateAnnotationToMediaNotificationContent(PackageCustomization modelsPackage) {
- modelsPackage.getClass("MediaNotificationContent").customizeAst(ast -> ast.getClassByName("MediaNotificationContent")
- .ifPresent(clazz -> clazz.addMarkerAnnotation(Deprecated.class).getJavadoc()
- .ifPresent(doc -> {
- // Remove the @deprecated comment as it cause special character and fails in style check
- String description = doc.getDescription().getElements().get(0).toText().replace("@deprecated", "@deprecated");
+ private void AddDeprecateAnnotationToMediaNotificationContent(PackageCustomization modelsPackage) {
+ modelsPackage.getClass("MediaNotificationContent").customizeAst(ast -> {
+ ast.getClassByName("MediaNotificationContent").ifPresent(clazz -> {
+ clazz.addAnnotation(Deprecated.class);
+
+ // Remove the @deprecated comment as it cause special character and fails in style check
+ clazz.getJavadoc().ifPresent(doc -> {
+ String description = doc.getDescription().getElements().get(0).toText()
+ .replace("@deprecated", "@deprecated");
doc.getDescription().getElements().set(0, new JavadocSnippet(description));
clazz.setJavadocComment(doc.toComment());
- })));
- }
-
- private void addDeprecateAnnotationForImageV0CommunicationKind(PackageCustomization modelsPackage) {
- modelsPackage.getClass("CommunicationMessageKind").customizeAst(ast -> ast.getClassByName("CommunicationMessageKind")
- .flatMap(clazz -> clazz.getFieldByName("IMAGE_V0"))
- .ifPresent(f -> {
- f.addMarkerAnnotation(Deprecated.class);
- // Reducing size comment by replacing with @deprecated since it doesn't fit single line and fails in style check
- f.getJavadocComment().ifPresent(comment ->
- f.setJavadocComment(comment.getContent().replace("Image message type.", "@deprecated")));
- }));
- }
-
- private void updateJavaDocForMethodFromJson(PackageCustomization modelPackage, String className) {
- String originalDocText = String.format("@throws IOException If an error occurs while reading the %s.", className);
- modelPackage.getClass(className).customizeAst(ast -> ast.getClassByName(className).ifPresent( clazz ->
- clazz.getMethodsByName("fromJson").forEach(method -> method.getJavadoc().ifPresent(javadoc -> {
- String javadocStr = javadoc.toText().replace(originalDocText, "@throws IllegalStateException If the "
- + "deserialized JSON object was missing any required properties.\n" + originalDocText);
- method.setJavadocComment(javadocStr);
- }))));
- }
-
- private void customizeActionGroup(PackageCustomization modelsPackage) {
- modelsPackage.getClass("ActionGroup").customizeAst(ast -> ast.getClassByName("ActionGroup").ifPresent(clazz -> {
- clazz.getConstructorByParameterTypes(String.class, List.class).ifPresent(ctor -> ctor.setBody(
- parseBlock(ctor.getBody().toString().replace("this.items = items;", "this.items = new ArrayList<>(items);"))));
-
- clazz.getMethodsByName("getItems").forEach(method -> method.getBody().ifPresent(body -> method.setBody(
- parseBlock(body.toString().replace("return this.items;", "return new ArrayList<>(this.items);")))));
- }));
- }
-
- private void customizeActionGroupContent(PackageCustomization modelsPackage) {
- modelsPackage.getClass("ActionGroupContent").customizeAst(ast -> ast.getClassByName("ActionGroupContent").ifPresent(clazz -> {
- clazz.getConstructorByParameterTypes(String.class, List.class).ifPresent(ctor -> ctor.setBody(
- parseBlock(ctor.getBody().toString().replace("this.groups = groups;", "this.groups = new ArrayList<>(groups);"))));
-
- clazz.getMethodsByName("getGroups").forEach(method -> method.getBody().ifPresent(body -> method.setBody(
- parseBlock(body.toString().replace("return this.groups;", "return new ArrayList<>(this.groups);")))));
- }));
+ });
+ });
+ });
}
- private void customizeButtonSetContent(PackageCustomization modelsPackage) {
- modelsPackage.getClass("ButtonSetContent").customizeAst(ast -> ast.getClassByName("ButtonSetContent").ifPresent(clazz -> {
- clazz.getConstructorByParameterTypes(List.class).ifPresent(ctor -> ctor.setBody(parseBlock(
- ctor.getBody().toString().replace("this.buttons = buttons;", "this.buttons = new ArrayList<>(buttons);"))));
-
- clazz.getMethodsByName("getButtons").forEach(method -> method.getBody().ifPresent(body -> method.setBody(
- parseBlock(body.toString().replace("return this.buttons;", "return new ArrayList<>(this.buttons);")))));
- }));
+ private void AddDeprecateAnnotationForImageV0CommunicationKind(PackageCustomization modelsPackage) {
+ modelsPackage.getClass("CommunicationMessageKind").customizeAst(ast -> {
+ ast.getClassByName("CommunicationMessageKind")
+ .flatMap(clazz -> clazz.getFieldByName("IMAGE_V0"))
+ .ifPresent(f -> {
+ f.addAnnotation(Deprecated.class);
+ f.getJavadocComment().ifPresent(comment -> {
+ /*
+ Reducing size comment by replacing with @deprecated since it doesn't fit single line
+ and fails in style check
+ */
+ String content = comment.getContent()
+ .replace("Image message type.", "@deprecated");
+ f.setJavadocComment(content);
+ });
+ });
+ });
}
}
diff --git a/sdk/communication/azure-communication-messages/pom.xml b/sdk/communication/azure-communication-messages/pom.xml
index 18fd282dc5f9..51c9f6bf4acc 100644
--- a/sdk/communication/azure-communication-messages/pom.xml
+++ b/sdk/communication/azure-communication-messages/pom.xml
@@ -14,7 +14,7 @@
com.azure
azure-communication-messages
- 1.2.0-beta.2
+ 1.1.9
jar
Microsoft Azure client library for Azure Communication Services - Messaging application
@@ -46,8 +46,6 @@
0.6
0.6
true
-
- false
diff --git a/sdk/communication/azure-communication-messages/spotbugs-exclude.xml b/sdk/communication/azure-communication-messages/spotbugs-exclude.xml
deleted file mode 100644
index 4a7f5b887613..000000000000
--- a/sdk/communication/azure-communication-messages/spotbugs-exclude.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-
-
-
-
-
-
-
-
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
index 31f5c45866ec..e3dc65dc215b 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java
@@ -327,10 +327,11 @@ private HttpPipeline createHttpPipeline() {
.forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(localHttpLogOptions));
- return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.clientOptions(localClientOptions)
.build();
+ return httpPipeline;
}
/**
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java
index 462bb0b33834..8673e4222036 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/MessagesServiceVersion.java
@@ -18,12 +18,7 @@ public enum MessagesServiceVersion implements ServiceVersion {
/**
* Enum value 2024-08-30.
*/
- V2024_08_30("2024-08-30"),
-
- /**
- * Enum value 2025-01-15-preview.
- */
- V2025_01_15_PREVIEW("2025-01-15-preview");
+ V2024_08_30("2024-08-30");
private final String version;
@@ -45,6 +40,6 @@ public String getVersion() {
* @return The latest {@link MessagesServiceVersion}.
*/
public static MessagesServiceVersion getLatest() {
- return V2025_01_15_PREVIEW;
+ return V2024_08_30;
}
}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
index 655037080cda..435f82449d3b 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java
@@ -55,7 +55,7 @@ public final class NotificationMessagesAsyncClient {
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
index 1d4c46e92ef1..59266523b678 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClient.java
@@ -53,7 +53,7 @@ public final class NotificationMessagesClient {
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java
index af62f5409aa3..aa94c79424f1 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java
@@ -327,10 +327,11 @@ private HttpPipeline createHttpPipeline() {
.forEach(p -> policies.add(p));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(localHttpLogOptions));
- return new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
+ HttpPipeline httpPipeline = new HttpPipelineBuilder().policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.clientOptions(localClientOptions)
.build();
+ return httpPipeline;
}
/**
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java
index a05f5928fdac..a2a0059dda8b 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java
@@ -153,7 +153,7 @@ public MessageTemplateClientImpl(HttpPipeline httpPipeline, SerializerAdapter se
* calls.
*/
@Host("{endpoint}")
- @ServiceInterface(name = "MessageTemplateClient")
+ @ServiceInterface(name = "MessageTemplateClien")
public interface MessageTemplateClientService {
@Get("/messages/channels/{channelId}/templates")
@ExpectedResponses({ 200 })
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
index 152420a68ace..a9176df99148 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java
@@ -151,7 +151,7 @@ public NotificationMessagesClientImpl(HttpPipeline httpPipeline, SerializerAdapt
* REST calls.
*/
@Host("{endpoint}")
- @ServiceInterface(name = "NotificationMessagesClient")
+ @ServiceInterface(name = "NotificationMessages")
public interface NotificationMessagesClientService {
@Post("/messages/notifications:send")
@ExpectedResponses({ 202 })
@@ -212,7 +212,7 @@ Response downloadMediaSync(@HostParam("endpoint") String endpoint,
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
@@ -284,7 +284,7 @@ public Mono> sendWithResponseAsync(BinaryData notificationC
*
* {@code
* {
- * kind: String(text/image/image_v0/document/video/audio/template/sticker/reaction/interactive) (Required)
+ * kind: String(text/image/image_v0/document/video/audio/template) (Required)
* channelRegistrationId: String (Required)
* to (Required): [
* String (Required)
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java
deleted file mode 100644
index e11152962e27..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionBindings.java
+++ /dev/null
@@ -1,96 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings;
-import com.azure.communication.messages.models.channels.WhatsAppListActionBindings;
-import com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * Binding actions to the interactive message.
- */
-@Immutable
-public abstract class ActionBindings implements JsonSerializable {
-
- /*
- * Kind of the MessageActionBinding.
- */
- @Generated
- private MessageActionBindingKind kind = MessageActionBindingKind.fromString("ActionBindings");
-
- /**
- * Creates an instance of ActionBindings class.
- */
- @Generated
- protected ActionBindings() {
- }
-
- /**
- * Get the kind property: Kind of the MessageActionBinding.
- *
- * @return the kind value.
- */
- @Generated
- public MessageActionBindingKind getKind() {
- return this.kind;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ActionBindings from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ActionBindings if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ActionBindings.
- */
- @Generated
- public static ActionBindings fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String discriminatorValue = null;
- try (JsonReader readerToUse = reader.bufferObject()) {
- // Prepare for reading
- readerToUse.nextToken();
- while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = readerToUse.getFieldName();
- readerToUse.nextToken();
- if ("kind".equals(fieldName)) {
- discriminatorValue = readerToUse.getString();
- break;
- } else {
- readerToUse.skipChildren();
- }
- }
- // Use the discriminator value to determine which subtype should be deserialized.
- if ("whatsAppListAction".equals(discriminatorValue)) {
- return WhatsAppListActionBindings.fromJson(readerToUse.reset());
- } else if ("whatsAppButtonAction".equals(discriminatorValue)) {
- return WhatsAppButtonActionBindings.fromJson(readerToUse.reset());
- } else if ("whatsAppUrlAction".equals(discriminatorValue)) {
- return WhatsAppUrlActionBindings.fromJson(readerToUse.reset());
- } else {
- throw new IllegalStateException("Invalid Kind value - " + discriminatorValue);
- }
- }
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java
deleted file mode 100644
index 74f4f2309fd5..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroup.java
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The Action Group content.
- */
-@Immutable
-public final class ActionGroup implements JsonSerializable {
-
- /*
- * Title of the ActionGroup.
- */
- @Generated
- private final String title;
-
- /*
- * Array of items in ActionGroup.
- */
- @Generated
- private final List items;
-
- /**
- * Creates an instance of ActionGroup class.
- *
- * @param title the title value to set.
- * @param items the items value to set.
- */
- @Generated
- public ActionGroup(String title, List items) {
- this.title = title;
- this.items = new ArrayList<>(items);
- }
-
- /**
- * Get the title property: Title of the ActionGroup.
- *
- * @return the title value.
- */
- @Generated
- public String getTitle() {
- return this.title;
- }
-
- /**
- * Get the items property: Array of items in ActionGroup.
- *
- * @return the items value.
- */
- @Generated
- public List getItems() {
- return new ArrayList<>(this.items);
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("title", this.title);
- jsonWriter.writeArrayField("items", this.items, (writer, element) -> writer.writeJson(element));
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ActionGroup from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ActionGroup if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ActionGroup.
- */
- @Generated
- public static ActionGroup fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String title = null;
- List items = null;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("title".equals(fieldName)) {
- title = reader.getString();
- } else if ("items".equals(fieldName)) {
- items = reader.readArray(reader1 -> ActionGroupItem.fromJson(reader1));
- } else {
- reader.skipChildren();
- }
- }
- return new ActionGroup(title, items);
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java
deleted file mode 100644
index ec8825ce37ee..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupContent.java
+++ /dev/null
@@ -1,128 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The action content of type ActionGroup.
- */
-@Immutable
-public final class ActionGroupContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.GROUP;
-
- /*
- * Title of the actionGroup content.
- */
- @Generated
- private final String title;
-
- /*
- * Set or group of actions.
- */
- @Generated
- private final List groups;
-
- /**
- * Creates an instance of ActionGroupContent class.
- *
- * @param title the title value to set.
- * @param groups the groups value to set.
- */
- @Generated
- public ActionGroupContent(String title, List groups) {
- this.title = title;
- this.groups = new ArrayList<>(groups);
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the title property: Title of the actionGroup content.
- *
- * @return the title value.
- */
- @Generated
- public String getTitle() {
- return this.title;
- }
-
- /**
- * Get the groups property: Set or group of actions.
- *
- * @return the groups value.
- */
- @Generated
- public List getGroups() {
- return new ArrayList<>(this.groups);
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("title", this.title);
- jsonWriter.writeArrayField("groups", this.groups, (writer, element) -> writer.writeJson(element));
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ActionGroupContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ActionGroupContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ActionGroupContent.
- */
- @Generated
- public static ActionGroupContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String title = null;
- List groups = null;
- MessageContentKind kind = MessageContentKind.GROUP;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("title".equals(fieldName)) {
- title = reader.getString();
- } else if ("groups".equals(fieldName)) {
- groups = reader.readArray(reader1 -> ActionGroup.fromJson(reader1));
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- ActionGroupContent deserializedActionGroupContent = new ActionGroupContent(title, groups);
- deserializedActionGroupContent.kind = kind;
- return deserializedActionGroupContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java
deleted file mode 100644
index 9fa292486f2d..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ActionGroupItem.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The Action group item in the content.
- */
-@Immutable
-public final class ActionGroupItem implements JsonSerializable {
-
- /*
- * Id of the Item.
- */
- @Generated
- private final String id;
-
- /*
- * Title of the Item.
- */
- @Generated
- private final String title;
-
- /*
- * Description of the Item.
- */
- @Generated
- private final String description;
-
- /**
- * Creates an instance of ActionGroupItem class.
- *
- * @param id the id value to set.
- * @param title the title value to set.
- * @param description the description value to set.
- */
- @Generated
- public ActionGroupItem(String id, String title, String description) {
- this.id = id;
- this.title = title;
- this.description = description;
- }
-
- /**
- * Get the id property: Id of the Item.
- *
- * @return the id value.
- */
- @Generated
- public String getId() {
- return this.id;
- }
-
- /**
- * Get the title property: Title of the Item.
- *
- * @return the title value.
- */
- @Generated
- public String getTitle() {
- return this.title;
- }
-
- /**
- * Get the description property: Description of the Item.
- *
- * @return the description value.
- */
- @Generated
- public String getDescription() {
- return this.description;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("id", this.id);
- jsonWriter.writeStringField("title", this.title);
- jsonWriter.writeStringField("description", this.description);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ActionGroupItem from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ActionGroupItem if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ActionGroupItem.
- */
- @Generated
- public static ActionGroupItem fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String id = null;
- String title = null;
- String description = null;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("id".equals(fieldName)) {
- id = reader.getString();
- } else if ("title".equals(fieldName)) {
- title = reader.getString();
- } else if ("description".equals(fieldName)) {
- description = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
- return new ActionGroupItem(id, title, description);
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/AudioNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/AudioNotificationContent.java
index 6f4a8b74e90a..450865f37efc 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/AudioNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/AudioNotificationContent.java
@@ -18,7 +18,7 @@
public final class AudioNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.AUDIO;
@@ -43,7 +43,7 @@ public AudioNotificationContent(String channelRegistrationId, List to, S
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java
deleted file mode 100644
index a548f12070f8..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonContent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type Button information.
- */
-@Immutable
-public final class ButtonContent implements JsonSerializable {
-
- /*
- * Unique Id of the button content.
- */
- @Generated
- private final String id;
-
- /*
- * Title of the button content.
- */
- @Generated
- private final String title;
-
- /**
- * Creates an instance of ButtonContent class.
- *
- * @param id the id value to set.
- * @param title the title value to set.
- */
- @Generated
- public ButtonContent(String id, String title) {
- this.id = id;
- this.title = title;
- }
-
- /**
- * Get the id property: Unique Id of the button content.
- *
- * @return the id value.
- */
- @Generated
- public String getId() {
- return this.id;
- }
-
- /**
- * Get the title property: Title of the button content.
- *
- * @return the title value.
- */
- @Generated
- public String getTitle() {
- return this.title;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("id", this.id);
- jsonWriter.writeStringField("title", this.title);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ButtonContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ButtonContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ButtonContent.
- */
- @Generated
- public static ButtonContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String id = null;
- String title = null;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("id".equals(fieldName)) {
- id = reader.getString();
- } else if ("title".equals(fieldName)) {
- title = reader.getString();
- } else {
- reader.skipChildren();
- }
- }
- return new ButtonContent(id, title);
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java
deleted file mode 100644
index 9e5dfc65ed4c..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ButtonSetContent.java
+++ /dev/null
@@ -1,106 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * The message content of type ButtonSet/ List of buttons information.
- */
-@Immutable
-public final class ButtonSetContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.BUTTON_SET;
-
- /*
- * Unique Id of the button content.
- */
- @Generated
- private final List buttons;
-
- /**
- * Creates an instance of ButtonSetContent class.
- *
- * @param buttons the buttons value to set.
- */
- @Generated
- public ButtonSetContent(List buttons) {
- this.buttons = new ArrayList<>(buttons);
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the buttons property: Unique Id of the button content.
- *
- * @return the buttons value.
- */
- @Generated
- public List getButtons() {
- return new ArrayList<>(this.buttons);
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeArrayField("buttons", this.buttons, (writer, element) -> writer.writeJson(element));
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ButtonSetContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ButtonSetContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ButtonSetContent.
- */
- @Generated
- public static ButtonSetContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- List buttons = null;
- MessageContentKind kind = MessageContentKind.BUTTON_SET;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("buttons".equals(fieldName)) {
- buttons = reader.readArray(reader1 -> ButtonContent.fromJson(reader1));
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- ButtonSetContent deserializedButtonSetContent = new ButtonSetContent(buttons);
- deserializedButtonSetContent.kind = kind;
- return deserializedButtonSetContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
index 37bcedf44f66..b07ef3e8bcbf 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java
@@ -83,24 +83,6 @@ public static Collection values() {
* @deprecated Legacy image type for `MediaNotificationContent` which is being deprecated.
*/
@Generated
- @Deprecated
+ @Deprecated()
public static final CommunicationMessageKind IMAGE_V0 = fromString("image_v0");
-
- /**
- * Sticker message type.
- */
- @Generated
- public static final CommunicationMessageKind STICKER = fromString("sticker");
-
- /**
- * Reaction message type.
- */
- @Generated
- public static final CommunicationMessageKind REACTION = fromString("reaction");
-
- /**
- * Interactive Actionable message type.
- */
- @Generated
- public static final CommunicationMessageKind INTERACTIVE = fromString("interactive");
}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java
deleted file mode 100644
index e0bcd4e1ba48..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type document information.
- */
-@Immutable
-public final class DocumentMessageContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.DOCUMENT;
-
- /*
- * MediaUri of the media content.
- */
- @Generated
- private final String mediaUrl;
-
- /**
- * Creates an instance of DocumentMessageContent class.
- *
- * @param mediaUrl the mediaUrl value to set.
- */
- @Generated
- public DocumentMessageContent(String mediaUrl) {
- this.mediaUrl = mediaUrl;
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the mediaUrl property: MediaUri of the media content.
- *
- * @return the mediaUrl value.
- */
- @Generated
- public String getMediaUrl() {
- return this.mediaUrl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("mediaUri", this.mediaUrl);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of DocumentMessageContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of DocumentMessageContent if the JsonReader was pointing to an instance of it, or null if it
- * was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the DocumentMessageContent.
- */
- @Generated
- public static DocumentMessageContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String mediaUrl = null;
- MessageContentKind kind = MessageContentKind.DOCUMENT;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("mediaUri".equals(fieldName)) {
- mediaUrl = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- DocumentMessageContent deserializedDocumentMessageContent = new DocumentMessageContent(mediaUrl);
- deserializedDocumentMessageContent.kind = kind;
- return deserializedDocumentMessageContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentNotificationContent.java
index f9de1f6f077f..d3f208b26731 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/DocumentNotificationContent.java
@@ -18,7 +18,7 @@
public final class DocumentNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.DOCUMENT;
@@ -49,7 +49,7 @@ public DocumentNotificationContent(String channelRegistrationId, List to
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java
deleted file mode 100644
index 11a8a5088753..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageMessageContent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type image information.
- */
-@Immutable
-public final class ImageMessageContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.IMAGE;
-
- /*
- * MediaUri of the media content.
- */
- @Generated
- private final String mediaUrl;
-
- /**
- * Creates an instance of ImageMessageContent class.
- *
- * @param mediaUrl the mediaUrl value to set.
- */
- @Generated
- public ImageMessageContent(String mediaUrl) {
- this.mediaUrl = mediaUrl;
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the mediaUrl property: MediaUri of the media content.
- *
- * @return the mediaUrl value.
- */
- @Generated
- public String getMediaUrl() {
- return this.mediaUrl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("mediaUri", this.mediaUrl);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ImageMessageContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ImageMessageContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ImageMessageContent.
- */
- @Generated
- public static ImageMessageContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String mediaUrl = null;
- MessageContentKind kind = MessageContentKind.IMAGE;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("mediaUri".equals(fieldName)) {
- mediaUrl = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- ImageMessageContent deserializedImageMessageContent = new ImageMessageContent(mediaUrl);
- deserializedImageMessageContent.kind = kind;
- return deserializedImageMessageContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageNotificationContent.java
index 9b5fbb70e623..d0f98ff2112e 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ImageNotificationContent.java
@@ -18,7 +18,7 @@
public final class ImageNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.IMAGE;
@@ -43,7 +43,7 @@ public ImageNotificationContent(String channelRegistrationId, List to, S
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java
deleted file mode 100644
index 1a66a31647f1..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveMessage.java
+++ /dev/null
@@ -1,170 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.annotation.Generated;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The Interactive message content to which user can read and respond.
- */
-@Fluent
-public final class InteractiveMessage implements JsonSerializable {
-
- /*
- * Gets or Sets Header content. Supports the following types:text, images etc.
- */
- @Generated
- private MessageContent headerProperty;
-
- /*
- * Gets or Sets Message body content. Emojis, markdown, and links are supported.
- */
- @Generated
- private final TextMessageContent body;
-
- /*
- * Gets or Sets Message footer content. Emojis, markdown, and links are supported.
- */
- @Generated
- private TextMessageContent footer;
-
- /*
- * The binding object to get or set Action which describes options user have to respond to message.
- */
- @Generated
- private final ActionBindings action;
-
- /**
- * Creates an instance of InteractiveMessage class.
- *
- * @param body the body value to set.
- * @param action the action value to set.
- */
- @Generated
- public InteractiveMessage(TextMessageContent body, ActionBindings action) {
- this.body = body;
- this.action = action;
- }
-
- /**
- * Get the body property: Gets or Sets Message body content. Emojis, markdown, and links are supported.
- *
- * @return the body value.
- */
- @Generated
- public TextMessageContent getBody() {
- return this.body;
- }
-
- /**
- * Get the footer property: Gets or Sets Message footer content. Emojis, markdown, and links are supported.
- *
- * @return the footer value.
- */
- @Generated
- public TextMessageContent getFooter() {
- return this.footer;
- }
-
- /**
- * Set the footer property: Gets or Sets Message footer content. Emojis, markdown, and links are supported.
- *
- * @param footer the footer value to set.
- * @return the InteractiveMessage object itself.
- */
- @Generated
- public InteractiveMessage setFooter(TextMessageContent footer) {
- this.footer = footer;
- return this;
- }
-
- /**
- * Get the action property: The binding object to get or set Action which describes options user have to respond to
- * message.
- *
- * @return the action value.
- */
- @Generated
- public ActionBindings getAction() {
- return this.action;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("body", this.body);
- jsonWriter.writeJsonField("action", this.action);
- jsonWriter.writeJsonField("header", this.headerProperty);
- jsonWriter.writeJsonField("footer", this.footer);
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of InteractiveMessage from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of InteractiveMessage if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the InteractiveMessage.
- */
- @Generated
- public static InteractiveMessage fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- TextMessageContent body = null;
- ActionBindings action = null;
- MessageContent headerProperty = null;
- TextMessageContent footer = null;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("body".equals(fieldName)) {
- body = TextMessageContent.fromJson(reader);
- } else if ("action".equals(fieldName)) {
- action = ActionBindings.fromJson(reader);
- } else if ("header".equals(fieldName)) {
- headerProperty = MessageContent.fromJson(reader);
- } else if ("footer".equals(fieldName)) {
- footer = TextMessageContent.fromJson(reader);
- } else {
- reader.skipChildren();
- }
- }
- InteractiveMessage deserializedInteractiveMessage = new InteractiveMessage(body, action);
- deserializedInteractiveMessage.headerProperty = headerProperty;
- deserializedInteractiveMessage.footer = footer;
- return deserializedInteractiveMessage;
- });
- }
-
- /**
- * Get the headerProperty property: Gets or Sets Header content. Supports the following types:text, images etc.
- *
- * @return the headerProperty value.
- */
- public MessageContent getHeader() {
- return this.headerProperty;
- }
-
- /**
- * Set the header property: Gets or Sets Header content. Supports the following types:text, images etc.
- *
- * @param header the header value to set.
- * @return the InteractiveMessage object itself.
- */
- public InteractiveMessage setHeader(MessageContent header) {
- this.headerProperty = header;
- return this;
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java
deleted file mode 100644
index f7a006aa4540..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * A request to send an Interactive message notification.
- */
-@Immutable
-public final class InteractiveNotificationContent extends NotificationContent {
-
- /*
- * The type discriminator describing a message type.
- */
- @Generated
- private CommunicationMessageKind kind = CommunicationMessageKind.INTERACTIVE;
-
- /*
- * The interactive message content.
- */
- @Generated
- private final InteractiveMessage interactiveMessage;
-
- /**
- * Creates an instance of InteractiveNotificationContent class.
- *
- * @param channelRegistrationId the channelRegistrationId value to set.
- * @param to the to value to set.
- * @param interactiveMessage the interactiveMessage value to set.
- */
- @Generated
- public InteractiveNotificationContent(String channelRegistrationId, List to,
- InteractiveMessage interactiveMessage) {
- super(channelRegistrationId, to);
- this.interactiveMessage = interactiveMessage;
- }
-
- /**
- * Get the kind property: The type discriminator describing a message type.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public CommunicationMessageKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the interactiveMessage property: The interactive message content.
- *
- * @return the interactiveMessage value.
- */
- @Generated
- public InteractiveMessage getInteractiveMessage() {
- return this.interactiveMessage;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
- jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeJsonField("interactiveMessage", this.interactiveMessage);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of InteractiveNotificationContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of InteractiveNotificationContent if the JsonReader was pointing to an instance of it, or
- * null if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the InteractiveNotificationContent.
- */
- @Generated
- public static InteractiveNotificationContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String channelRegistrationId = null;
- List to = null;
- InteractiveMessage interactiveMessage = null;
- CommunicationMessageKind kind = CommunicationMessageKind.INTERACTIVE;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("channelRegistrationId".equals(fieldName)) {
- channelRegistrationId = reader.getString();
- } else if ("to".equals(fieldName)) {
- to = reader.readArray(reader1 -> reader1.getString());
- } else if ("interactiveMessage".equals(fieldName)) {
- interactiveMessage = InteractiveMessage.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- kind = CommunicationMessageKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- InteractiveNotificationContent deserializedInteractiveNotificationContent
- = new InteractiveNotificationContent(channelRegistrationId, to, interactiveMessage);
- deserializedInteractiveNotificationContent.kind = kind;
- return deserializedInteractiveNotificationContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java
deleted file mode 100644
index 9d7e2cbff8e6..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/LinkContent.java
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type Url information.
- */
-@Immutable
-public final class LinkContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.URL;
-
- /*
- * Title of the url content.
- */
- @Generated
- private final String title;
-
- /*
- * The url in the content.
- */
- @Generated
- private final String url;
-
- /**
- * Creates an instance of LinkContent class.
- *
- * @param title the title value to set.
- * @param url the url value to set.
- */
- @Generated
- public LinkContent(String title, String url) {
- this.title = title;
- this.url = url;
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the title property: Title of the url content.
- *
- * @return the title value.
- */
- @Generated
- public String getTitle() {
- return this.title;
- }
-
- /**
- * Get the url property: The url in the content.
- *
- * @return the url value.
- */
- @Generated
- public String getUrl() {
- return this.url;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("title", this.title);
- jsonWriter.writeStringField("url", this.url);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of LinkContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of LinkContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the LinkContent.
- */
- @Generated
- public static LinkContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String title = null;
- String url = null;
- MessageContentKind kind = MessageContentKind.URL;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("title".equals(fieldName)) {
- title = reader.getString();
- } else if ("url".equals(fieldName)) {
- url = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- LinkContent deserializedLinkContent = new LinkContent(title, url);
- deserializedLinkContent.kind = kind;
- return deserializedLinkContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MediaNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MediaNotificationContent.java
index 94cf70f888aa..ad58f904a703 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MediaNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MediaNotificationContent.java
@@ -15,11 +15,11 @@
* @deprecated A request to send an image notification.
*/
@Fluent
-@Deprecated
+@Deprecated()
public final class MediaNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.IMAGE_V0;
@@ -50,7 +50,7 @@ public MediaNotificationContent(String channelRegistrationId, List to, S
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java
deleted file mode 100644
index 343f058f887a..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.util.ExpandableStringEnum;
-import java.util.Collection;
-
-/**
- * The Kind of interactive message channel action binding like WhatsAppListAction.
- */
-public final class MessageActionBindingKind extends ExpandableStringEnum {
-
- /**
- * The WhatsApp List action binding kind.
- */
- @Generated
- public static final MessageActionBindingKind WHATS_APP_LIST_ACTION = fromString("whatsAppListAction");
-
- /**
- * The WhatsApp Button action binding kind.
- */
- @Generated
- public static final MessageActionBindingKind WHATS_APP_BUTTON_ACTION = fromString("whatsAppButtonAction");
-
- /**
- * The WhatsApp Url action binding kind.
- */
- @Generated
- public static final MessageActionBindingKind WHATS_APP_URL_ACTION = fromString("whatsAppUrlAction");
-
- /**
- * Creates a new instance of MessageActionBindingKind value.
- *
- * @deprecated Use the {@link #fromString(String)} factory method.
- */
- @Generated
- @Deprecated
- public MessageActionBindingKind() {
- }
-
- /**
- * Creates or finds a MessageActionBindingKind from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding MessageActionBindingKind.
- */
- @Generated
- public static MessageActionBindingKind fromString(String name) {
- return fromString(name, MessageActionBindingKind.class);
- }
-
- /**
- * Gets known MessageActionBindingKind values.
- *
- * @return known MessageActionBindingKind values.
- */
- @Generated
- public static Collection values() {
- return values(MessageActionBindingKind.class);
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java
deleted file mode 100644
index 55eab96b6f6d..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContent.java
+++ /dev/null
@@ -1,101 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonSerializable;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content object used to create interactive messages components.
- */
-@Immutable
-public abstract class MessageContent implements JsonSerializable {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.fromString("MessageContent");
-
- /**
- * Creates an instance of MessageContent class.
- */
- @Generated
- protected MessageContent() {
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of MessageContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of MessageContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the MessageContent.
- */
- @Generated
- public static MessageContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String discriminatorValue = null;
- try (JsonReader readerToUse = reader.bufferObject()) {
- // Prepare for reading
- readerToUse.nextToken();
- while (readerToUse.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = readerToUse.getFieldName();
- readerToUse.nextToken();
- if ("kind".equals(fieldName)) {
- discriminatorValue = readerToUse.getString();
- break;
- } else {
- readerToUse.skipChildren();
- }
- }
- // Use the discriminator value to determine which subtype should be deserialized.
- if ("text".equals(discriminatorValue)) {
- return TextMessageContent.fromJson(readerToUse.reset());
- } else if ("document".equals(discriminatorValue)) {
- return DocumentMessageContent.fromJson(readerToUse.reset());
- } else if ("image".equals(discriminatorValue)) {
- return ImageMessageContent.fromJson(readerToUse.reset());
- } else if ("video".equals(discriminatorValue)) {
- return VideoMessageContent.fromJson(readerToUse.reset());
- } else if ("buttonSet".equals(discriminatorValue)) {
- return ButtonSetContent.fromJson(readerToUse.reset());
- } else if ("url".equals(discriminatorValue)) {
- return LinkContent.fromJson(readerToUse.reset());
- } else if ("group".equals(discriminatorValue)) {
- return ActionGroupContent.fromJson(readerToUse.reset());
- } else {
- throw new IllegalStateException("Invalid Kind value - " + discriminatorValue);
- }
- }
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java
deleted file mode 100644
index 763a4efb1cff..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/MessageContentKind.java
+++ /dev/null
@@ -1,87 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.util.ExpandableStringEnum;
-import java.util.Collection;
-
-/**
- * The kind of Interactive message content.
- */
-public final class MessageContentKind extends ExpandableStringEnum {
-
- /**
- * The text content type.
- */
- @Generated
- public static final MessageContentKind TEXT = fromString("text");
-
- /**
- * The image content type.
- */
- @Generated
- public static final MessageContentKind IMAGE = fromString("image");
-
- /**
- * The video content type.
- */
- @Generated
- public static final MessageContentKind VIDEO = fromString("video");
-
- /**
- * The document content type.
- */
- @Generated
- public static final MessageContentKind DOCUMENT = fromString("document");
-
- /**
- * The ActionSet content type.
- */
- @Generated
- public static final MessageContentKind GROUP = fromString("group");
-
- /**
- * The ButtonSet content type.
- */
- @Generated
- public static final MessageContentKind BUTTON_SET = fromString("buttonSet");
-
- /**
- * The Url content type.
- */
- @Generated
- public static final MessageContentKind URL = fromString("url");
-
- /**
- * Creates a new instance of MessageContentKind value.
- *
- * @deprecated Use the {@link #fromString(String)} factory method.
- */
- @Generated
- @Deprecated
- public MessageContentKind() {
- }
-
- /**
- * Creates or finds a MessageContentKind from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding MessageContentKind.
- */
- @Generated
- public static MessageContentKind fromString(String name) {
- return fromString(name, MessageContentKind.class);
- }
-
- /**
- * Gets known MessageContentKind values.
- *
- * @return known MessageContentKind values.
- */
- @Generated
- public static Collection values() {
- return values(MessageContentKind.class);
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
index b3208da9c8f2..cd28761960e1 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/NotificationContent.java
@@ -19,7 +19,7 @@
public abstract class NotificationContent implements JsonSerializable {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.fromString("NotificationContent");
@@ -49,7 +49,7 @@ protected NotificationContent(String channelRegistrationId, List to) {
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
@@ -130,12 +130,6 @@ public static NotificationContent fromJson(JsonReader jsonReader) throws IOExcep
return VideoNotificationContent.fromJson(readerToUse.reset());
} else if ("audio".equals(discriminatorValue)) {
return AudioNotificationContent.fromJson(readerToUse.reset());
- } else if ("reaction".equals(discriminatorValue)) {
- return ReactionNotificationContent.fromJson(readerToUse.reset());
- } else if ("sticker".equals(discriminatorValue)) {
- return StickerNotificationContent.fromJson(readerToUse.reset());
- } else if ("interactive".equals(discriminatorValue)) {
- return InteractiveNotificationContent.fromJson(readerToUse.reset());
} else if ("template".equals(discriminatorValue)) {
return TemplateNotificationContent.fromJson(readerToUse.reset());
} else {
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java
deleted file mode 100644
index 4c7c6487ce4d..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java
+++ /dev/null
@@ -1,139 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * A request to send a Reaction notification.
- */
-@Immutable
-public final class ReactionNotificationContent extends NotificationContent {
-
- /*
- * The type discriminator describing a message type.
- */
- @Generated
- private CommunicationMessageKind kind = CommunicationMessageKind.REACTION;
-
- /*
- * emoji content like \uD83D\uDE00.
- */
- @Generated
- private final String emoji;
-
- /*
- * ID of the previous message you want to reply to.
- */
- @Generated
- private final String messageId;
-
- /**
- * Creates an instance of ReactionNotificationContent class.
- *
- * @param channelRegistrationId the channelRegistrationId value to set.
- * @param to the to value to set.
- * @param emoji the emoji value to set.
- * @param messageId the messageId value to set.
- */
- @Generated
- public ReactionNotificationContent(String channelRegistrationId, List to, String emoji, String messageId) {
- super(channelRegistrationId, to);
- this.emoji = emoji;
- this.messageId = messageId;
- }
-
- /**
- * Get the kind property: The type discriminator describing a message type.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public CommunicationMessageKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the emoji property: emoji content like \uD83D\uDE00.
- *
- * @return the emoji value.
- */
- @Generated
- public String getEmoji() {
- return this.emoji;
- }
-
- /**
- * Get the messageId property: ID of the previous message you want to reply to.
- *
- * @return the messageId value.
- */
- @Generated
- public String getMessageId() {
- return this.messageId;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
- jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeStringField("emoji", this.emoji);
- jsonWriter.writeStringField("messageId", this.messageId);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of ReactionNotificationContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of ReactionNotificationContent if the JsonReader was pointing to an instance of it, or null
- * if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the ReactionNotificationContent.
- */
- @Generated
- public static ReactionNotificationContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String channelRegistrationId = null;
- List to = null;
- String emoji = null;
- String messageId = null;
- CommunicationMessageKind kind = CommunicationMessageKind.REACTION;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("channelRegistrationId".equals(fieldName)) {
- channelRegistrationId = reader.getString();
- } else if ("to".equals(fieldName)) {
- to = reader.readArray(reader1 -> reader1.getString());
- } else if ("emoji".equals(fieldName)) {
- emoji = reader.getString();
- } else if ("messageId".equals(fieldName)) {
- messageId = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = CommunicationMessageKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- ReactionNotificationContent deserializedReactionNotificationContent
- = new ReactionNotificationContent(channelRegistrationId, to, emoji, messageId);
- deserializedReactionNotificationContent.kind = kind;
- return deserializedReactionNotificationContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java
deleted file mode 100644
index ce0ef4bc61bb..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java
+++ /dev/null
@@ -1,118 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-import java.util.List;
-
-/**
- * A request to send a Sticker notification.
- */
-@Immutable
-public final class StickerNotificationContent extends NotificationContent {
-
- /*
- * The type discriminator describing a message type.
- */
- @Generated
- private CommunicationMessageKind kind = CommunicationMessageKind.STICKER;
-
- /*
- * A media url for the file. Required if the type is one of the supported media types, e.g. image
- */
- @Generated
- private final String mediaUrl;
-
- /**
- * Creates an instance of StickerNotificationContent class.
- *
- * @param channelRegistrationId the channelRegistrationId value to set.
- * @param to the to value to set.
- * @param mediaUrl the mediaUrl value to set.
- */
- @Generated
- public StickerNotificationContent(String channelRegistrationId, List to, String mediaUrl) {
- super(channelRegistrationId, to);
- this.mediaUrl = mediaUrl;
- }
-
- /**
- * Get the kind property: The type discriminator describing a message type.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public CommunicationMessageKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the mediaUrl property: A media url for the file. Required if the type is one of the supported media types,
- * e.g. image.
- *
- * @return the mediaUrl value.
- */
- @Generated
- public String getMediaUrl() {
- return this.mediaUrl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("channelRegistrationId", getChannelRegistrationId());
- jsonWriter.writeArrayField("to", getTo(), (writer, element) -> writer.writeString(element));
- jsonWriter.writeStringField("mediaUri", this.mediaUrl);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of StickerNotificationContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of StickerNotificationContent if the JsonReader was pointing to an instance of it, or null if
- * it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the StickerNotificationContent.
- */
- @Generated
- public static StickerNotificationContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String channelRegistrationId = null;
- List to = null;
- String mediaUrl = null;
- CommunicationMessageKind kind = CommunicationMessageKind.STICKER;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("channelRegistrationId".equals(fieldName)) {
- channelRegistrationId = reader.getString();
- } else if ("to".equals(fieldName)) {
- to = reader.readArray(reader1 -> reader1.getString());
- } else if ("mediaUri".equals(fieldName)) {
- mediaUrl = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = CommunicationMessageKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- StickerNotificationContent deserializedStickerNotificationContent
- = new StickerNotificationContent(channelRegistrationId, to, mediaUrl);
- deserializedStickerNotificationContent.kind = kind;
- return deserializedStickerNotificationContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TemplateNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TemplateNotificationContent.java
index 04cdedd7e04e..3f76dd37b238 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TemplateNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TemplateNotificationContent.java
@@ -18,7 +18,7 @@
public final class TemplateNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.TEMPLATE;
@@ -43,7 +43,7 @@ public TemplateNotificationContent(String channelRegistrationId, List to
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java
deleted file mode 100644
index 31dbc6fc15a7..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextMessageContent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type text information.
- */
-@Immutable
-public final class TextMessageContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.TEXT;
-
- /*
- * The text value.
- */
- @Generated
- private final String text;
-
- /**
- * Creates an instance of TextMessageContent class.
- *
- * @param text the text value to set.
- */
- @Generated
- public TextMessageContent(String text) {
- this.text = text;
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the text property: The text value.
- *
- * @return the text value.
- */
- @Generated
- public String getText() {
- return this.text;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("text", this.text);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of TextMessageContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of TextMessageContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the TextMessageContent.
- */
- @Generated
- public static TextMessageContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String text = null;
- MessageContentKind kind = MessageContentKind.TEXT;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("text".equals(fieldName)) {
- text = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- TextMessageContent deserializedTextMessageContent = new TextMessageContent(text);
- deserializedTextMessageContent.kind = kind;
- return deserializedTextMessageContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextNotificationContent.java
index 873418c8279e..59ad2ed12bb5 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/TextNotificationContent.java
@@ -18,7 +18,7 @@
public final class TextNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.TEXT;
@@ -43,7 +43,7 @@ public TextNotificationContent(String channelRegistrationId, List to, St
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java
deleted file mode 100644
index 736d48581889..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoMessageContent.java
+++ /dev/null
@@ -1,104 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models;
-
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * The message content of type video information.
- */
-@Immutable
-public final class VideoMessageContent extends MessageContent {
-
- /*
- * Kind of MessageContent.
- */
- @Generated
- private MessageContentKind kind = MessageContentKind.VIDEO;
-
- /*
- * MediaUri of the media content.
- */
- @Generated
- private final String mediaUrl;
-
- /**
- * Creates an instance of VideoMessageContent class.
- *
- * @param mediaUrl the mediaUrl value to set.
- */
- @Generated
- public VideoMessageContent(String mediaUrl) {
- this.mediaUrl = mediaUrl;
- }
-
- /**
- * Get the kind property: Kind of MessageContent.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageContentKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the mediaUrl property: MediaUri of the media content.
- *
- * @return the mediaUrl value.
- */
- @Generated
- public String getMediaUrl() {
- return this.mediaUrl;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeStringField("mediaUri", this.mediaUrl);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of VideoMessageContent from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of VideoMessageContent if the JsonReader was pointing to an instance of it, or null if it was
- * pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the VideoMessageContent.
- */
- @Generated
- public static VideoMessageContent fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- String mediaUrl = null;
- MessageContentKind kind = MessageContentKind.VIDEO;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("mediaUri".equals(fieldName)) {
- mediaUrl = reader.getString();
- } else if ("kind".equals(fieldName)) {
- kind = MessageContentKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- VideoMessageContent deserializedVideoMessageContent = new VideoMessageContent(mediaUrl);
- deserializedVideoMessageContent.kind = kind;
- return deserializedVideoMessageContent;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoNotificationContent.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoNotificationContent.java
index 8caaaf7b1b46..506f0befb260 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoNotificationContent.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/VideoNotificationContent.java
@@ -18,7 +18,7 @@
public final class VideoNotificationContent extends NotificationContent {
/*
- * The type discriminator describing a message type.
+ * The type discriminator describing a notification type.
*/
@Generated
private CommunicationMessageKind kind = CommunicationMessageKind.VIDEO;
@@ -43,7 +43,7 @@ public VideoNotificationContent(String channelRegistrationId, List to, S
}
/**
- * Get the kind property: The type discriminator describing a message type.
+ * Get the kind property: The type discriminator describing a notification type.
*
* @return the kind value.
*/
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java
deleted file mode 100644
index ede678fd1e87..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java
+++ /dev/null
@@ -1,108 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models.channels;
-
-import com.azure.communication.messages.models.ActionBindings;
-import com.azure.communication.messages.models.ButtonSetContent;
-import com.azure.communication.messages.models.MessageActionBindingKind;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * WhatsApp Binding actions to the interactive message.
- */
-@Immutable
-public final class WhatsAppButtonActionBindings extends ActionBindings {
-
- /*
- * Kind of the MessageActionBinding.
- */
- @Generated
- private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_BUTTON_ACTION;
-
- /*
- * Action content of Interactive message.
- */
- @Generated
- private final ButtonSetContent content;
-
- /**
- * Creates an instance of WhatsAppButtonActionBindings class.
- *
- * @param content the content value to set.
- */
- @Generated
- public WhatsAppButtonActionBindings(ButtonSetContent content) {
- this.content = content;
- }
-
- /**
- * Get the kind property: Kind of the MessageActionBinding.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageActionBindingKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the content property: Action content of Interactive message.
- *
- * @return the content value.
- */
- @Generated
- public ButtonSetContent getContent() {
- return this.content;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("content", this.content);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of WhatsAppButtonActionBindings from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of WhatsAppButtonActionBindings if the JsonReader was pointing to an instance of it, or null
- * if it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the WhatsAppButtonActionBindings.
- */
- @Generated
- public static WhatsAppButtonActionBindings fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- ButtonSetContent content = null;
- MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_BUTTON_ACTION;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("content".equals(fieldName)) {
- content = ButtonSetContent.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- kind = MessageActionBindingKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- WhatsAppButtonActionBindings deserializedWhatsAppButtonActionBindings
- = new WhatsAppButtonActionBindings(content);
- deserializedWhatsAppButtonActionBindings.kind = kind;
- return deserializedWhatsAppButtonActionBindings;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java
deleted file mode 100644
index 37c144bdb88a..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models.channels;
-
-import com.azure.communication.messages.models.ActionBindings;
-import com.azure.communication.messages.models.ActionGroupContent;
-import com.azure.communication.messages.models.MessageActionBindingKind;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * WhatsApp List Binding actions to the interactive message.
- */
-@Immutable
-public final class WhatsAppListActionBindings extends ActionBindings {
-
- /*
- * Kind of the MessageActionBinding.
- */
- @Generated
- private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_LIST_ACTION;
-
- /*
- * Action content of Interactive message.
- */
- @Generated
- private final ActionGroupContent content;
-
- /**
- * Creates an instance of WhatsAppListActionBindings class.
- *
- * @param content the content value to set.
- */
- @Generated
- public WhatsAppListActionBindings(ActionGroupContent content) {
- this.content = content;
- }
-
- /**
- * Get the kind property: Kind of the MessageActionBinding.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageActionBindingKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the content property: Action content of Interactive message.
- *
- * @return the content value.
- */
- @Generated
- public ActionGroupContent getContent() {
- return this.content;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("content", this.content);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of WhatsAppListActionBindings from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of WhatsAppListActionBindings if the JsonReader was pointing to an instance of it, or null if
- * it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the WhatsAppListActionBindings.
- */
- @Generated
- public static WhatsAppListActionBindings fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- ActionGroupContent content = null;
- MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_LIST_ACTION;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("content".equals(fieldName)) {
- content = ActionGroupContent.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- kind = MessageActionBindingKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- WhatsAppListActionBindings deserializedWhatsAppListActionBindings = new WhatsAppListActionBindings(content);
- deserializedWhatsAppListActionBindings.kind = kind;
- return deserializedWhatsAppListActionBindings;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateItem.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateItem.java
index 1e8a5684f3a8..feb03095ded9 100644
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateItem.java
+++ b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateItem.java
@@ -3,6 +3,7 @@
// Code generated by Microsoft (R) TypeSpec Code Generator.
package com.azure.communication.messages.models.channels;
+import com.azure.communication.messages.implementation.accesshelpers.MessageTemplateItemAccessHelper;
import com.azure.communication.messages.models.CommunicationMessagesChannel;
import com.azure.communication.messages.models.MessageTemplateItem;
import com.azure.communication.messages.models.MessageTemplateStatus;
@@ -30,7 +31,7 @@ public final class WhatsAppMessageTemplateItem extends MessageTemplateItem {
* WhatsApp platform's template content. This is the payload returned from WhatsApp API.
*/
@Generated
- private BinaryData content;
+ private Object content;
/**
* Creates an instance of WhatsAppMessageTemplateItem class.
@@ -61,7 +62,7 @@ public CommunicationMessagesChannel getKind() {
*/
@Generated
public BinaryData getContent() {
- return this.content;
+ return BinaryData.fromObject(this.content);
}
/**
@@ -74,10 +75,7 @@ public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStringField("language", getLanguage());
jsonWriter.writeStringField("status", getStatus() == null ? null : getStatus().toString());
jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- if (this.content != null) {
- jsonWriter.writeFieldName("content");
- this.content.writeTo(jsonWriter);
- }
+ jsonWriter.writeUntypedField("content", this.content);
return jsonWriter.writeEndObject();
}
@@ -97,7 +95,7 @@ public static WhatsAppMessageTemplateItem fromJson(JsonReader jsonReader) throws
String language = null;
MessageTemplateStatus status = null;
CommunicationMessagesChannel kind = CommunicationMessagesChannel.WHATS_APP;
- BinaryData content = null;
+ Object content = null;
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
@@ -110,34 +108,17 @@ public static WhatsAppMessageTemplateItem fromJson(JsonReader jsonReader) throws
} else if ("kind".equals(fieldName)) {
kind = CommunicationMessagesChannel.fromString(reader.getString());
} else if ("content".equals(fieldName)) {
- content = reader.getNullable(nonNullReader -> BinaryData.fromObject(nonNullReader.readUntyped()));
+ content = reader.readUntyped();
} else {
reader.skipChildren();
}
}
WhatsAppMessageTemplateItem deserializedWhatsAppMessageTemplateItem
= new WhatsAppMessageTemplateItem(language, status);
- deserializedWhatsAppMessageTemplateItem.name = name;
+ MessageTemplateItemAccessHelper.setName(deserializedWhatsAppMessageTemplateItem, name);
deserializedWhatsAppMessageTemplateItem.kind = kind;
deserializedWhatsAppMessageTemplateItem.content = content;
return deserializedWhatsAppMessageTemplateItem;
});
}
-
- /*
- * The template's name.
- */
- @Generated
- private String name;
-
- /**
- * Get the name property: The template's name.
- *
- * @return the name value.
- */
- @Generated
- @Override
- public String getName() {
- return this.name;
- }
}
diff --git a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java b/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java
deleted file mode 100644
index 254153941599..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) TypeSpec Code Generator.
-package com.azure.communication.messages.models.channels;
-
-import com.azure.communication.messages.models.ActionBindings;
-import com.azure.communication.messages.models.LinkContent;
-import com.azure.communication.messages.models.MessageActionBindingKind;
-import com.azure.core.annotation.Generated;
-import com.azure.core.annotation.Immutable;
-import com.azure.json.JsonReader;
-import com.azure.json.JsonToken;
-import com.azure.json.JsonWriter;
-import java.io.IOException;
-
-/**
- * WhatsApp Binding actions to the interactive message.
- */
-@Immutable
-public final class WhatsAppUrlActionBindings extends ActionBindings {
-
- /*
- * Kind of the MessageActionBinding.
- */
- @Generated
- private MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_URL_ACTION;
-
- /*
- * Action content of Interactive message.
- */
- @Generated
- private final LinkContent content;
-
- /**
- * Creates an instance of WhatsAppUrlActionBindings class.
- *
- * @param content the content value to set.
- */
- @Generated
- public WhatsAppUrlActionBindings(LinkContent content) {
- this.content = content;
- }
-
- /**
- * Get the kind property: Kind of the MessageActionBinding.
- *
- * @return the kind value.
- */
- @Generated
- @Override
- public MessageActionBindingKind getKind() {
- return this.kind;
- }
-
- /**
- * Get the content property: Action content of Interactive message.
- *
- * @return the content value.
- */
- @Generated
- public LinkContent getContent() {
- return this.content;
- }
-
- /**
- * {@inheritDoc}
- */
- @Generated
- @Override
- public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
- jsonWriter.writeStartObject();
- jsonWriter.writeJsonField("content", this.content);
- jsonWriter.writeStringField("kind", this.kind == null ? null : this.kind.toString());
- return jsonWriter.writeEndObject();
- }
-
- /**
- * Reads an instance of WhatsAppUrlActionBindings from the JsonReader.
- *
- * @param jsonReader The JsonReader being read.
- * @return An instance of WhatsAppUrlActionBindings if the JsonReader was pointing to an instance of it, or null if
- * it was pointing to JSON null.
- * @throws IllegalStateException If the deserialized JSON object was missing any required properties.
- * @throws IOException If an error occurs while reading the WhatsAppUrlActionBindings.
- */
- @Generated
- public static WhatsAppUrlActionBindings fromJson(JsonReader jsonReader) throws IOException {
- return jsonReader.readObject(reader -> {
- LinkContent content = null;
- MessageActionBindingKind kind = MessageActionBindingKind.WHATS_APP_URL_ACTION;
- while (reader.nextToken() != JsonToken.END_OBJECT) {
- String fieldName = reader.getFieldName();
- reader.nextToken();
- if ("content".equals(fieldName)) {
- content = LinkContent.fromJson(reader);
- } else if ("kind".equals(fieldName)) {
- kind = MessageActionBindingKind.fromString(reader.getString());
- } else {
- reader.skipChildren();
- }
- }
- WhatsAppUrlActionBindings deserializedWhatsAppUrlActionBindings = new WhatsAppUrlActionBindings(content);
- deserializedWhatsAppUrlActionBindings.kind = kind;
- return deserializedWhatsAppUrlActionBindings;
- });
- }
-}
diff --git a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
index 2e3d0e8156de..47302ac76e22 100644
--- a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
+++ b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_apiview_properties.json
@@ -17,26 +17,12 @@
"com.azure.communication.messages.NotificationMessagesClient.send": "Azure.Communication.MessagesService.NotificationMessagesClient.send",
"com.azure.communication.messages.NotificationMessagesClient.sendWithResponse": "Azure.Communication.MessagesService.NotificationMessagesClient.send",
"com.azure.communication.messages.NotificationMessagesClientBuilder": "ClientForAcsMessages.NotificationMessagesClient",
- "com.azure.communication.messages.models.ActionBindings": "Azure.Communication.MessagesService.ActionBindings",
- "com.azure.communication.messages.models.ActionGroup": "Azure.Communication.MessagesService.ActionGroup",
- "com.azure.communication.messages.models.ActionGroupContent": "Azure.Communication.MessagesService.ActionGroupContent",
- "com.azure.communication.messages.models.ActionGroupItem": "Azure.Communication.MessagesService.ActionGroupItem",
"com.azure.communication.messages.models.AudioNotificationContent": "Azure.Communication.MessagesService.AudioNotificationContent",
- "com.azure.communication.messages.models.ButtonContent": "Azure.Communication.MessagesService.ButtonContent",
- "com.azure.communication.messages.models.ButtonSetContent": "Azure.Communication.MessagesService.ButtonSetContent",
"com.azure.communication.messages.models.CommunicationMessageKind": "Azure.Communication.MessagesService.CommunicationMessageKind",
"com.azure.communication.messages.models.CommunicationMessagesChannel": "Azure.Communication.MessagesService.CommunicationMessagesChannel",
- "com.azure.communication.messages.models.DocumentMessageContent": "Azure.Communication.MessagesService.DocumentMessageContent",
"com.azure.communication.messages.models.DocumentNotificationContent": "Azure.Communication.MessagesService.DocumentNotificationContent",
- "com.azure.communication.messages.models.ImageMessageContent": "Azure.Communication.MessagesService.ImageMessageContent",
"com.azure.communication.messages.models.ImageNotificationContent": "Azure.Communication.MessagesService.ImageNotificationContent",
- "com.azure.communication.messages.models.InteractiveMessage": "Azure.Communication.MessagesService.InteractiveMessage",
- "com.azure.communication.messages.models.InteractiveNotificationContent": "Azure.Communication.MessagesService.InteractiveNotificationContent",
- "com.azure.communication.messages.models.LinkContent": "Azure.Communication.MessagesService.LinkContent",
"com.azure.communication.messages.models.MediaNotificationContent": "Azure.Communication.MessagesService.MediaNotificationContent",
- "com.azure.communication.messages.models.MessageActionBindingKind": "Azure.Communication.MessagesService.MessageActionBindingKind",
- "com.azure.communication.messages.models.MessageContent": "Azure.Communication.MessagesService.MessageContent",
- "com.azure.communication.messages.models.MessageContentKind": "Azure.Communication.MessagesService.MessageContentKind",
"com.azure.communication.messages.models.MessageReceipt": "Azure.Communication.MessagesService.MessageReceipt",
"com.azure.communication.messages.models.MessageTemplate": "Azure.Communication.MessagesService.MessageTemplate",
"com.azure.communication.messages.models.MessageTemplateBindings": "Azure.Communication.MessagesService.MessageTemplateBindings",
@@ -52,21 +38,14 @@
"com.azure.communication.messages.models.MessageTemplateValueKind": "Azure.Communication.MessagesService.MessageTemplateValueKind",
"com.azure.communication.messages.models.MessageTemplateVideo": "Azure.Communication.MessagesService.MessageTemplateVideo",
"com.azure.communication.messages.models.NotificationContent": "Azure.Communication.MessagesService.NotificationContent",
- "com.azure.communication.messages.models.ReactionNotificationContent": "Azure.Communication.MessagesService.ReactionNotificationContent",
"com.azure.communication.messages.models.SendMessageResult": "Azure.Communication.MessagesService.SendMessageResult",
- "com.azure.communication.messages.models.StickerNotificationContent": "Azure.Communication.MessagesService.StickerNotificationContent",
"com.azure.communication.messages.models.TemplateNotificationContent": "Azure.Communication.MessagesService.TemplateNotificationContent",
- "com.azure.communication.messages.models.TextMessageContent": "Azure.Communication.MessagesService.TextMessageContent",
"com.azure.communication.messages.models.TextNotificationContent": "Azure.Communication.MessagesService.TextNotificationContent",
- "com.azure.communication.messages.models.VideoMessageContent": "Azure.Communication.MessagesService.VideoMessageContent",
"com.azure.communication.messages.models.VideoNotificationContent": "Azure.Communication.MessagesService.VideoNotificationContent",
- "com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings": "Azure.Communication.MessagesService.WhatsAppButtonActionBindings",
- "com.azure.communication.messages.models.channels.WhatsAppListActionBindings": "Azure.Communication.MessagesService.WhatsAppListActionBindings",
"com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType": "Azure.Communication.MessagesService.WhatsAppMessageButtonSubType",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton",
"com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent": "Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent",
- "com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem",
- "com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings": "Azure.Communication.MessagesService.WhatsAppUrlActionBindings"
+ "com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem": "Azure.Communication.MessagesService.WhatsAppMessageTemplateItem"
}
}
diff --git a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_metadata.json b/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_metadata.json
deleted file mode 100644
index 51f2ec479b5f..000000000000
--- a/sdk/communication/azure-communication-messages/src/main/resources/META-INF/azure-communication-messages_metadata.json
+++ /dev/null
@@ -1 +0,0 @@
-{"flavor":"azure","apiVersion":"2025-01-15-preview","crossLanguageDefinitions":{"com.azure.communication.messages.MessageTemplateAsyncClient":"ClientForAcsMessages.MessageTemplateClient","com.azure.communication.messages.MessageTemplateAsyncClient.listTemplates":"Azure.Communication.MessagesService.MessageTemplateClient.listTemplates","com.azure.communication.messages.MessageTemplateClient":"ClientForAcsMessages.MessageTemplateClient","com.azure.communication.messages.MessageTemplateClient.listTemplates":"Azure.Communication.MessagesService.MessageTemplateClient.listTemplates","com.azure.communication.messages.MessageTemplateClientBuilder":"ClientForAcsMessages.MessageTemplateClient","com.azure.communication.messages.NotificationMessagesAsyncClient":"ClientForAcsMessages.NotificationMessagesClient","com.azure.communication.messages.NotificationMessagesAsyncClient.downloadMedia":"ClientForAcsMessages.NotificationMessagesClient.downloadMedia","com.azure.communication.messages.NotificationMessagesAsyncClient.downloadMediaWithResponse":"ClientForAcsMessages.NotificationMessagesClient.downloadMedia","com.azure.communication.messages.NotificationMessagesAsyncClient.send":"Azure.Communication.MessagesService.NotificationMessagesClient.send","com.azure.communication.messages.NotificationMessagesAsyncClient.sendWithResponse":"Azure.Communication.MessagesService.NotificationMessagesClient.send","com.azure.communication.messages.NotificationMessagesClient":"ClientForAcsMessages.NotificationMessagesClient","com.azure.communication.messages.NotificationMessagesClient.downloadMedia":"ClientForAcsMessages.NotificationMessagesClient.downloadMedia","com.azure.communication.messages.NotificationMessagesClient.downloadMediaWithResponse":"ClientForAcsMessages.NotificationMessagesClient.downloadMedia","com.azure.communication.messages.NotificationMessagesClient.send":"Azure.Communication.MessagesService.NotificationMessagesClient.send","com.azure.communication.messages.NotificationMessagesClient.sendWithResponse":"Azure.Communication.MessagesService.NotificationMessagesClient.send","com.azure.communication.messages.NotificationMessagesClientBuilder":"ClientForAcsMessages.NotificationMessagesClient","com.azure.communication.messages.models.ActionBindings":"Azure.Communication.MessagesService.ActionBindings","com.azure.communication.messages.models.ActionGroup":"Azure.Communication.MessagesService.ActionGroup","com.azure.communication.messages.models.ActionGroupContent":"Azure.Communication.MessagesService.ActionGroupContent","com.azure.communication.messages.models.ActionGroupItem":"Azure.Communication.MessagesService.ActionGroupItem","com.azure.communication.messages.models.AudioNotificationContent":"Azure.Communication.MessagesService.AudioNotificationContent","com.azure.communication.messages.models.ButtonContent":"Azure.Communication.MessagesService.ButtonContent","com.azure.communication.messages.models.ButtonSetContent":"Azure.Communication.MessagesService.ButtonSetContent","com.azure.communication.messages.models.CommunicationMessageKind":"Azure.Communication.MessagesService.CommunicationMessageKind","com.azure.communication.messages.models.CommunicationMessagesChannel":"Azure.Communication.MessagesService.CommunicationMessagesChannel","com.azure.communication.messages.models.DocumentMessageContent":"Azure.Communication.MessagesService.DocumentMessageContent","com.azure.communication.messages.models.DocumentNotificationContent":"Azure.Communication.MessagesService.DocumentNotificationContent","com.azure.communication.messages.models.ImageMessageContent":"Azure.Communication.MessagesService.ImageMessageContent","com.azure.communication.messages.models.ImageNotificationContent":"Azure.Communication.MessagesService.ImageNotificationContent","com.azure.communication.messages.models.InteractiveMessage":"Azure.Communication.MessagesService.InteractiveMessage","com.azure.communication.messages.models.InteractiveNotificationContent":"Azure.Communication.MessagesService.InteractiveNotificationContent","com.azure.communication.messages.models.LinkContent":"Azure.Communication.MessagesService.LinkContent","com.azure.communication.messages.models.MediaNotificationContent":"Azure.Communication.MessagesService.MediaNotificationContent","com.azure.communication.messages.models.MessageActionBindingKind":"Azure.Communication.MessagesService.MessageActionBindingKind","com.azure.communication.messages.models.MessageContent":"Azure.Communication.MessagesService.MessageContent","com.azure.communication.messages.models.MessageContentKind":"Azure.Communication.MessagesService.MessageContentKind","com.azure.communication.messages.models.MessageReceipt":"Azure.Communication.MessagesService.MessageReceipt","com.azure.communication.messages.models.MessageTemplate":"Azure.Communication.MessagesService.MessageTemplate","com.azure.communication.messages.models.MessageTemplateBindings":"Azure.Communication.MessagesService.MessageTemplateBindings","com.azure.communication.messages.models.MessageTemplateBindingsKind":"Azure.Communication.MessagesService.MessageTemplateBindingsKind","com.azure.communication.messages.models.MessageTemplateDocument":"Azure.Communication.MessagesService.MessageTemplateDocument","com.azure.communication.messages.models.MessageTemplateImage":"Azure.Communication.MessagesService.MessageTemplateImage","com.azure.communication.messages.models.MessageTemplateItem":"Azure.Communication.MessagesService.MessageTemplateItem","com.azure.communication.messages.models.MessageTemplateLocation":"Azure.Communication.MessagesService.MessageTemplateLocation","com.azure.communication.messages.models.MessageTemplateQuickAction":"Azure.Communication.MessagesService.MessageTemplateQuickAction","com.azure.communication.messages.models.MessageTemplateStatus":"Azure.Communication.MessagesService.MessageTemplateStatus","com.azure.communication.messages.models.MessageTemplateText":"Azure.Communication.MessagesService.MessageTemplateText","com.azure.communication.messages.models.MessageTemplateValue":"Azure.Communication.MessagesService.MessageTemplateValue","com.azure.communication.messages.models.MessageTemplateValueKind":"Azure.Communication.MessagesService.MessageTemplateValueKind","com.azure.communication.messages.models.MessageTemplateVideo":"Azure.Communication.MessagesService.MessageTemplateVideo","com.azure.communication.messages.models.NotificationContent":"Azure.Communication.MessagesService.NotificationContent","com.azure.communication.messages.models.ReactionNotificationContent":"Azure.Communication.MessagesService.ReactionNotificationContent","com.azure.communication.messages.models.SendMessageResult":"Azure.Communication.MessagesService.SendMessageResult","com.azure.communication.messages.models.StickerNotificationContent":"Azure.Communication.MessagesService.StickerNotificationContent","com.azure.communication.messages.models.TemplateNotificationContent":"Azure.Communication.MessagesService.TemplateNotificationContent","com.azure.communication.messages.models.TextMessageContent":"Azure.Communication.MessagesService.TextMessageContent","com.azure.communication.messages.models.TextNotificationContent":"Azure.Communication.MessagesService.TextNotificationContent","com.azure.communication.messages.models.VideoMessageContent":"Azure.Communication.MessagesService.VideoMessageContent","com.azure.communication.messages.models.VideoNotificationContent":"Azure.Communication.MessagesService.VideoNotificationContent","com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings":"Azure.Communication.MessagesService.WhatsAppButtonActionBindings","com.azure.communication.messages.models.channels.WhatsAppListActionBindings":"Azure.Communication.MessagesService.WhatsAppListActionBindings","com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType":"Azure.Communication.MessagesService.WhatsAppMessageButtonSubType","com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings":"Azure.Communication.MessagesService.WhatsAppMessageTemplateBindings","com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton":"Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsButton","com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent":"Azure.Communication.MessagesService.WhatsAppMessageTemplateBindingsComponent","com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem":"Azure.Communication.MessagesService.WhatsAppMessageTemplateItem","com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings":"Azure.Communication.MessagesService.WhatsAppUrlActionBindings"},"generatedFiles":["src/main/java/com/azure/communication/messages/MessageTemplateAsyncClient.java","src/main/java/com/azure/communication/messages/MessageTemplateClient.java","src/main/java/com/azure/communication/messages/MessageTemplateClientBuilder.java","src/main/java/com/azure/communication/messages/MessagesServiceVersion.java","src/main/java/com/azure/communication/messages/MessagesServiceVersion.java","src/main/java/com/azure/communication/messages/NotificationMessagesAsyncClient.java","src/main/java/com/azure/communication/messages/NotificationMessagesClient.java","src/main/java/com/azure/communication/messages/NotificationMessagesClientBuilder.java","src/main/java/com/azure/communication/messages/implementation/MessageTemplateClientImpl.java","src/main/java/com/azure/communication/messages/implementation/NotificationMessagesClientImpl.java","src/main/java/com/azure/communication/messages/implementation/package-info.java","src/main/java/com/azure/communication/messages/models/ActionBindings.java","src/main/java/com/azure/communication/messages/models/ActionGroup.java","src/main/java/com/azure/communication/messages/models/ActionGroupContent.java","src/main/java/com/azure/communication/messages/models/ActionGroupItem.java","src/main/java/com/azure/communication/messages/models/AudioNotificationContent.java","src/main/java/com/azure/communication/messages/models/ButtonContent.java","src/main/java/com/azure/communication/messages/models/ButtonSetContent.java","src/main/java/com/azure/communication/messages/models/CommunicationMessageKind.java","src/main/java/com/azure/communication/messages/models/CommunicationMessagesChannel.java","src/main/java/com/azure/communication/messages/models/DocumentMessageContent.java","src/main/java/com/azure/communication/messages/models/DocumentNotificationContent.java","src/main/java/com/azure/communication/messages/models/ImageMessageContent.java","src/main/java/com/azure/communication/messages/models/ImageNotificationContent.java","src/main/java/com/azure/communication/messages/models/InteractiveMessage.java","src/main/java/com/azure/communication/messages/models/InteractiveNotificationContent.java","src/main/java/com/azure/communication/messages/models/LinkContent.java","src/main/java/com/azure/communication/messages/models/MediaNotificationContent.java","src/main/java/com/azure/communication/messages/models/MessageActionBindingKind.java","src/main/java/com/azure/communication/messages/models/MessageContent.java","src/main/java/com/azure/communication/messages/models/MessageContentKind.java","src/main/java/com/azure/communication/messages/models/MessageReceipt.java","src/main/java/com/azure/communication/messages/models/MessageTemplate.java","src/main/java/com/azure/communication/messages/models/MessageTemplateBindings.java","src/main/java/com/azure/communication/messages/models/MessageTemplateBindingsKind.java","src/main/java/com/azure/communication/messages/models/MessageTemplateDocument.java","src/main/java/com/azure/communication/messages/models/MessageTemplateImage.java","src/main/java/com/azure/communication/messages/models/MessageTemplateItem.java","src/main/java/com/azure/communication/messages/models/MessageTemplateLocation.java","src/main/java/com/azure/communication/messages/models/MessageTemplateQuickAction.java","src/main/java/com/azure/communication/messages/models/MessageTemplateStatus.java","src/main/java/com/azure/communication/messages/models/MessageTemplateText.java","src/main/java/com/azure/communication/messages/models/MessageTemplateValue.java","src/main/java/com/azure/communication/messages/models/MessageTemplateValueKind.java","src/main/java/com/azure/communication/messages/models/MessageTemplateVideo.java","src/main/java/com/azure/communication/messages/models/NotificationContent.java","src/main/java/com/azure/communication/messages/models/ReactionNotificationContent.java","src/main/java/com/azure/communication/messages/models/SendMessageResult.java","src/main/java/com/azure/communication/messages/models/StickerNotificationContent.java","src/main/java/com/azure/communication/messages/models/TemplateNotificationContent.java","src/main/java/com/azure/communication/messages/models/TextMessageContent.java","src/main/java/com/azure/communication/messages/models/TextNotificationContent.java","src/main/java/com/azure/communication/messages/models/VideoMessageContent.java","src/main/java/com/azure/communication/messages/models/VideoNotificationContent.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppButtonActionBindings.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppListActionBindings.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageButtonSubType.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateBindings.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateBindingsButton.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateBindingsComponent.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppMessageTemplateItem.java","src/main/java/com/azure/communication/messages/models/channels/WhatsAppUrlActionBindings.java","src/main/java/com/azure/communication/messages/models/channels/package-info.java","src/main/java/com/azure/communication/messages/models/package-info.java","src/main/java/com/azure/communication/messages/package-info.java","src/main/java/module-info.java"]}
\ No newline at end of file
diff --git a/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/NotificationMessageSample.java b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/NotificationMessageSample.java
index 4df793bb66c6..748149927ce8 100644
--- a/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/NotificationMessageSample.java
+++ b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/NotificationMessageSample.java
@@ -3,18 +3,9 @@
package com.azure.communication.messages;
-import com.azure.communication.messages.models.ActionGroup;
-import com.azure.communication.messages.models.ActionGroupContent;
-import com.azure.communication.messages.models.ActionGroupItem;
import com.azure.communication.messages.models.AudioNotificationContent;
-import com.azure.communication.messages.models.ButtonContent;
-import com.azure.communication.messages.models.ButtonSetContent;
-import com.azure.communication.messages.models.DocumentMessageContent;
import com.azure.communication.messages.models.DocumentNotificationContent;
-import com.azure.communication.messages.models.ImageMessageContent;
import com.azure.communication.messages.models.ImageNotificationContent;
-import com.azure.communication.messages.models.InteractiveMessage;
-import com.azure.communication.messages.models.InteractiveNotificationContent;
import com.azure.communication.messages.models.MessageTemplate;
import com.azure.communication.messages.models.MessageTemplateBindings;
import com.azure.communication.messages.models.MessageTemplateDocument;
@@ -23,27 +14,18 @@
import com.azure.communication.messages.models.MessageTemplateText;
import com.azure.communication.messages.models.MessageTemplateValue;
import com.azure.communication.messages.models.MessageTemplateVideo;
-import com.azure.communication.messages.models.LinkContent;
-import com.azure.communication.messages.models.ReactionNotificationContent;
-import com.azure.communication.messages.models.StickerNotificationContent;
-import com.azure.communication.messages.models.TextMessageContent;
import com.azure.communication.messages.models.TextNotificationContent;
import com.azure.communication.messages.models.TemplateNotificationContent;
-import com.azure.communication.messages.models.VideoMessageContent;
import com.azure.communication.messages.models.VideoNotificationContent;
import com.azure.communication.messages.models.SendMessageResult;
-import com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings;
import com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent;
-import com.azure.communication.messages.models.channels.WhatsAppListActionBindings;
-import com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.credential.TokenCredential;
import com.azure.identity.DefaultAzureCredentialBuilder;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
@@ -56,12 +38,7 @@ public class NotificationMessageSample {
public static void main(String[] args) {
TO_LIST.add(RECIPIENT_IDENTIFIER);
- sendInteractiveMessageWithListAction();
- //sendOtpTemplateMessage();
- //sendTemplateMessageWithDocument();
- //sendStickerMessage();
- //sendReactionMessage();
- //sendImageMessage();
+ sendTemplateMessageWithDocument();
}
/*
@@ -102,80 +79,6 @@ private static void sendTemplateMessage() {
result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
}
- /*
- * This sample shows how to send template message with below details
- * Name: otp, Language: en_US
- * [
- {
- "type": "BODY",
- "text": "*{{1}}* is your verification code. For your security, do not share this code.",
- "example": {
- "body_text": [
- [
- "123456"
- ]
- ]
- }
- },
- {
- "type": "FOOTER",
- "text": "This code expires in 10 minutes."
- },
- {
- "type": "BUTTONS",
- "buttons": [
- {
- "type": "URL",
- "text": "Copy code",
- "url": "https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code_expiration_minutes=10&code=otp{{1}}",
- "example": [
- "https://www.whatsapp.com/otp/code/?otp_type=COPY_CODE&code_expiration_minutes=10&code=otp123456"
- ]
- }
- ]
- }
- ]
- * */
- private static void sendOtpTemplateMessage() {
-
- //Update Template Name and language according your template associate to your channel.
- MessageTemplate template = new MessageTemplate("otp", "en_US");
-
- //Update template parameter type and value
- List messageTemplateValues = new ArrayList<>();
- messageTemplateValues.add(new MessageTemplateText("code", "123456"));
- MessageTemplateQuickAction btnRf = new MessageTemplateQuickAction("btnRf");
- btnRf.setText("123456");
- messageTemplateValues.add(btnRf);
- template.setValues(messageTemplateValues);
-
- //Update template parameter binding
- List bodyComponents = new ArrayList<>();
- bodyComponents.add(new WhatsAppMessageTemplateBindingsComponent("code"));
-
- List buttonComponents = new ArrayList<>();
- buttonComponents.add(new WhatsAppMessageTemplateBindingsButton(WhatsAppMessageButtonSubType.URL, "btnRf"));
-
- MessageTemplateBindings bindings = new WhatsAppMessageTemplateBindings()
- .setBody(bodyComponents)
- .setButtons(buttonComponents);
- template.setBindings(bindings);
-
- try {
- System.out.println(template.toJsonString());
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
-
- NotificationMessagesClient client = createClientWithConnectionString();
- SendMessageResult result = client.send(
- new TemplateNotificationContent(CHANNEL_ID, TO_LIST, template));
-
-
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
/*
* This sample shows how to send template message with below details
* Name: sample_issue_resolution, Language: en_US
@@ -488,158 +391,6 @@ public void sendDocumentMessage() {
result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
}
- /*
- * This sample shows how to send sticker message with below details
- * Supported sticker type - (.webp)
- * Note: Business cannot initiate conversation with media message.
- * */
- public static void sendStickerMessage() {
- //Update the Media URL
- String mediaUrl = "https://www.gstatic.com/webp/gallery/1.sm.webp";
- NotificationMessagesClient client = createClientWithConnectionString();
- SendMessageResult result = client.send(
- new StickerNotificationContent(CHANNEL_ID, TO_LIST, mediaUrl));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send reaction message with below details
- * Emoji - unicode for emoji character.
- * Reply Message ID - ID of the message to be replied with emoji
- * Note: Business cannot initiate conversation with media message.
- * */
- public static void sendReactionMessage() {
- NotificationMessagesClient client = createClientWithConnectionString();
- SendMessageResult result = client.send(
- new ReactionNotificationContent(CHANNEL_ID, TO_LIST, "\uD83D\uDE00", "3b5c2a30-936b-4f26-bd5c-491b22e74853"));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send interactive message with Button Action
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonAction() {
- NotificationMessagesClient client = createClientWithConnectionString();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send button action interactive message with image header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonActionWithImageHeader() {
- NotificationMessagesClient client = createClientWithConnectionString();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new ImageMessageContent("https://wallpapercave.com/wp/wp2163723.jpg"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send button action interactive message with document header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonActionWithDocumentHeader() {
- NotificationMessagesClient client = createClientWithConnectionString();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new DocumentMessageContent("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send button action interactive message with video header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonActionWithVideoHeader() {
- NotificationMessagesClient client = createClientWithConnectionString();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you like it?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new VideoMessageContent("https://sample-videos.com/audio/mp3/wave.mp3"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
- /*
- * This sample shows how to send list action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithListAction() {
- List group1 = new ArrayList<>();
- group1.add(new ActionGroupItem("priority_express", "Priority Mail Express", "Delivered on same day!"));
- group1.add(new ActionGroupItem("priority_mail", "Priority Mail", "Delivered in 1-2 days"));
-
- List group2 = new ArrayList<>();
- group2.add(new ActionGroupItem("usps_ground_advantage", "USPS Ground Advantage", "Delivered in 2-5 days"));
- group2.add(new ActionGroupItem("media_mail", "Media Mail", "Delivered in 5-8 days"));
-
- List options = new ArrayList<>();
- options.add(new ActionGroup("Express Delivery", group1));
- options.add(new ActionGroup("Normal Delivery", group2));
-
- ActionGroupContent actionGroupContent = new ActionGroupContent("Shipping Options", options);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Which shipping option do you want?"), new WhatsAppListActionBindings(actionGroupContent));
- interactiveMessage.setFooter(new TextMessageContent("Eagle Logistic"));
- interactiveMessage.setHeader(new TextMessageContent("Shipping Options"));
-
- NotificationMessagesClient client = createClientWithConnectionString();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-
- }
-
- /*
- * This sample shows how to send url action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithUrlAction() {
- LinkContent urlAction = new LinkContent("Rocket is the best!", "https://wallpapercave.com/wp/wp2163723.jpg");
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("The best Guardian of Galaxy"), new WhatsAppUrlActionBindings(urlAction));
- interactiveMessage.setFooter(new TextMessageContent("Intergalactic New Ltd"));
-
- NotificationMessagesClient client = createClientWithConnectionString();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent(CHANNEL_ID, TO_LIST, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
-
private static NotificationMessagesClient createClientWithConnectionString() {
return new NotificationMessagesClientBuilder()
.connectionString(CONNECTION_STRING)
diff --git a/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/ReadmeSamples.java b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/ReadmeSamples.java
index bb6007519930..29d9a33c754c 100644
--- a/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/ReadmeSamples.java
+++ b/sdk/communication/azure-communication-messages/src/samples/java/com/azure/communication/messages/ReadmeSamples.java
@@ -4,38 +4,21 @@
package com.azure.communication.messages;
-import com.azure.communication.messages.models.ActionGroup;
-import com.azure.communication.messages.models.ActionGroupContent;
-import com.azure.communication.messages.models.ActionGroupItem;
import com.azure.communication.messages.models.AudioNotificationContent;
-import com.azure.communication.messages.models.ButtonContent;
-import com.azure.communication.messages.models.ButtonSetContent;
-import com.azure.communication.messages.models.DocumentMessageContent;
import com.azure.communication.messages.models.DocumentNotificationContent;
-import com.azure.communication.messages.models.ImageMessageContent;
import com.azure.communication.messages.models.ImageNotificationContent;
-import com.azure.communication.messages.models.InteractiveMessage;
-import com.azure.communication.messages.models.InteractiveNotificationContent;
import com.azure.communication.messages.models.MessageTemplate;
import com.azure.communication.messages.models.MessageTemplateBindings;
import com.azure.communication.messages.models.MessageTemplateItem;
import com.azure.communication.messages.models.MessageTemplateText;
import com.azure.communication.messages.models.MessageTemplateValue;
-import com.azure.communication.messages.models.LinkContent;
-import com.azure.communication.messages.models.ReactionNotificationContent;
-import com.azure.communication.messages.models.StickerNotificationContent;
-import com.azure.communication.messages.models.TextMessageContent;
-import com.azure.communication.messages.models.TextNotificationContent;
+import com.azure.communication.messages.models.SendMessageResult;
import com.azure.communication.messages.models.TemplateNotificationContent;
-import com.azure.communication.messages.models.VideoMessageContent;
+import com.azure.communication.messages.models.TextNotificationContent;
import com.azure.communication.messages.models.VideoNotificationContent;
-import com.azure.communication.messages.models.SendMessageResult;
-import com.azure.communication.messages.models.channels.WhatsAppButtonActionBindings;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent;
import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateItem;
-import com.azure.communication.messages.models.channels.WhatsAppListActionBindings;
-import com.azure.communication.messages.models.channels.WhatsAppUrlActionBindings;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.rest.PagedIterable;
@@ -256,207 +239,6 @@ public void sendDocumentMessage() {
}
// END: readme-sample-sendDocumentMessage
- // BEGIN: readme-sample-sendStickerMessage
- /*
- * This sample shows how to send sticker message with below details
- * Supported sticker type - (.webp)
- * Note: Business cannot initiate conversation with media message.
- * */
- public static void sendStickerMessage() {
- //Update the Media URL
- String mediaUrl = "https://www.gstatic.com/webp/gallery/1.sm.webp";
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new StickerNotificationContent("", recipients, mediaUrl));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendStickerMessage
-
- // BEGIN: readme-sample-sendReactionMessage
- /*
- * This sample shows how to send reaction message with below details
- * Emoji - unicode for emoji character.
- * Reply Message ID - ID of the message to be replied with emoji
- * Note: Business cannot initiate conversation with media message.
- * */
- public static void sendReactionMessage() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new ReactionNotificationContent("", recipients, "\uD83D\uDE00", ""));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendReactionMessage
-
- // BEGIN: readme-sample-sendInteractiveMessageWithButtonAction
- /*
- * This sample shows how to send interactive message with Button Action
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public void sendInteractiveMessageWithButtonAction() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendInteractiveMessageWithButtonAction
-
- // BEGIN: readme-sample-sendInteractiveMessageWithButtonActionWithImageHeader
- /*
- * This sample shows how to send button action interactive message with image header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public void sendInteractiveMessageWithButtonActionWithImageHeader() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new ImageMessageContent("https://wallpapercave.com/wp/wp2163723.jpg"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendInteractiveMessageWithButtonActionWithImageHeader
-
- // BEGIN: readme-sample-sendInteractiveMessageWithButtonActionWithDocumentHeader
- /*
- * This sample shows how to send button action interactive message with document header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonActionWithDocumentHeader() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new DocumentMessageContent("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendInteractiveMessageWithButtonActionWithDocumentHeader
-
-
- // BEGIN: readme-sample-sendInteractiveMessageWithButtonActionWithVideoHeader
- /*
- * This sample shows how to send button action interactive message with video header
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithButtonActionWithVideoHeader() {
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you like it?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new VideoMessageContent("https://sample-videos.com/audio/mp3/wave.mp3"));
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendInteractiveMessageWithButtonActionWithVideoHeader
-
- // BEGIN: readme-sample-sendInteractiveMessageWithListAction
- /*
- * This sample shows how to send list action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithListAction() {
- List group1 = new ArrayList<>();
- group1.add(new ActionGroupItem("priority_express", "Priority Mail Express", "Delivered on same day!"));
- group1.add(new ActionGroupItem("priority_mail", "Priority Mail", "Delivered in 1-2 days"));
-
- List group2 = new ArrayList<>();
- group2.add(new ActionGroupItem("usps_ground_advantage", "USPS Ground Advantage", "Delivered in 2-5 days"));
- group2.add(new ActionGroupItem("media_mail", "Media Mail", "Delivered in 5-8 days"));
-
- List options = new ArrayList<>();
- options.add(new ActionGroup("Express Delivery", group1));
- options.add(new ActionGroup("Normal Delivery", group2));
-
- ActionGroupContent actionGroupContent = new ActionGroupContent("Shipping Options", options);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Which shipping option do you want?"), new WhatsAppListActionBindings(actionGroupContent));
- interactiveMessage.setFooter(new TextMessageContent("Eagle Logistic"));
- interactiveMessage.setHeader(new TextMessageContent("Shipping Options"));
-
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
-
- }
- // END: readme-sample-sendInteractiveMessageWithListAction
-
- // BEGIN: readme-sample-sendInteractiveMessageWithUrlAction
- /*
- * This sample shows how to send url action interactive message
- * Note: Business cannot initiate conversation with interactive message.
- * */
- public static void sendInteractiveMessageWithUrlAction() {
- LinkContent urlAction = new LinkContent("Rocket is the best!", "https://wallpapercave.com/wp/wp2163723.jpg");
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("The best Guardian of Galaxy"), new WhatsAppUrlActionBindings(urlAction));
- interactiveMessage.setFooter(new TextMessageContent("Intergalactic New Ltd"));
-
- List recipients = new ArrayList<>();
- recipients.add("");
- NotificationMessagesClient client = new NotificationMessagesClientBuilder()
- .connectionString("")
- .buildClient();
- SendMessageResult result = client.send(
- new InteractiveNotificationContent("", recipients, interactiveMessage));
-
- result.getReceipts().forEach(r -> System.out.println("Message sent to:" + r.getTo() + " and message id:" + r.getMessageId()));
- }
- // END: readme-sample-sendInteractiveMessageWithUrlAction
-
public static void getMessageTemplateWithConnectionString() {
// BEGIN: readme-sample-ListTemplates
MessageTemplateClient templateClient =
diff --git a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/CommunicationMessagesTestBase.java b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/CommunicationMessagesTestBase.java
index da4384e7f389..69595e96905d 100644
--- a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/CommunicationMessagesTestBase.java
+++ b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/CommunicationMessagesTestBase.java
@@ -28,7 +28,7 @@ public class CommunicationMessagesTestBase extends TestProxyTestBase {
"endpoint=https://REDACTED.int.communication.azure.net;accessKey=secret");
protected static final String CHANNEL_REGISTRATION_ID = Configuration.getGlobalConfiguration()
- .get("SENDER_CHANNEL_REGISTRATION_ID", "77ffd898-ec44-42cd-b560-57a8903d05c7");
+ .get("SENDER_CHANNEL_REGISTRATION_ID", "bc73327d-d246-4983-9e13-284468af7240");
protected static final String RECIPIENT_IDENTIFIER
= Configuration.getGlobalConfiguration().get("RECIPIENT_IDENTIFIER", "+11234567788");
diff --git a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessageAsyncClientTest.java b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessageAsyncClientTest.java
index 76f57826e7b8..352353058cee 100644
--- a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessageAsyncClientTest.java
+++ b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessageAsyncClientTest.java
@@ -4,7 +4,10 @@
package com.azure.communication.messages;
import com.azure.communication.messages.models.*;
-import com.azure.communication.messages.models.channels.*;
+import com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.test.utils.MockTokenCredential;
@@ -97,186 +100,6 @@ public void shouldSendDocumentMessage(HttpClient httpClient) {
}).verifyComplete();
}
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendStickerMessage(HttpClient httpClient) {
- String mediaUrl = "https://www.gstatic.com/webp/gallery/1.sm.webp";
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- StepVerifier
- .create(messagesClient.send(new StickerNotificationContent(CHANNEL_REGISTRATION_ID, recipients, mediaUrl)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendReactionMessage(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- StepVerifier
- .create(messagesClient.send(new ReactionNotificationContent(CHANNEL_REGISTRATION_ID, recipients,
- "\uD83D\uDE00", "3b5c2a30-936b-4f26-bd5c-491b22e74853")))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonAction(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithImageHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new ImageMessageContent("https://wallpapercave.com/wp/wp2163723.jpg"));
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithDocumentHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(
- new DocumentMessageContent("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"));
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithVideoHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(new TextMessageContent("Do you like it?"),
- new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new VideoMessageContent("https://sample-videos.com/audio/mp3/wave.mp3"));
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithListAction(HttpClient httpClient) {
- List group1 = new ArrayList<>();
- group1.add(new ActionGroupItem("priority_express", "Priority Mail Express", "Delivered on same day!"));
- group1.add(new ActionGroupItem("priority_mail", "Priority Mail", "Delivered in 1-2 days"));
-
- List group2 = new ArrayList<>();
- group2.add(new ActionGroupItem("usps_ground_advantage", "USPS Ground Advantage", "Delivered in 2-5 days"));
- group2.add(new ActionGroupItem("media_mail", "Media Mail", "Delivered in 5-8 days"));
-
- List options = new ArrayList<>();
- options.add(new ActionGroup("Express Delivery", group1));
- options.add(new ActionGroup("Normal Delivery", group2));
-
- ActionGroupContent actionGroupContent = new ActionGroupContent("Shipping Options", options);
- InteractiveMessage interactiveMessage
- = new InteractiveMessage(new TextMessageContent("Which shipping option do you want?"),
- new WhatsAppListActionBindings(actionGroupContent));
- interactiveMessage.setFooter(new TextMessageContent("Eagle Logistic"));
- interactiveMessage.setHeader(new TextMessageContent("Shipping Options"));
-
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithUrlAction(HttpClient httpClient) {
- LinkContent urlAction = new LinkContent("Rocket is the best!", "https://wallpapercave.com/wp/wp2163723.jpg");
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("The best Guardian of Galaxy"), new WhatsAppUrlActionBindings(urlAction));
- interactiveMessage.setFooter(new TextMessageContent("Intergalactic New Ltd"));
-
- messagesClient = buildNotificationMessagesAsyncClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- StepVerifier
- .create(messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage)))
- .assertNext(resp -> {
- assertEquals(1, resp.getReceipts().size());
- assertNotNull(resp.getReceipts().get(0).getMessageId());
- })
- .verifyComplete();
- }
-
@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void shouldSendMessageTemplateWithImage(HttpClient httpClient) {
diff --git a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessagesClientTest.java b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessagesClientTest.java
index 6e524244293f..e82a4e24ee10 100644
--- a/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessagesClientTest.java
+++ b/sdk/communication/azure-communication-messages/src/test/java/com/azure/communication/messages/NotificationMessagesClientTest.java
@@ -4,7 +4,10 @@
package com.azure.communication.messages;
import com.azure.communication.messages.models.*;
-import com.azure.communication.messages.models.channels.*;
+import com.azure.communication.messages.models.channels.WhatsAppMessageButtonSubType;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindings;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsButton;
+import com.azure.communication.messages.models.channels.WhatsAppMessageTemplateBindingsComponent;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpClient;
import com.azure.core.test.utils.MockTokenCredential;
@@ -114,163 +117,6 @@ public void shouldSendDocumentMessage(HttpClient httpClient) {
assertNotNull(result.getReceipts().get(0).getMessageId());
}
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendStickerMessage(HttpClient httpClient) {
- String mediaUrl = "https://www.gstatic.com/webp/gallery/1.sm.webp";
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- SendMessageResult result
- = messagesClient.send(new StickerNotificationContent(CHANNEL_REGISTRATION_ID, recipients, mediaUrl));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendReactionMessage(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- SendMessageResult result = messagesClient.send(new ReactionNotificationContent(CHANNEL_REGISTRATION_ID,
- recipients, "\uD83D\uDE00", "3b5c2a30-936b-4f26-bd5c-491b22e74853"));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonAction(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithImageHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new ImageMessageContent("https://wallpapercave.com/wp/wp2163723.jpg"));
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithDocumentHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("Do you want to proceed?"), new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(
- new DocumentMessageContent("https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"));
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithButtonActionWithVideoHeader(HttpClient httpClient) {
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- List buttonActions = new ArrayList<>();
- buttonActions.add(new ButtonContent("no", "No"));
- buttonActions.add(new ButtonContent("yes", "Yes"));
- ButtonSetContent buttonSet = new ButtonSetContent(buttonActions);
- InteractiveMessage interactiveMessage = new InteractiveMessage(new TextMessageContent("Do you like it?"),
- new WhatsAppButtonActionBindings(buttonSet));
- interactiveMessage.setHeader(new VideoMessageContent("https://sample-videos.com/audio/mp3/wave.mp3"));
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithListAction(HttpClient httpClient) {
- List group1 = new ArrayList<>();
- group1.add(new ActionGroupItem("priority_express", "Priority Mail Express", "Delivered on same day!"));
- group1.add(new ActionGroupItem("priority_mail", "Priority Mail", "Delivered in 1-2 days"));
-
- List group2 = new ArrayList<>();
- group2.add(new ActionGroupItem("usps_ground_advantage", "USPS Ground Advantage", "Delivered in 2-5 days"));
- group2.add(new ActionGroupItem("usps_mail", "USPS Mail", "Delivered in 5-8 days"));
-
- List options = new ArrayList<>();
- options.add(new ActionGroup("Express Delivery", group1));
- options.add(new ActionGroup("Normal Delivery", group2));
-
- ActionGroupContent actionGroupContent = new ActionGroupContent("Shipping Options", options);
- InteractiveMessage interactiveMessage
- = new InteractiveMessage(new TextMessageContent("Which shipping option do you want?"),
- new WhatsAppListActionBindings(actionGroupContent));
- interactiveMessage.setFooter(new TextMessageContent("Eagle Logistic"));
- interactiveMessage.setHeader(new TextMessageContent("Shipping Options"));
-
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
- @ParameterizedTest
- @MethodSource("com.azure.core.test.TestBase#getHttpClients")
- public void sendInteractiveMessageWithUrlAction(HttpClient httpClient) {
- LinkContent urlAction = new LinkContent("Rocket is the best!", "https://wallpapercave.com/wp/wp2163723.jpg");
- InteractiveMessage interactiveMessage = new InteractiveMessage(
- new TextMessageContent("The best Guardian of Galaxy"), new WhatsAppUrlActionBindings(urlAction));
- interactiveMessage.setFooter(new TextMessageContent("Intergalactic News Ltd"));
-
- messagesClient = buildNotificationMessagesClient(httpClient);
- List recipients = new ArrayList<>();
- recipients.add(RECIPIENT_IDENTIFIER);
- SendMessageResult result = messagesClient
- .send(new InteractiveNotificationContent(CHANNEL_REGISTRATION_ID, recipients, interactiveMessage));
-
- assertEquals(1, result.getReceipts().size());
- assertNotNull(result.getReceipts().get(0).getMessageId());
- }
-
@ParameterizedTest
@MethodSource("com.azure.core.test.TestBase#getHttpClients")
public void shouldSendMessageImageTemplate(HttpClient httpClient) {
diff --git a/sdk/communication/azure-communication-messages/tsp-location.yaml b/sdk/communication/azure-communication-messages/tsp-location.yaml
index 5e54cdfc1887..277f8c2c5f5a 100644
--- a/sdk/communication/azure-communication-messages/tsp-location.yaml
+++ b/sdk/communication/azure-communication-messages/tsp-location.yaml
@@ -1,4 +1,4 @@
directory: specification/communication/Communication.Messages
-commit: 3667ec7237617f766657ed23066f0b14ee0797f8
+commit: abe3209e7c6924a58ab560ebab2349bc8fde6aa7
repo: Azure/azure-rest-api-specs
additionalDirectories: null
diff --git a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md
index dc2cdb6605e3..af47074eda92 100644
--- a/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md
+++ b/sdk/compute/azure-resourcemanager-compute/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 2.56.1 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+
+
## 2.56.0 (2026-01-12)
### Other Changes
diff --git a/sdk/compute/azure-resourcemanager-compute/README.md b/sdk/compute/azure-resourcemanager-compute/README.md
index 48c9f4451c34..d341cd965e4f 100644
--- a/sdk/compute/azure-resourcemanager-compute/README.md
+++ b/sdk/compute/azure-resourcemanager-compute/README.md
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
com.azure.resourcemanager
azure-resourcemanager-compute
- 2.56.0
+ 2.56.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/compute/azure-resourcemanager-compute/pom.xml b/sdk/compute/azure-resourcemanager-compute/pom.xml
index 2cd5f48bf116..79d22fd61336 100644
--- a/sdk/compute/azure-resourcemanager-compute/pom.xml
+++ b/sdk/compute/azure-resourcemanager-compute/pom.xml
@@ -14,7 +14,7 @@
com.azure.resourcemanager
azure-resourcemanager-compute
- 2.57.0-beta.1
+ 2.56.1
jar
Microsoft Azure SDK for Compute Management
diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md
index aaae3a70b8fb..2cfe47e885f7 100644
--- a/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md
+++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/CHANGELOG.md
@@ -10,6 +10,18 @@
### Other Changes
+## 2.53.7 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-resourcemanager-storage` from `2.55.1` to version `2.55.2`.
+- Upgraded `azure-storage-file-share` from `12.28.0` to version `12.29.0`.
+- Upgraded `azure-resourcemanager-msi` from `2.53.4` to version `2.53.5`.
+- Upgraded `azure-resourcemanager-authorization` from `2.53.5` to version `2.53.6`.
+
+
## 2.53.6 (2025-11-24)
### Other Changes
diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md
index 435d5ff90757..08a0172ee19f 100644
--- a/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md
+++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/README.md
@@ -18,7 +18,7 @@ For documentation on how to use this package, please see [Azure Management Libra
com.azure.resourcemanager
azure-resourcemanager-containerinstance
- 2.53.1
+ 2.53.7
```
[//]: # ({x-version-update-end})
diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/assets.json b/sdk/containerinstance/azure-resourcemanager-containerinstance/assets.json
index 5ae2803d305d..b1a68ecfaf1a 100644
--- a/sdk/containerinstance/azure-resourcemanager-containerinstance/assets.json
+++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/containerinstance/azure-resourcemanager-containerinstance",
- "Tag": "java/containerinstance/azure-resourcemanager-containerinstance_cade898991"
+ "Tag": "java/containerinstance/azure-resourcemanager-containerinstance_a0e5cc2e29"
}
diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml
index 7ce106af9b50..3074f061719b 100644
--- a/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml
+++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/pom.xml
@@ -10,7 +10,7 @@
com.azure.resourcemanager
azure-resourcemanager-containerinstance
- 2.54.0-beta.1
+ 2.53.7
jar
Microsoft Azure SDK for Container Instance Management
diff --git a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java
index 6a597a99d78b..2ed7cce6084e 100644
--- a/sdk/containerinstance/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java
+++ b/sdk/containerinstance/azure-resourcemanager-containerinstance/src/test/java/com/azure/resourcemanager/containerinstance/ContainerGroupTest.java
@@ -3,12 +3,12 @@
package com.azure.resourcemanager.containerinstance;
-import com.azure.core.management.Region;
import com.azure.core.test.annotation.DoNotRecord;
import com.azure.resourcemanager.containerinstance.models.Container;
import com.azure.resourcemanager.containerinstance.models.ContainerAttachResult;
import com.azure.resourcemanager.containerinstance.models.ContainerExec;
import com.azure.resourcemanager.containerinstance.models.ContainerGroup;
+import com.azure.core.management.Region;
import com.azure.resourcemanager.containerinstance.models.ContainerGroupRestartPolicy;
import com.azure.resourcemanager.containerinstance.models.ContainerHttpGet;
import com.azure.resourcemanager.containerinstance.models.ContainerProbe;
@@ -19,7 +19,6 @@
import com.azure.resourcemanager.resources.fluentcore.model.Accepted;
import com.azure.resourcemanager.resources.fluentcore.utils.ResourceManagerUtils;
import org.junit.jupiter.api.Assertions;
-import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import java.time.Duration;
@@ -211,11 +210,8 @@ public void testBeginCreate() {
}
// test contains a data-plane call
- // Azure Storage doesn't support SMB mounting of file share using managed identity
- // https://learn.microsoft.com/azure/container-instances/container-instances-volume-azure-files
@DoNotRecord(skipInPlayback = true)
@Test
- @Disabled("This request was denied due to internal policy. Container Group requires that Storage Accounts is authenticated with managed identity, but Azure Storage doesn't support SMB mounting of file share using managed identity. ")
public void testBeginCreateWithFileShareVolume() {
String containerGroupName = generateRandomResourceName("container", 20);
Region region = Region.US_WEST3;
@@ -236,27 +232,6 @@ public void testBeginCreateWithFileShareVolume() {
Assertions.assertEquals(1, containerGroup.volumes().size());
}
- @DoNotRecord(skipInPlayback = true)
- @Test
- public void testBeginCreateWithEmptyDirectoryVolume() {
- String containerGroupName = generateRandomResourceName("container", 20);
- Region region = Region.US_WEST3;
-
- // create virtual network before creating container group
- Accepted acceptedContainerGroup = containerInstanceManager.containerGroups()
- .define(containerGroupName)
- .withRegion(region)
- .withNewResourceGroup(rgName)
- .withLinux()
- .withPublicImageRegistryOnly()
- .withEmptyDirectoryVolume("vol2")
- .withContainerInstance("nginx", 80)
- .withNewVirtualNetwork("10.0.0.0/24")
- .beginCreate();
- ContainerGroup containerGroup = acceptedContainerGroup.getSyncPoller().getFinalResult();
- Assertions.assertEquals(1, containerGroup.volumes().size());
- }
-
@Test
public void testCreateWithAutoGeneratedDomainNameLabelScope() {
String containerGroupName = generateRandomResourceName("container", 20);
diff --git a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml
index 8bba6ac50e88..4f2ff2beedf2 100644
--- a/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml
+++ b/sdk/containerregistry/azure-containers-containerregistry-perf/pom.xml
@@ -25,7 +25,7 @@
com.azure
azure-containers-containerregistry
- 1.3.0-beta.1
+ 1.2.22
com.azure
@@ -53,7 +53,7 @@
com.azure.resourcemanager
azure-resourcemanager-containerregistry
- 2.55.0-beta.2
+ 2.54.2
com.azure
diff --git a/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md b/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
index 065eddd72e23..7155c98da954 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
+++ b/sdk/containerregistry/azure-containers-containerregistry/CHANGELOG.md
@@ -12,6 +12,17 @@
### Other Changes
+## 1.2.22 (2026-01-28)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.57.0` to version `1.57.1`.
+- Upgraded `azure-core-http-netty` from `1.16.2` to version `1.16.3`.
+- Upgraded `azure-json` from `1.5.0` to version `1.5.1`.
+
+
## 1.2.21 (2025-10-27)
### Other Changes
diff --git a/sdk/containerregistry/azure-containers-containerregistry/README.md b/sdk/containerregistry/azure-containers-containerregistry/README.md
index c921a0a747c1..e482016cf52c 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/README.md
+++ b/sdk/containerregistry/azure-containers-containerregistry/README.md
@@ -5,9 +5,9 @@ Azure Container Registry allows you to store and manage container images and art
Use the client library for Azure Container Registry to:
- List images or artifacts in a registry
-- Upload, download, and delete images and artifacts, repositories and tags
- Obtain metadata for images and artifacts, repositories and tags
- Set read/write/delete properties on registry items
+- Delete images and artifacts, repositories and tags
[Source code][source_code] | [Package (Maven)][package] | [Product documentation][product_docs] | [Samples][samples]
@@ -56,7 +56,7 @@ and then include the direct dependency in the dependencies section without the v
com.azure
azure-containers-containerregistry
- 1.3.0-beta.1
+ 1.2.22
```
[//]: # ({x-version-update-end})
@@ -83,7 +83,7 @@ ContainerRegistryAsyncClient registryClient = new ContainerRegistryClientBuilder
.buildAsyncClient();
```
-For more information on using AAD with Azure Container Registry, please see the service's [Authentication Overview](https://learn.microsoft.com/azure/container-registry/container-registry-authentication).
+For more information on using AAD with Azure Container Registry, please see the service's [Authentication Overview](https://docs.microsoft.com/azure/container-registry/container-registry-authentication).
#### Authenticating with ARM AAD token
@@ -108,9 +108,9 @@ registryClient
#### National Clouds
-To authenticate with a registry in a [National Cloud](https://learn.microsoft.com/azure/active-directory/develop/authentication-national-cloud), you will need to make the following additions to your client configuration:
+To authenticate with a registry in a [National Cloud](https://docs.microsoft.com/azure/active-directory/develop/authentication-national-cloud), you will need to make the following additions to your client configuration:
- Set the `authorityHost` in the credential builder following [Identity client library documentation](https://learn.microsoft.com/java/api/overview/azure/identity-readme)
-- If ACR access token authentication is disabled for your container Registry resource, you need to configure the audience on the Container Registry client builder.
+- If ACR access token authentication is disabled for yourcontainer Registry resource, you need to configure the audience on the Container Registry client builder.
```java readme-sample-armTokenChina
ContainerRegistryClient registryClient = new ContainerRegistryClientBuilder()
@@ -126,11 +126,10 @@ registryClient
```
#### Anonymous access support
-
If the builder is instantiated without any credentials, the SDK creates the service client for the anonymous pull mode.
The user must use this setting on a registry that has been enabled for anonymous pull.
-In this mode, the user can only call `listRepositoryNames` method and its overload. All the other calls will fail.
-For more information please read [Anonymous Pull Access](https://learn.microsoft.com/azure/container-registry/container-registry-faq#how-do-i-enable-anonymous-pull-access)
+In this mode, the user can only call listRepositoryNames method and its overload. All the other calls will fail.
+For more information please read [Anonymous Pull Access](https://docs.microsoft.com/azure/container-registry/container-registry-faq#how-do-i-enable-anonymous-pull-access)
```java readme-sample-createAnonymousAccessClient
ContainerRegistryClient registryClient = new ContainerRegistryClientBuilder()
@@ -148,7 +147,7 @@ ContainerRegistryAsyncClient registryClient = new ContainerRegistryClientBuilder
A **registry** stores Docker images and [OCI Artifacts](https://opencontainers.org/). An image or artifact consists of a **manifest** and **layers**. An image's manifest describes the layers that make up the image, and is uniquely identified by its **digest**. An image can also be "tagged" to give it a human-readable alias. An image or artifact can have zero or more **tags** associated with it, and each tag uniquely identifies the image. A collection of images that share the same name but have different tags, is referred to as a **repository**.
-For more information please see [Container Registry Concepts](https://learn.microsoft.com/azure/container-registry/container-registry-concepts).
+For more information please see [Container Registry Concepts](https://docs.microsoft.com/azure/container-registry/container-registry-concepts).
## Examples
@@ -204,6 +203,7 @@ image.updateTagProperties(
.setDeleteEnabled(false));
```
+
#### Delete Images
```java readme-sample-deleteImages
@@ -270,12 +270,10 @@ To upload a full image, we need to upload individual layers and configuration. A
which describes an image or artifact and assign it a tag.
```java readme-sample-uploadImage
-BinaryData configContent = BinaryData
- .fromObject(Collections.singletonMap("hello", "world"));
+BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
UploadRegistryBlobResult configUploadResult = contentClient.uploadBlob(configContent);
-System.out.printf("Uploaded config: digest - %s, size - %s\n", configUploadResult.getDigest(),
- configContent.getLength());
+System.out.printf("Uploaded config: digest - %s, size - %s\n", configUploadResult.getDigest(), configContent.getLength());
OciDescriptor configDescriptor = new OciDescriptor()
.setMediaType("application/vnd.unknown.config.v1+json")
@@ -284,8 +282,7 @@ OciDescriptor configDescriptor = new OciDescriptor()
BinaryData layerContent = BinaryData.fromString("Hello Azure Container Registry");
UploadRegistryBlobResult layerUploadResult = contentClient.uploadBlob(layerContent);
-System.out.printf("Uploaded layer: digest - %s, size - %s\n", layerUploadResult.getDigest(),
- layerContent.getLength());
+System.out.printf("Uploaded layer: digest - %s, size - %s\n", layerUploadResult.getDigest(), layerContent.getLength());
OciImageManifest manifest = new OciImageManifest()
.setConfiguration(configDescriptor)
@@ -308,7 +305,7 @@ To download a full image, we need to download its manifest and then download ind
GetManifestResult manifestResult = contentClient.getManifest("latest");
OciImageManifest manifest = manifestResult.getManifest().toObject(OciImageManifest.class);
-System.out.printf("Got manifest:\n%s\n", manifest.toJsonString());
+System.out.printf("Got manifest:\n%s\n", PRETTY_PRINT.writeValueAsString(manifest));
String configFileName = manifest.getConfiguration().getDigest() + ".json";
contentClient.downloadStream(manifest.getConfiguration().getDigest(), createFileChannel(configFileName));
@@ -346,7 +343,7 @@ See our [troubleshooting guide](https://github.com/Azure/azure-sdk-for-java/blob
- Go further with azure-containers-containerregistry and our [samples][samples]
- Watch a [demo or deep dive video](https://azure.microsoft.com/resources/videos/index/?service=container-registry)
-- Read more about the [Azure Container Registry service](https://learn.microsoft.com/azure/container-registry/container-registry-intro)
+- Read more about the [Azure Container Registry service](https://docs.microsoft.com/azure/container-registry/container-registry-intro)
## Contributing
@@ -362,18 +359,18 @@ additional questions or comments.
[source_code]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/containerregistry/azure-containers-containerregistry/src
-[jdk_link]: https://learn.microsoft.com/java/azure/jdk/?view=azure-java-stable
+[jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
[azure_subscription]: https://azure.microsoft.com/free
-[package]: https://central.sonatype.com/artifact/com.azure/azure-containers-containerregistry
+[package]: https://search.maven.org/artifact/com.azure/azure-containers-containerregisty
[api_documentation]: https://aka.ms/java-docs
-[rest_docs]: https://learn.microsoft.com/rest/api/containerregistry/
-[product_docs]: https://learn.microsoft.com/azure/container-registry
-[container_registry_docs]: https://learn.microsoft.com/azure/container-registry/container-registry-intro
-[container_registry_create_ps]: https://learn.microsoft.com/azure/container-registry/container-registry-get-started-powershell
-[container_registry_create_cli]: https://learn.microsoft.com/azure/container-registry/container-registry-get-started-azure-cli
-[container_registry_create_portal]: https://learn.microsoft.com/azure/container-registry/container-registry-get-started-portal
-[container_registry_concepts]: https://learn.microsoft.com/azure/container-registry/container-registry-concepts
-[azure_cli]: https://learn.microsoft.com/cli/azure
+[rest_docs]: https://docs.microsoft.com/rest/api/containerregistry/
+[product_docs]: https://docs.microsoft.com/azure/container-registry
+[container_registry_docs]: https://docs.microsoft.com/azure/container-registry/container-registry-intro
+[container_registry_create_ps]: https://docs.microsoft.com/azure/container-registry/container-registry-get-started-powershell
+[container_registry_create_cli]: https://docs.microsoft.com/azure/container-registry/container-registry-get-started-azure-cli
+[container_registry_create_portal]: https://docs.microsoft.com/azure/container-registry/container-registry-get-started-portal
+[container_registry_concepts]: https://docs.microsoft.com/azure/container-registry/container-registry-concepts
+[azure_cli]: https://docs.microsoft.com/cli/azure
[azure_sub]: https://azure.microsoft.com/free/
[identity]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/identity/azure-identity/README.md
[HttpResponseException]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java
@@ -382,4 +379,4 @@ additional questions or comments.
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:opencode@microsoft.com
-
+
diff --git a/sdk/containerregistry/azure-containers-containerregistry/assets.json b/sdk/containerregistry/azure-containers-containerregistry/assets.json
deleted file mode 100644
index d0121435a920..000000000000
--- a/sdk/containerregistry/azure-containers-containerregistry/assets.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "AssetsRepo": "Azure/azure-sdk-assets",
- "AssetsRepoPrefixPath": "java",
- "TagPrefix": "java/containerregistry/azure-containers-containerregistry",
- "Tag": "java/containerregistry/azure-containers-containerregistry_67d62f2e16"
-}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/checkstyle-suppressions.xml b/sdk/containerregistry/azure-containers-containerregistry/checkstyle-suppressions.xml
index 0a4fef55c035..469a710493fe 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/checkstyle-suppressions.xml
+++ b/sdk/containerregistry/azure-containers-containerregistry/checkstyle-suppressions.xml
@@ -3,11 +3,28 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/containerregistry/azure-containers-containerregistry/pom.xml b/sdk/containerregistry/azure-containers-containerregistry/pom.xml
index bd3e043f943e..52f34255c191 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/pom.xml
+++ b/sdk/containerregistry/azure-containers-containerregistry/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-containers-containerregistry
- 1.3.0-beta.1
+ 1.2.22
Microsoft Azure SDK for Container Registry
This package contains Microsoft Azure SDK for Container Registry.
@@ -40,8 +40,11 @@
--add-opens com.azure.core/com.azure.core.implementation.util=ALL-UNNAMED
--add-reads com.azure.core=ALL-UNNAMED
+ -
+ checkstyle-suppressions.xml
false
+ spotbugs-exclude.xml
@@ -60,16 +63,66 @@
azure-core-http-netty
1.16.3
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.13.4
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.13.4
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-params
+ 5.13.4
+ test
+
+
+ org.mockito
+ mockito-core
+ 4.11.0
+ test
+
+
+
+
+ net.bytebuddy
+ byte-buddy
+ 1.17.7
+ test
+
+
+ net.bytebuddy
+ byte-buddy-agent
+ 1.17.7
+ test
+
+
+ io.projectreactor
+ reactor-test
+ 3.7.11
+ test
+
com.azure
azure-core-test
1.27.0-beta.14
test
+
+ com.azure
+ azure-core-http-okhttp
+ 1.13.3
+ test
+
com.azure.resourcemanager
azure-resourcemanager-containerregistry
- 2.55.0-beta.2
+ 2.54.2
test
diff --git a/sdk/containerregistry/azure-containers-containerregistry/spotbugs-exclude.xml b/sdk/containerregistry/azure-containers-containerregistry/spotbugs-exclude.xml
index 404d08eabd76..f70a6b1aa20a 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/spotbugs-exclude.xml
+++ b/sdk/containerregistry/azure-containers-containerregistry/spotbugs-exclude.xml
@@ -6,4 +6,59 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryAsyncClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryAsyncClient.java
index 987f075b10e9..be31d0a582c4 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryAsyncClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryAsyncClient.java
@@ -20,25 +20,17 @@
import com.azure.core.util.logging.ClientLogger;
import reactor.core.publisher.Mono;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
import static com.azure.core.util.FluxUtil.monoError;
import static com.azure.core.util.FluxUtil.withContext;
/**
- * This class provides a client that works with repositories in Azure Container Registry.
- * It allows to list and delete repositories within the registry or obtain an instance of {@link ContainerRepositoryAsync}
- * or {@link RegistryArtifactAsync} that can be used to perform operations on the repository or artifact.
+ * This class provides a client that exposes operations to managing container images and artifacts.
+ * It exposes methods directly performed on the registry like listing the catalog.
+ * as well as helper types like {@link #getArtifact(String, String) getArtifact} and {@link #getRepository(String) getRepository}
+ * that can be used to perform operations on repository and artifacts directly.
*
- * Getting Started
- *
- * In order to interact with the Container Registry service you'll need to create an instance of
- * ContainerRegistryAsyncClient.
- *
- * To create the client and communicate with the service, you'll need to use AAD authentication via
- * Azure Identity
.
- *
- * Sample: Construct Container Registry Async Client
- *
- * The following code sample demonstrates the creation of a Container Registry Async Client.
+ * Instantiating an asynchronous Container Registry client
*
*
*
@@ -49,17 +41,23 @@
*
*
*
- * Note: For synchronous sample, refer to
- * {@link com.azure.containers.containerregistry.ContainerRegistryClient}.
+ * Instantiating an asynchronous Container Registry client using a custom pipeline
+ *
+ *
+ * HttpPipeline pipeline = new HttpPipelineBuilder()
+ * .policies(/* add policies */)
+ * .build();
*
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
+ * ContainerRegistryAsyncClient registryAsyncClient = new ContainerRegistryClientBuilder()
+ * .pipeline(pipeline)
+ * .endpoint(endpoint)
+ * .credential(credential)
+ * .buildAsyncClient();
+ *
+ *
*
- * The Container Registry Async Client allows to list and delete repositories and obtain instances of repository and
- * artifact client. See methods below to explore all capabilities this client provides.
-
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
+ * View {@link ContainerRegistryClientBuilder this} for additional ways to construct the client.
*
- * @see com.azure.containers.containerregistry
* @see ContainerRegistryClientBuilder
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class, isAsync = true)
@@ -79,9 +77,8 @@ public final class ContainerRegistryAsyncClient {
}
/**
- * Gets the service endpoint.
- *
- * @return The service endpoint for the Azure Container Registry instance.
+ * This method returns the complete registry endpoint.
+ * @return The registry endpoint including the authority.
*/
public String getEndpoint() {
return this.endpoint;
@@ -90,7 +87,7 @@ public String getEndpoint() {
/**
* List all the repository names in this registry.
*
- * List repository names in the registry
+ * List repository names in the registry.
*
*
*
@@ -101,13 +98,13 @@ public String getEndpoint() {
*
*
* @return list of repository names.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux listRepositoryNames() {
return new PagedFlux<>(
(pageSize) -> withContext(context -> listRepositoryNamesSinglePageAsync(pageSize, context)),
- (token, ignored) -> withContext(context -> listRepositoryNamesNextSinglePageAsync(token, context)));
+ (token, pageSize) -> withContext(context -> listRepositoryNamesNextSinglePageAsync(token, context)));
}
private Mono> listRepositoryNamesSinglePageAsync(Integer pageSize, Context context) {
@@ -127,9 +124,9 @@ private Mono> listRepositoryNamesNextSinglePageAsync(Strin
}
/**
- * Delete the repository with provided {@code repositoryName}.
+ * Delete the repository identified by 'repositoryName'.
*
- * Delete a repository in the registry
+ * Delete a repository in the registry.
*
*
*
@@ -141,11 +138,11 @@ private Mono> listRepositoryNamesNextSinglePageAsync(Strin
*
*
*
- * @param repositoryName Name of the repository.
+ * @param repositoryName Name of the repository (including the namespace).
* @return the completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to delete the repository.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code repositoryName} is null.
- * @throws IllegalArgumentException thrown if the {@code repositoryName} is empty.
+ * @throws IllegalArgumentException thrown if the {@code repositoryName} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> deleteRepositoryWithResponse(String repositoryName) {
@@ -167,9 +164,9 @@ private Mono> deleteRepositoryWithResponse(String repositoryName,
}
/**
- * Delete the repository with provided {@code repositoryName}.
+ * Delete the repository identified by {@code repositoryName}.
*
- * Delete a repository in the registry
+ * Delete a repository in the registry.
*
*
* client.deleteRepository(repositoryName).subscribe(response -> {
@@ -180,9 +177,9 @@ private Mono> deleteRepositoryWithResponse(String repositoryName,
*
*
*
- * @param repositoryName Name of the repository.
- * @return the completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to delete the repository.
+ * @param repositoryName Name of the image (including the namespace).
+ * @return the completion stream.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code repositoryName} is null.
* @throws IllegalArgumentException thrown if {@code repositoryName} is empty.
*/
@@ -198,7 +195,7 @@ private Mono deleteRepository(String repositoryName, Context context) {
/**
* Creates a new instance of {@link ContainerRepositoryAsync} object for the specified repository.
*
- * Get an instance of {@link ContainerRepositoryAsync}
+ * Create an instance of ContainerRepositoryAsync helper type
*
*
* ContainerRepositoryAsync repositoryAsync = client.getRepository(repositoryName);
@@ -209,7 +206,7 @@ private Mono deleteRepository(String repositoryName, Context context) {
*
*
* @param repositoryName Name of the repository to reference.
- * @return A new {@link ContainerRepositoryAsync} for the requested repository.
+ * @return A new {@link ContainerRepositoryAsync} for the desired repository.
* @throws NullPointerException if {@code repositoryName} is null.
* @throws IllegalArgumentException if {@code repositoryName} is empty.
*/
@@ -220,7 +217,7 @@ public ContainerRepositoryAsync getRepository(String repositoryName) {
/**
* Creates a new instance of {@link RegistryArtifactAsync} object for the specified artifact.
*
- * Get an instance of {@link RegistryArtifactAsync}
+ * Create an instance of RegistryArtifactAsync helper type
*
*
* RegistryArtifactAsync registryArtifactAsync = client.getArtifact(repositoryName, tagOrDigest);
@@ -230,11 +227,11 @@ public ContainerRepositoryAsync getRepository(String repositoryName) {
*
*
*
- * @param repositoryName Name of the repository containing the artifact.
+ * @param repositoryName Name of the repository to reference.
* @param tagOrDigest Either a tag or digest that uniquely identifies the artifact.
- * @return A new {@link RegistryArtifactAsync RegistryArtifactAsync} for the requested artifact.
- * @throws NullPointerException if {@code repositoryName} or {@code tagOrDigest} are null.
- * @throws IllegalArgumentException if {@code repositoryName} or {@code tagOrDigest} are empty.
+ * @return A new {@link RegistryArtifactAsync RegistryArtifactAsync} for the desired repository.
+ * @throws NullPointerException if {@code repositoryName} or {@code tagOrDigest} is null.
+ * @throws IllegalArgumentException if {@code repositoryName} or {@code tagOrDigest} is empty.
*/
public RegistryArtifactAsync getArtifact(String repositoryName, String tagOrDigest) {
return new RegistryArtifactAsync(repositoryName, tagOrDigest, httpPipeline, endpoint, apiVersion);
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClient.java
index 221c3bedb547..a60aaaa9d71e 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClient.java
@@ -23,23 +23,12 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
/**
- * This class provides a client that works with repositories in Azure Container Registry.
- * It allows to list and delete repositories within the registry or obtain an instance of {@link ContainerRepository}
- * or {@link RegistryArtifact} that can be used to perform operations on the repository or artifact.
- *
- * Getting Started
- *
- * In order to interact with the Container Registry service you'll need to create an instance of
- * {@link com.azure.containers.containerregistry.ContainerRegistryClient}.
- *
- * To create one of the client and communicate with the service, you'll need to use AAD authentication via
- * Azure Identity
.
- *
- * Sample: Construct Container Registry Client
- *
- * The following code sample demonstrates the creation of a
- * {@link com.azure.containers.containerregistry.ContainerRegistryClient}.
+ * This class provides a client that exposes operations to managing container images and artifacts.
+ * synchronously. It exposes methods directly performed on the registry like listing the catalog.
+ * as well as helper types like {@link #getArtifact(String, String) getArtifact} and {@link #getRepository(String) getRepository}
+ * that can be used to perform operations on repository and artifacts.
*
+ * Instantiating a synchronous Container Registry client
*
*
* ContainerRegistryClient registryAsyncClient = new ContainerRegistryClientBuilder()
@@ -49,15 +38,23 @@
*
*
*
- * Note: For asynchronous sample, refer to
- * {@link com.azure.containers.containerregistry.ContainerRegistryAsyncClient}.
+ * Instantiating a synchronous Container Registry client with custom pipeline
+ *
+ *
+ * HttpPipeline pipeline = new HttpPipelineBuilder()
+ * .policies(/* add policies */)
+ * .build();
*
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
+ * ContainerRegistryClient registryAsyncClient = new ContainerRegistryClientBuilder()
+ * .pipeline(pipeline)
+ * .endpoint(endpoint)
+ * .credential(credential)
+ * .buildClient();
+ *
+ *
*
- * The Container Registry Client allows to list and delete repositories and obtain instances of repository and
- * artifact client. See methods below to explore all capabilities this client provides.
+ * View {@link ContainerRegistryClientBuilder this} for additional ways to construct the client.
*
- * @see com.azure.containers.containerregistry
* @see ContainerRegistryClientBuilder
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class)
@@ -77,9 +74,8 @@ public final class ContainerRegistryClient {
}
/**
- * Gets the service endpoint.
- *
- * @return The service endpoint for the Azure Container Registry instance.
+ * This method returns the complete registry endpoint.
+ * @return The registry endpoint including the authority.
*/
public String getEndpoint() {
return this.endpoint;
@@ -88,7 +84,7 @@ public String getEndpoint() {
/**
* List all the repository names in this registry.
*
- * List the repository names in the registry
+ * List the repository names in the registry.
*
*
*
@@ -109,7 +105,7 @@ public PagedIterable listRepositoryNames() {
/**
* List all the repository names in this registry.
*
- * List the repository names in the registry
+ * List the repository names in the registry.
*
*
* client.listRepositoryNames(Context.NONE).stream().forEach(name -> {
@@ -125,7 +121,7 @@ public PagedIterable listRepositoryNames() {
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable listRepositoryNames(Context context) {
return new PagedIterable<>((pageSize) -> listRepositoryNamesSinglePageSync(pageSize, context),
- (token, ignored) -> listRepositoryNamesNextSinglePageSync(token, context));
+ (token, pageSize) -> listRepositoryNamesNextSinglePageSync(token, context));
}
private PagedResponse listRepositoryNamesSinglePageSync(Integer pageSize, Context context) {
@@ -134,8 +130,7 @@ private PagedResponse listRepositoryNamesSinglePageSync(Integer pageSize
}
try {
- return UtilsImpl.getPagedResponseWithContinuationToken(
- this.registriesImplClient.getRepositoriesSinglePage(null, pageSize, context));
+ return this.registriesImplClient.getRepositoriesSinglePage(null, pageSize, context);
} catch (AcrErrorsException exception) {
throw LOGGER.logExceptionAsError(mapAcrErrorsException(exception));
}
@@ -143,17 +138,16 @@ private PagedResponse listRepositoryNamesSinglePageSync(Integer pageSize
private PagedResponse listRepositoryNamesNextSinglePageSync(String nextLink, Context context) {
try {
- return UtilsImpl.getPagedResponseWithContinuationToken(
- this.registriesImplClient.getRepositoriesNextSinglePage(nextLink, context));
+ return this.registriesImplClient.getRepositoriesNextSinglePage(nextLink, context);
} catch (AcrErrorsException exception) {
throw LOGGER.logExceptionAsError(mapAcrErrorsException(exception));
}
}
/**
- * Delete the repository with provided {@code repositoryName}.
+ * Delete the repository identified by {@code repositoryName}.
*
- * Delete a repository in the registry
+ * Delete a repository in the registry.
*
*
* client.deleteRepository(repositoryName);
@@ -161,7 +155,7 @@ private PagedResponse listRepositoryNamesNextSinglePageSync(String nextL
*
*
* @param repositoryName Name of the repository (including the namespace).
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to delete the repository.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code repositoryName} is null.
* @throws IllegalArgumentException thrown if the {@code repositoryName} is empty.
*/
@@ -171,9 +165,9 @@ public void deleteRepository(String repositoryName) {
}
/**
- * Delete the repository with provided {@code repositoryName}.
+ * Delete the repository identified by {@code repositoryName}.
*
- * Delete a repository in the registry
+ * Delete a repository in the registry.
*
*
* client.deleteRepositoryWithResponse(repositoryName, Context.NONE);
@@ -183,7 +177,7 @@ public void deleteRepository(String repositoryName) {
* @param repositoryName Name of the repository (including the namespace).
* @param context The context to associate with this operation.
* @return Completion response.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to delete the repository.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code repositoryName} is null.
* @throws IllegalArgumentException thrown if the {@code repositoryName} is empty.
*/
@@ -206,7 +200,7 @@ public Response deleteRepositoryWithResponse(String repositoryName, Contex
/**
* Creates a new instance of {@link ContainerRepository} object for the specified repository.
*
- * Get an instance of {@link ContainerRepository}
+ * Create a ContainerRegistry helper instance.
*
*
* ContainerRepository repository = client.getRepository(repositoryName);
@@ -216,7 +210,7 @@ public Response deleteRepositoryWithResponse(String repositoryName, Contex
*
*
* @param repositoryName Name of the repository to reference.
- * @return A new {@link ContainerRepository} for the requested repository.
+ * @return A new {@link ContainerRepository} for the desired repository.
* @throws NullPointerException if {@code repositoryName} is null.
* @throws IllegalArgumentException if {@code repositoryName} is empty.
*/
@@ -227,7 +221,7 @@ public ContainerRepository getRepository(String repositoryName) {
/**
* Creates a new instance of {@link RegistryArtifact} object for the specified artifact.
*
- * Get an instance of {@link RegistryArtifact}
+ * Create a RegistryArtifact helper instance.
*
*
* RegistryArtifact registryArtifact = client.getArtifact(repositoryName, tagOrDigest);
@@ -236,9 +230,9 @@ public ContainerRepository getRepository(String repositoryName) {
*
*
*
- * @param repositoryName Name of the repository.
+ * @param repositoryName Name of the repository to reference.
* @param tagOrDigest Either a tag or digest that uniquely identifies the artifact.
- * @return A new {@link RegistryArtifact} object for the requested artifact.
+ * @return A new {@link RegistryArtifact} object for the desired repository.
* @throws NullPointerException if {@code repositoryName} or {@code tagOrDigest} is null.
* @throws IllegalArgumentException if {@code repositoryName} or {@code tagOrDigest} is empty.
*/
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClientBuilder.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClientBuilder.java
index 0a1f83cc7fc0..76f559e491b3 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClientBuilder.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryClientBuilder.java
@@ -33,15 +33,13 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.createTracer;
/**
- * Fluent builder for instantiating a {@link ContainerRegistryClient} and {@link ContainerRegistryAsyncClient}. which are used to
- * list and delete repositories and artifacts, obtain metadata and configure read/write permissions.
- *
- * The client needs the service endpoint of the Azure Container Registry and Azure access credentials to use for authentication.
+ * This class provides a fluent builder API to help aid the configuration and instantiation of {@link
+ * ContainerRegistryClient ContainerRegistryClients} and {@link ContainerRegistryAsyncClient ContainerRegistryAsyncClients}, call {@link
+ * #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of
+ * the desired client.
*
+ *
The client needs the service endpoint of the Azure Container Registry, Audience for ACR that you want to target and Azure access credentials to use for authentication.
*
Instantiating an asynchronous Container Registry client
- *
- *
- *
*
*
* ContainerRegistryAsyncClient registryAsyncClient = new ContainerRegistryClientBuilder()
@@ -52,9 +50,6 @@
*
*
* Instantiating a synchronous Container Registry client
- *
- *
- *
*
*
* ContainerRegistryClient registryAsyncClient = new ContainerRegistryClientBuilder()
@@ -75,9 +70,6 @@
* For more information please see Azure Container Registry Authentication .
*
* Instantiating an asynchronous Container Registry client using a custom pipeline
- *
- *
- *
*
*
* HttpPipeline pipeline = new HttpPipelineBuilder()
@@ -93,9 +85,6 @@
*
*
* Instantiating a synchronous Container Registry client with custom pipeline
- *
- *
- *
*
*
* HttpPipeline pipeline = new HttpPipelineBuilder()
@@ -110,21 +99,7 @@
*
*
*
- * Azure Container Registry could be configured for anonymous access
- *
- * Instantiating an asynchronous Container Registry client for anonymous access
*
- *
- *
- *
- *
- * ContainerRegistryAsyncClient registryClient = new ContainerRegistryClientBuilder()
- * .endpoint(endpoint)
- * .buildAsyncClient();
- *
- *
- *
- * @see com.azure.containers.containerregistry
* @see ContainerRegistryAsyncClient
* @see ContainerRegistryClient
*/
@@ -155,12 +130,6 @@ public final class ContainerRegistryClientBuilder
private ContainerRegistryServiceVersion version;
private ContainerRegistryAudience audience;
- /**
- * Creates a new instance of {@link ContainerRegistryClientBuilder}.
- */
- public ContainerRegistryClientBuilder() {
- }
-
/**
* Sets the service endpoint for the Azure Container Registry instance.
*
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
index a27b69f9279d..78b78b8d03bf 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentAsyncClient.java
@@ -61,41 +61,11 @@
import static com.azure.core.util.FluxUtil.withContext;
/**
- * This class provides a client that can upload, download, and delete artifacts in Azure Container Registry repository.
- * It uses docker v2 REST APIs supported by Azure Container Registry.
+ * This class provides a client that exposes operations to push and pull images into container registry.
+ * It exposes methods that upload, download and delete artifacts from the registry i.e. images and manifests.
*
- * Getting Started
+ * View {@link ContainerRegistryContentClientBuilder this} for additional ways to construct the client.
*
- * In order to interact with the Container Registry service you'll need to create an instance of
- * Container Registry Content Async Client.
- *
- * To create the client and communicate with the service, you'll need to use AAD authentication via
- * Azure Identity
.
- *
- * Sample: Construct Container Registry Content Async Client
- *
- * The following code sample demonstrates the creation of a Container Registry Content Client.
- *
- *
- *
- * DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- * ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
- * .endpoint(endpoint)
- * .credential(credential)
- * .repositoryName(repository)
- * .buildAsyncClient();
- *
- *
- *
- * Note: For synchronous sample, refer to
- * {@link com.azure.containers.containerregistry.ContainerRegistryContentClient}.
- *
- * View {@link ContainerRegistryContentClientBuilder} for additional ways to construct the client.
- *
- * Container Registry Content Async Client allows to upload and download registry artifacts. See methods below to
- * explore all capabilities this client provides.
- *
- * @see com.azure.containers.containerregistry
* @see ContainerRegistryContentClientBuilder
*/
@ServiceClient(builder = ContainerRegistryContentClientBuilder.class, isAsync = true)
@@ -118,27 +88,27 @@ public final class ContainerRegistryContentAsyncClient {
}
/**
- * Gets the current repository name.
+ * This method returns the registry's repository on which operations are being performed.
*
- * @return The repository name.
+ * @return The name of the repository
*/
public String getRepositoryName() {
return this.repositoryName;
}
/**
- * Gets the Azure Container Registry service endpoint.
+ * This method returns the complete registry endpoint.
*
- * @return The service endpoint.
+ * @return The registry endpoint including the authority.
*/
public String getEndpoint() {
return this.endpoint;
}
/**
- * Upload the OCI manifest to the repository.
+ * Upload the Oci manifest to the repository.
*
- * Upload an OCI manifest
+ * Code Samples:
*
*
*
@@ -154,7 +124,7 @@ public String getEndpoint() {
* @param manifest The {@link OciImageManifest} that needs to be uploaded.
* @param tag Tag to apply on uploaded manifest. If {@code null} is passed, no tags will be applied.
* @return upload result.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code manifest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -170,7 +140,7 @@ public Mono setManifest(OciImageManifest manifest, String tag
/**
* Uploads a manifest to the repository.
*
- * Upload a manifest
+ * Code Samples:
*
*
*
@@ -186,7 +156,7 @@ public Mono setManifest(OciImageManifest manifest, String tag
* @see Oci Manifest Specification
* @param options The options for the upload manifest operation.
* @return The rest response containing the upload result.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -202,7 +172,7 @@ public Mono> setManifestWithResponse(SetManifestOpti
/**
* Uploads a blob to the repository.
*
- * Upload a blob from {@link BinaryData content}
+ * Code Samples:
*
*
*
@@ -215,8 +185,6 @@ public Mono> setManifestWithResponse(SetManifestOpti
*
*
*
- * Upload a blob from file
- *
*
*
* contentClient.uploadBlob(BinaryData.fromFile(Paths.get("artifact.tar.gz"), CHUNK_SIZE))
@@ -226,8 +194,6 @@ public Mono> setManifestWithResponse(SetManifestOpti
*
*
*
- * Error handling
- *
*
*
* layerContent
@@ -243,8 +209,9 @@ public Mono> setManifestWithResponse(SetManifestOpti
*
*
*
- * Note:
- *
+ *
+ * Note:
+ *
* Content may be uploaded in chunks of up to 4MB size. Chunk size depends on the passed {@link BinaryData} content.
* When {@link BinaryData} is created using {@link BinaryData#fromFlux(Flux, Long, boolean)}, it may be uploaded in
* chunks matching individual {@link ByteBuffer} in the {@link Flux} and up to 4MB size.
@@ -253,7 +220,7 @@ public Mono> setManifestWithResponse(SetManifestOpti
*
* @param content The blob content that needs to be uploaded.
* @return The operation result.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -269,7 +236,7 @@ public Mono uploadBlob(BinaryData content) {
/**
* Download the manifest identified by the given tag or digest.
*
- * Download manifest
+ * Code Samples:
*
*
*
@@ -291,7 +258,7 @@ public Mono uploadBlob(BinaryData content) {
*
* @param tagOrDigest Manifest reference which can be tag or digest.
* @return The manifest identified by the given tag or digest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -302,7 +269,7 @@ public Mono getManifest(String tagOrDigest) {
/**
* Download the manifest identified by the given tag or digest.
*
- * Download manifest
+ * Code Samples:
*
*
*
@@ -323,7 +290,7 @@ public Mono getManifest(String tagOrDigest) {
*
* @param tagOrDigest Manifest reference which can be tag or digest.
* @return The response for the manifest identified by the given tag or digest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -335,7 +302,7 @@ public Mono> getManifestWithResponse(String tagOrDig
* Download the blob identified by the given digest.
* Content is downloaded in chunks of 4MB size each.
*
- * Download blob to file
+ * Code Samples:
*
* Write content to synchronous channel, for example {@link java.nio.channels.FileChannel}:
*
@@ -352,8 +319,6 @@ public Mono> getManifestWithResponse(String tagOrDig
*
*
*
- * Download blob as a stream
- *
* Write content to asynchronous byte channel, for example {@link java.nio.channels.AsynchronousSocketChannel}:
*
*
@@ -371,7 +336,7 @@ public Mono> getManifestWithResponse(String tagOrDig
*
* @param digest The digest for the given image layer.
* @return The image identified by the given digest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -381,9 +346,9 @@ public Mono downloadStream(String digest) {
}
/**
- * Delete blob identified by the given digest
+ * Delete the image identified by the given digest
*
- * Delete artifact
+ * Code Samples:
*
*
*
@@ -395,7 +360,7 @@ public Mono downloadStream(String digest) {
*
* @param digest The digest for the given image layer.
* @return The completion signal.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -404,11 +369,11 @@ public Mono deleteBlob(String digest) {
}
/**
- * Delete blob identified by the given digest
+ * Delete the image identified by the given digest
*
* @param digest The digest for the given image layer.
* @return The REST response for the completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -419,7 +384,7 @@ public Mono> deleteBlobWithResponse(String digest) {
/**
* Delete the manifest identified by the given digest.
*
- * Delete manifest
+ * Code Samples:
*
*
*
@@ -431,7 +396,7 @@ public Mono> deleteBlobWithResponse(String digest) {
*
* @param digest The digest of the manifest.
* @return The completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -444,7 +409,7 @@ public Mono deleteManifest(String digest) {
*
* @param digest The digest of the manifest.
* @return The REST response for completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -570,7 +535,7 @@ private Mono upload(Flux data, String location, Context cont
return data.flatMapSequential(chunk -> {
BinaryData chunkData = BinaryData.fromByteBuffer(chunk);
return blobsImpl.uploadChunkWithResponseAsync(locationRef.get(), chunkData, chunkData.getLength(), context)
- .map(UtilsImpl::getLocation);
+ .map(response -> getLocation(response));
}, 1, 1).doOnNext(locationRef::set).last();
}
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
index 5d45c13d42f7..de1424da8cf0 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClient.java
@@ -61,40 +61,11 @@
import static com.azure.core.util.CoreUtils.bytesToHexString;
/**
- * This class provides a client that can upload, download, and delete artifacts in Azure Container Registry repository.
+ * This class provides a client that exposes operations to push and pull images into container registry.
+ * It exposes methods that upload, download and delete artifacts from the registry i.e. images and manifests.
*
- * Getting Started
+ * View {@link ContainerRegistryContentClientBuilder this} for additional ways to construct the client.
*
- * In order to interact with the Container Registry service you'll need to create an instance of
- * Container Registry Content Client.
- *
- * To create the client and communicate with the service, you'll need to use AAD authentication via
- * Azure Identity
.
- *
- * Sample: Construct Container Registry Content Client
- *
- * The following code sample demonstrates the creation of a Container Registry Content Client.
- *
- *
- *
- * DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- * ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
- * .endpoint(endpoint)
- * .credential(credential)
- * .repositoryName(repository)
- * .buildClient();
- *
- *
- *
- * Note: For asynchronous sample, refer to
- * {@link com.azure.containers.containerregistry.ContainerRegistryContentAsyncClient}.
- *
- * View {@link ContainerRegistryContentClientBuilder} for additional ways to construct the client.
- *
- * Container Registry Content Client allows to upload and download registry artifacts. See methods below to
- * explore all capabilities this client provides.
- *
- * @see com.azure.containers.containerregistry
* @see ContainerRegistryContentClientBuilder
*/
@ServiceClient(builder = ContainerRegistryContentClientBuilder.class)
@@ -118,18 +89,18 @@ public final class ContainerRegistryContentClient {
}
/**
- * Gets the current repository name.
+ * This method returns the registry's repository on which operations are being performed.
*
- * @return The repository name.
+ * @return The name of the repository
*/
public String getRepositoryName() {
return repositoryName;
}
/**
- * Gets the Azure Container Registry service endpoint.
+ * This method returns the complete registry endpoint.
*
- * @return The service endpoint.
+ * @return The registry endpoint including the authority.
*/
public String getEndpoint() {
return endpoint;
@@ -138,7 +109,7 @@ public String getEndpoint() {
/**
* Upload the OCI manifest to the repository.
*
- * Upload an OCI manifest
+ * Code Samples:
*
*
*
@@ -151,7 +122,7 @@ public String getEndpoint() {
* @param manifest The {@link OciImageManifest} that needs to be updated.
* @param tag Tag to apply on uploaded manifest. If {@code null} is passed, no tags will be applied.
* @return upload result.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code manifest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -164,7 +135,7 @@ public SetManifestResult setManifest(OciImageManifest manifest, String tag) {
/**
* Uploads a manifest to the repository.
*
- * Upload a manifest
+ * Code Samples:
*
*
*
@@ -178,7 +149,7 @@ public SetManifestResult setManifest(OciImageManifest manifest, String tag) {
* @param options The options for the upload manifest operation.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The rest response containing the upload result.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -191,7 +162,7 @@ public Response setManifestWithResponse(SetManifestOptions op
/**
* Uploads a blob to the repository in chunks of 4MB.
*
- * Upload a blob from {@link BinaryData content}
+ * Code Samples
*
*
*
@@ -202,8 +173,6 @@ public Response setManifestWithResponse(SetManifestOptions op
*
*
*
- * Error handling
- *
*
*
* BinaryData configContent = BinaryData.fromObject(Collections.singletonMap("hello", "world"));
@@ -227,7 +196,7 @@ public Response setManifestWithResponse(SetManifestOptions op
*
* @param content The blob content. The content may be loaded into memory depending on how {@link BinaryData} is created.
* @return The upload response.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code data} is {@code null}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -238,7 +207,7 @@ public UploadRegistryBlobResult uploadBlob(BinaryData content) {
/**
* Uploads a blob to the repository in chunks of 4MB.
*
- * Upload blob from file
+ * Code Samples
*
*
*
@@ -252,7 +221,7 @@ public UploadRegistryBlobResult uploadBlob(BinaryData content) {
* @param content The blob content.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The upload response.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code stream} is {@code null}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -274,7 +243,9 @@ public UploadRegistryBlobResult uploadBlob(BinaryData content, Context context)
/**
* Download the manifest identified by the given tag or digest.
*
- * Download manifest by tag
+ * Code Samples:
+ *
+ * Download manifest with tag:
*
*
*
@@ -288,7 +259,7 @@ public UploadRegistryBlobResult uploadBlob(BinaryData content, Context context)
*
*
*
- * Download manifest by digest
+ * Download manifest with digest:
*
*
*
@@ -299,7 +270,7 @@ public UploadRegistryBlobResult uploadBlob(BinaryData content, Context context)
*
* @param tagOrDigest Manifest tag or digest.
* @return The manifest identified by the given tag or digest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -310,7 +281,7 @@ public GetManifestResult getManifest(String tagOrDigest) {
/**
* Download the manifest of custom type identified by the given tag or digest.
*
- * Download manifest
+ * Code Samples:
*
*
*
@@ -324,7 +295,7 @@ public GetManifestResult getManifest(String tagOrDigest) {
* @param tagOrDigest Manifest reference which can be tag or digest.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The response for the manifest identified by the given tag or digest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code tagOrDigest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -341,9 +312,9 @@ public Response getManifestWithResponse(String tagOrDigest, C
}
/**
- * Download the blob identified by the given digest.
+ * Download the blob identified by the given digest.
*
- * Download blob
+ * Code Samples:
*
*
*
@@ -355,7 +326,7 @@ public Response getManifestWithResponse(String tagOrDigest, C
*
* @param digest The digest for the given image layer.
* @param channel The channel to write content to.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
* @throws ServiceResponseException thrown if content hash does not match requested digest.
*/
@@ -371,7 +342,7 @@ public void downloadStream(String digest, WritableByteChannel channel) {
* @param channel The channel to write content to.
* @param context Additional context that is passed through the Http pipeline during the service call.
*
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
* @throws ServiceResponseException thrown if content hash does not match requested digest.
*/
@@ -381,9 +352,9 @@ public void downloadStream(String digest, WritableByteChannel channel, Context c
}
/**
- * Delete the blob identified by the given digest
+ * Delete the image identified by the given digest
*
- * Delete blob
+ * Code Samples:
*
*
*
@@ -397,7 +368,7 @@ public void downloadStream(String digest, WritableByteChannel channel, Context c
*
*
* @param digest The digest for the given image layer.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -406,12 +377,12 @@ public void deleteBlob(String digest) {
}
/**
- * Delete the blob identified by the given digest
+ * Delete the image identified by the given digest
*
- * @param digest The digest for the given blob.
+ * @param digest The digest for the given image layer.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The REST response for the completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -435,7 +406,7 @@ public Response deleteBlobWithResponse(String digest, Context context) {
/**
* Delete the manifest identified by the given digest.
*
- * Delete manifest
+ * Code Samples:
*
*
*
@@ -445,7 +416,7 @@ public Response deleteBlobWithResponse(String digest, Context context) {
*
*
* @param digest The digest of the manifest.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -459,7 +430,7 @@ public void deleteManifest(String digest) {
* @param digest The digest of the manifest.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return The REST response for completion.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws NullPointerException thrown if the {@code digest} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
index eeeddb3c95f7..695100365747 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRegistryContentClientBuilder.java
@@ -24,7 +24,8 @@
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.tracing.Tracer;
-import java.net.URI;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@@ -32,56 +33,21 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.createTracer;
/**
- * Fluent builder for instantiating a {@link ContainerRegistryContentClient} and {@link ContainerRegistryContentAsyncClient}. which are used to
- * upload, download, or delete images and artifacts in Azure Container Registry.
+ * This class provides a fluent builder API to help aid the configuration and instantiation of {@link
+ * ContainerRegistryContentClient ContainerRegistryContentClients} and {@link ContainerRegistryContentAsyncClient ContainerRegistryContentAsyncClients}, call {@link
+ * #buildClient() buildClient} and {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of
+ * the desired client.
*
- * The client needs the service endpoint of the Azure Container Registry, access credential, and the repository name.
+ * Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an
+ * authenticated way to communicate with the service but it doesn't contain the service endpoint. Set the pipeline with
+ * {@link #pipeline(HttpPipeline) this} and set the service endpoint with {@link #endpoint(String) this}. Using a
+ * pipeline requires additional setup but allows for finer control on how the {@link ContainerRegistryContentClient} and {@link
+ * ContainerRegistryContentAsyncClient} is built.
+ * The service does not directly support AAD credentials and as a result the clients internally depend on a policy that converts
+ * the AAD credentials to the Azure Container Registry specific service credentials. In case you use your own pipeline, you
+ * would need to provide implementation for this policy as well.
+ * For more information please see Azure Container Registry Authentication .
*
- * Instantiating an asynchronous Container Registry Content client
- *
- *
- *
- *
- * DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- * ContainerRegistryContentAsyncClient contentClient = new ContainerRegistryContentClientBuilder()
- * .endpoint(endpoint)
- * .credential(credential)
- * .repositoryName(repository)
- * .buildAsyncClient();
- *
- *
- *
- * Instantiating a synchronous Container Registry Content client
- *
- *
- *
- *
- * DefaultAzureCredential credential = new DefaultAzureCredentialBuilder().build();
- * ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
- * .endpoint(endpoint)
- * .credential(credential)
- * .repositoryName(repository)
- * .buildClient();
- *
- *
- *
- * Azure Container Registry could be configured for anonymous access
- * allowing to pull artifacts without authentication.
- *
- * Instantiating a synchronous Container Registry Content client without credential
- *
- *
- *
- *
- * ContainerRegistryContentClient contentClient = new ContainerRegistryContentClientBuilder()
- * .endpoint(endpoint)
- * .repositoryName(repository)
- * .buildClient();
- *
- *
- *
- * @see ContainerRegistryContentAsyncClient
- * @see ContainerRegistryContentClient
*/
@ServiceClientBuilder(
serviceClients = { ContainerRegistryContentAsyncClient.class, ContainerRegistryContentClient.class })
@@ -105,12 +71,6 @@ public final class ContainerRegistryContentClientBuilder implements
private ContainerRegistryAudience audience;
private String repositoryName;
- /**
- * Creates a new instance of {@link ContainerRegistryContentClientBuilder}
- */
- public ContainerRegistryContentClientBuilder() {
- }
-
/**
* Sets the service endpoint for the Azure Container Registry instance.
*
@@ -121,12 +81,12 @@ public ContainerRegistryContentClientBuilder() {
@Override
public ContainerRegistryContentClientBuilder endpoint(String endpoint) {
try {
- URI url = URI.create(endpoint);
- this.endpoint = url.toASCIIString();
- } catch (IllegalArgumentException ex) {
- throw LOGGER.logExceptionAsWarning(ex);
+ new URL(endpoint);
+ } catch (MalformedURLException ex) {
+ throw LOGGER.logExceptionAsWarning(new IllegalArgumentException("'endpoint' must be a valid URL", ex));
}
+ this.endpoint = endpoint;
return this;
}
@@ -380,8 +340,9 @@ public ContainerRegistryContentAsyncClient buildAsyncClient() {
Tracer tracer = createTracer(clientOptions);
HttpPipeline pipeline = getHttpPipeline(tracer);
- return new ContainerRegistryContentAsyncClient(repositoryName, pipeline, endpoint, serviceVersion.getVersion(),
- tracer);
+ ContainerRegistryContentAsyncClient client = new ContainerRegistryContentAsyncClient(repositoryName, pipeline,
+ endpoint, serviceVersion.getVersion(), tracer);
+ return client;
}
/**
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepository.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepository.java
index f9cfe532ac72..91d19ac69318 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepository.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepository.java
@@ -33,11 +33,11 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
/**
- * This class provides a client that works with a specific repository in Azure Container Registry.
- * It allows to get and update repository properties and delete repository.
+ * This class provides a helper type that contains all the operations for repositories in Azure Container Registry.
+ * Operations allowed by this type are listing, retrieving, deleting, setting writeable properties. These operations are
+ * supported on the repository and the respective tags and manifests in it.
*
- * Instantiating {@link ContainerRepository}
- *
+ * Instantiating Container Repository helper type.
*
*
*
@@ -48,10 +48,9 @@
*
*
*
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
+ * View {@link ContainerRegistryClientBuilder this} for additional ways to construct the client.
*
* @see ContainerRegistryClientBuilder
- * @see ContainerRegistryClient
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class)
public final class ContainerRepository {
@@ -94,27 +93,29 @@ public final class ContainerRepository {
}
/**
- * Gets the current repository name.
+ * Gets the Azure Container Registry service endpoint for the current instance.
*
- * @return The repository name.
+ * @return The service endpoint for the current instance.
*/
public String getName() {
return this.repositoryName;
}
/**
- * Gets the Azure Container Registry service endpoint.
+ * Gets the Azure Container Registry name for the current instance.
*
- * @return The service endpoint.
+ * @return Return the registry name.
*/
public String getRegistryEndpoint() {
return this.endpoint;
}
/**
- * Delete the current repository.
+ * Delete the repository in the Azure Container Registry for the given {@link #getName() repository}.
*
- * Delete the repository
+ * Code Samples
+ *
+ * Delete the repository.
*
*
*
@@ -126,7 +127,7 @@ public String getRegistryEndpoint() {
* @param context Additional context that is passed through the Http pipeline during the service call. artifacts
* that are deleted as part of the repository delete.
* @return A void response for completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -141,9 +142,11 @@ public Response deleteWithResponse(Context context) {
}
/**
- * Delete the current repository.
+ * Delete the repository in the Azure Container Registry for the given {@link #getName() repository}.
+ *
+ * Code Samples
*
- * Delete the repository
+ * Delete the repository.
*
*
*
@@ -152,7 +155,7 @@ public Response deleteWithResponse(Context context) {
*
*
*
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -161,9 +164,12 @@ public void delete() {
}
/**
- * Gets the {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * Gets the {@link ContainerRepositoryProperties properties} associated with the given {@link #getName()
+ * repository}.
+ *
+ * Code Samples
*
- * Get the properties for the current repository
+ * Get the properties for the given repository.
*
*
*
@@ -176,7 +182,7 @@ public void delete() {
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A REST response with the {@link ContainerRepositoryProperties properties} associated with the given
* {@link #getName() repository}.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to modify the namespace.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -190,9 +196,12 @@ public Response getPropertiesWithResponse(Context
}
/**
- * Gets the {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * Gets the {@link ContainerRepositoryProperties properties} associated with the given {@link #getName()
+ * repository}.
+ *
+ * Code Samples
*
- * Get the properties for the current repository
+ * Get the properties for the given repository.
*
*
*
@@ -203,7 +212,7 @@ public Response getPropertiesWithResponse(Context
*
* @return The {@link ContainerRepositoryProperties properties} associated with the given {@link #getName()
* repository}.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to modify the namespace.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -225,14 +234,17 @@ public RegistryArtifact getArtifact(String tagOrDigest) {
}
/**
- * Fetches all manifest properties associated with artifacts in the current repository.
+ * Fetches all the artifacts associated with the given {@link #getName() repository}.
*
- * If you would like to specify the order in which the properties are returned please
- * use the overload that takes in the options parameter {@link #listManifestProperties(ArtifactManifestOrder)} listManifestProperties}
- * No assumptions on the order can be made if no options are provided to the service.
+ *
If you would like to specify the order in which the tags are returned please
+ * use the overload that takes in the options parameter {@link #listManifestProperties(ArtifactManifestOrder,
+ * Context)} listManifestProperties} No assumptions on the order can be made if no options are provided to the
+ * service.
*
*
- * Retrieve all manifest properties associated with the current repository
+ * Code Samples
+ *
+ * Retrieve all artifacts associated with the given repository.
*
*
*
@@ -245,7 +257,8 @@ public RegistryArtifact getArtifact(String tagOrDigest) {
*
*
* @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the
+ * namespace.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -254,13 +267,16 @@ public PagedIterable listManifestProperties() {
}
/**
- * Fetches all manifest properties associated with artifacts in the current repository.
+ * Fetches all the artifacts associated with the given {@link #getName() repository }.
*
- * The method supports options to select the order in which the manifest properties are returned by the service.
- * Currently the service supports an ascending or descending order based on the last updated time for the artifacts.
- * No assumptions on the order can be made if no options are provided to the service.
+ * The method supports options to select the order in which the artifacts are returned by the service.
+ * Currently the service supports an ascending or descending order for the last updated time for the artifacts. No
+ * assumptions on the order can be made if no options are provided by the service.
+ *
+ *
+ * Code Samples
*
- * List all artifacts within current repository ordered by update time
+ * Retrieve all artifacts associated with the given repository from the most recently updated to the last.
*
*
*
@@ -274,7 +290,8 @@ public PagedIterable listManifestProperties() {
*
* @param order the order in which the artifacts are returned by the service.
* @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the
+ * namespace.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -283,13 +300,16 @@ public PagedIterable listManifestProperties(Artifact
}
/**
- * Fetches all manifest properties associated with artifacts in the current repository.
+ * Fetches all the artifacts associated with the given {@link #getName() repository }.
+ *
+ * The method supports options to select the order in which the artifacts are returned by the service.
+ * Currently the service supports an ascending or descending order for the last updated time for the artifacts. No
+ * assumptions on the order can be made if no options are provided by the service.
+ *
*
- * The method supports options to select the order in which the manifest properties are returned by the service.
- * Currently the service supports an ascending or descending order based on the last updated time for the artifacts.
- * No assumptions on the order can be made if no options are provided to the service.
+ * Code Samples
*
- * List all artifacts within current repository ordered by update time
+ * Retrieve all artifacts associated with the given repository from the most recently updated to the last.
*
*
*
@@ -304,7 +324,8 @@ public PagedIterable listManifestProperties(Artifact
* @param order the order in which the artifacts are returned by the service.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the
+ * namespace.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -316,7 +337,7 @@ public PagedIterable listManifestProperties(Artifact
private PagedIterable listManifestPropertiesSync(ArtifactManifestOrder order,
Context context) {
return new PagedIterable<>((pageSize) -> listManifestPropertiesSinglePageSync(pageSize, order, context),
- (token, ignored) -> listManifestPropertiesNextSinglePageSync(token, context));
+ (token, pageSize) -> listManifestPropertiesNextSinglePageSync(token, context));
}
private PagedResponse listManifestPropertiesSinglePageSync(Integer pageSize,
@@ -350,10 +371,12 @@ private PagedResponse listManifestPropertiesNextSing
}
/**
- * Update the repository properties {@link ContainerRepositoryProperties} of the current repository.
+ * Update the settable properties {@link ContainerRepositoryProperties} of the given {@link #getName() repository}.
* These properties set the update, delete and retrieve options of the repository.
*
- * Update the writeable properties for the current repository
+ * Code Samples
+ *
+ * Update the writeable properties for the given repository.
*
*
*
@@ -366,7 +389,7 @@ private PagedResponse listManifestPropertiesNextSing
* for the repository.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A REST response with the completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code repositoryProperties} is null.
@@ -378,10 +401,12 @@ private PagedResponse listManifestPropertiesNextSing
}
/**
- * Update the repository properties {@link ContainerRepositoryProperties} of the current repository.
- * These properties set the update, delete and retrieve options of the repository.
+ * Update the repository properties {@link ContainerRepositoryProperties} of the given {@link #getName()
+ * repository}. These properties set the update, delete and retrieve options of the repository.
+ *
+ * Code Samples
*
- * Update the writeable properties for the current repository
+ * Update the writeable properties for the given repository.
*
*
*
@@ -393,7 +418,7 @@ private PagedResponse listManifestPropertiesNextSing
* @param repositoryProperties {@link ContainerRepositoryProperties repository properties} that need to be updated
* for the repository.
* @return The updated {@link ContainerRepositoryProperties properties }
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code repositoryProperties} is null.
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepositoryAsync.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepositoryAsync.java
index 259db4acda0b..a4d3171c13b4 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepositoryAsync.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/ContainerRepositoryAsync.java
@@ -30,15 +30,15 @@
import java.net.URL;
import java.util.Objects;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
import static com.azure.core.util.FluxUtil.monoError;
import static com.azure.core.util.FluxUtil.withContext;
/**
- * This class provides a client that works with a specific repository in Azure Container Registry.
- * It allows to get and update repository properties and delete repository.
+ * This class provides helper methods for operations on a given repository in Azure Container Registry.
+ * Operations included are listing, retrieving, deleting, setting writeable properties.
*
- * Instantiating an asynchronous {@link ContainerRepositoryAsync}
- *
+ * Instantiating an asynchronous Container Repository Helper class
*
*
*
@@ -50,10 +50,6 @@
*
*
*
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
- *
- * @see ContainerRegistryClientBuilder
- * @see ContainerRegistryAsyncClient
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class, isAsync = true)
public final class ContainerRepositoryAsync {
@@ -66,7 +62,7 @@ public final class ContainerRepositoryAsync {
private final String registryLoginServer;
/**
- * Creates a ContainerRepositoryAsyncClient that sends requests to the current repository in the container registry service at {@code endpoint}.
+ * Creates a ContainerRepositoryAsyncClient that sends requests to the given repository in the container registry service at {@code endpoint}.
* Each service call goes through the {@code pipeline}.
* @param repositoryName The name of the repository on which the service operations are performed.
* @param endpoint The URL string for the Azure Container Registry service.
@@ -95,27 +91,27 @@ public final class ContainerRepositoryAsync {
}
/**
- * Gets the current repository name.
- *
- * @return The repository name.
+ * Gets the Azure Container Registry service endpoint for the current instance.
+ * @return The service endpoint for the current instance.
*/
public String getName() {
return this.repositoryName;
}
/**
- * Gets the Azure Container Registry service endpoint.
- *
- * @return The service endpoint.
+ * Gets the Azure Container Registry name for the current instance.
+ * @return Return the registry name.
*/
public String getRegistryEndpoint() {
return this.endpoint;
}
/**
- * Delete the current repository.
+ * Delete the repository in the Azure Container Registry for the given {@link #getName() repository}.
*
- * Delete the repository
+ * Code Samples
+ *
+ * Delete the repository.
*
*
*
@@ -134,7 +130,7 @@ public String getRegistryEndpoint() {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> deleteWithResponse() {
- return withContext(this::deleteWithResponse);
+ return withContext(context -> deleteWithResponse(context));
}
private Mono> deleteWithResponse(Context context) {
@@ -144,9 +140,11 @@ private Mono> deleteWithResponse(Context context) {
}
/**
- * Delete the current repository.
+ * Delete the repository in the Azure Container Registry for the given {@link #getName() repository}.
+ *
+ * Code Samples
*
- * Delete the repository
+ * Delete the repository.
*
*
*
@@ -180,14 +178,16 @@ public RegistryArtifactAsync getArtifact(String tagOrDigest) {
}
/**
- * Fetches all manifest properties associated with artifacts in the current repository.
+ * Fetches all the artifacts associated with the given {@link #getName() repository}.
*
- * If you would like to specify the order in which the properties are returned please
+ *
If you would like to specify the order in which the tags are returned please
* use the overload that takes in the options parameter {@link #listManifestProperties(ArtifactManifestOrder)} listManifestProperties}
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * Retrieve all manifest properties associated with the current repository
+ * Code Samples
+ *
+ * Retrieve all artifacts associated with the given repository.
*
*
*
@@ -199,7 +199,7 @@ public RegistryArtifactAsync getArtifact(String tagOrDigest) {
*
*
*
- * @return {@link PagedFlux} of ManifestProperties for all the artifacts in the current repository.
+ * @return {@link PagedFlux} of ManifestProperties for all the artifacts in the given repository.
* @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -209,13 +209,15 @@ public PagedFlux listManifestProperties() {
}
/**
- * Fetches all manifest properties associated with artifacts in the current repository.
+ * Fetches all the artifacts associated with the given {@link #getName() repository}.
*
- * The method supports options to select the order in which the manifest properties are returned by the service.
+ *
The method supports options to select the order in which the artifacts are returned by the service.
* Currently the service supports an ascending or descending order based on the last updated time for the artifacts.
* No assumptions on the order can be made if no options are provided to the service.
*
- * List all artifacts within current repository ordered by update time
+ * Code Samples
+ *
+ * Retrieve all artifacts associated with the given repository from the most recently updated to the last.
*
*
*
@@ -228,7 +230,7 @@ public PagedFlux listManifestProperties() {
*
*
* @param order The order in which the artifacts are returned by the service.
- * @return {@link PagedFlux} of the artifacts for the current repository in the order specified by the options.
+ * @return {@link PagedFlux} of the artifacts for the given repository in the order specified by the options.
* @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -236,7 +238,7 @@ public PagedFlux listManifestProperties() {
public PagedFlux listManifestProperties(ArtifactManifestOrder order) {
return new PagedFlux<>(
(pageSize) -> withContext(context -> listManifestPropertiesSinglePageAsync(pageSize, order, context)),
- (token, ignored) -> withContext(context -> listManifestPropertiesNextSinglePageAsync(token, context)));
+ (token, pageSize) -> withContext(context -> listManifestPropertiesNextSinglePageAsync(token, context)));
}
private Mono> listManifestPropertiesSinglePageAsync(Integer pageSize,
@@ -261,9 +263,11 @@ private Mono> listManifestPropertiesNe
}
/**
- * Gets the {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * Gets the {@link ContainerRepositoryProperties properties} associated with the given {@link #getName() repository}.
+ *
+ * Code Samples
*
- * Get the properties for the current repository
+ * Get the properties for the given repository.
*
*
*
@@ -274,14 +278,14 @@ private Mono> listManifestPropertiesNe
*
*
*
- * @return A REST response with the {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * @return A REST response with the {@link ContainerRepositoryProperties properties} associated with the given {@link #getName() repository}.
* @throws ClientAuthenticationException thrown if the client have access to the repository.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getPropertiesWithResponse() {
- return withContext(this::getPropertiesWithResponse);
+ return withContext(context -> this.getPropertiesWithResponse(context));
}
private Mono> getPropertiesWithResponse(Context context) {
@@ -290,9 +294,11 @@ private Mono> getPropertiesWithResponse(
}
/**
- * Gets the {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * Gets the {@link ContainerRepositoryProperties properties} associated with the given {@link #getName() repository}.
+ *
+ * Code Samples
*
- * Get the properties for the current repository
+ * Get the properties for the given repository.
*
*
*
@@ -302,7 +308,7 @@ private Mono> getPropertiesWithResponse(
*
*
*
- * @return The {@link ContainerRepositoryProperties properties} associated with the current repository.
+ * @return The {@link ContainerRepositoryProperties properties} associated with the given {@link #getName() repository}.
* @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the repository with the given name was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
@@ -313,10 +319,12 @@ public Mono getProperties() {
}
/**
- * Update the repository properties {@link ContainerRepositoryProperties} of the current repository.
+ * Update the repository properties {@link ContainerRepositoryProperties} of the given {@link #getName() repository}.
* These properties set the update, delete and retrieve options of the repository.
*
- * Update the writeable properties for the current repository
+ * Code Samples
+ *
+ * Update the writeable properties for the given repository.
*
*
*
@@ -356,10 +364,12 @@ public Mono getProperties() {
}
/**
- * Update the repository properties {@link ContainerRepositoryProperties} of the current repository.
+ * Update the repository properties {@link ContainerRepositoryProperties} of the given {@link #getName() repository}.
* These properties set the update, delete and retrieve options of the repository.
*
- * Update the writeable properties for the current repository
+ * Code Samples
+ *
+ * Update the writeable properties for the given repository.
*
*
*
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifact.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifact.java
index ba133a21db09..389b4a4254f4 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifact.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifact.java
@@ -38,11 +38,9 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
/**
- * This class provides a client that works with a specific artifact.
- * It allows to get and update manifest and tag properties, delete tags and the artifact
+ * This class provides a helper type that contains all the operations for artifacts in a given repository.
*
- * Instantiating Registry Artifact
- *
+ * Instantiating Registry Artifact
*
*
*
@@ -52,11 +50,6 @@
* .buildClient().getArtifact(repository, digest);
*
*
- *
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
- *
- * @see ContainerRegistryClientBuilder
- * @see ContainerRegistryClient
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class)
public final class RegistryArtifact {
@@ -97,9 +90,11 @@ public final class RegistryArtifact {
}
/**
- * Deletes the current registry artifact.
+ * Deletes the registry artifact with the digest and repository associated with the instance.
+ *
+ * Code Samples
*
- * Delete the registry artifact
+ * Delete the registry artifact.
*
*
*
@@ -109,7 +104,7 @@ public final class RegistryArtifact {
*
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A REST response containing the result of the service call.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -132,9 +127,11 @@ private String getDigest() {
}
/**
- * Deletes the current registry artifact.
+ * Deletes the registry artifact with the digest and repository associated with the instance.
*
- * Delete the registry artifact
+ * Code Samples
+ *
+ * Delete the registry artifact.
*
*
*
@@ -142,7 +139,7 @@ private String getDigest() {
*
*
*
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to modify the namespace.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -151,9 +148,11 @@ public void delete() {
}
/**
- * Deletes the tag with the matching name on the current artifact.
+ * Deletes the tag with the matching tag name for the given {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Delete the tag
+ * Delete the tag for the given repository.
*
*
*
@@ -165,7 +164,7 @@ public void delete() {
* @param tag The name of the tag that needs to be deleted.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A REST response containing the result of the service call.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to modify the namespace.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException thrown if {@code tag} is empty.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
@@ -186,9 +185,11 @@ public Response deleteTagWithResponse(String tag, Context context) {
}
/**
- * Deletes the tag with the matching name on the current artifact.
+ * Deletes the tag with the matching tag name for the given {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Delete the tag on the current artifact
+ * Delete the tag for the given repository.
*
*
*
@@ -198,7 +199,7 @@ public Response deleteTagWithResponse(String tag, Context context) {
*
*
* @param tag The name of the tag that needs to be deleted.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to modify the namespace.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException throws if {@code tag} is empty.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
@@ -209,9 +210,14 @@ public void deleteTag(String tag) {
}
/**
- * Gets the {@link ArtifactManifestProperties properties} associated with the current artifact.
+ * Gets the {@link ArtifactManifestProperties properties} associated with an artifact in given {@link #getRepositoryName() repository}.
*
- * Get manifest properties
+ * This method can take in both a digest as well as a tag.
+ * In case a tag is provided it calls the service to get the digest associated with the given tag.
+ *
+ * Code Samples
+ *
+ * Get the properties for the given repository.
*
*
*
@@ -223,8 +229,8 @@ public void deleteTag(String tag) {
*
*
* @param context Additional context that is passed through the Http pipeline during the service call.
- * @return A REST response containing {@link ArtifactManifestProperties properties} associated with the current artifact.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @return A REST response containing {@link ArtifactManifestProperties properties} associated with the given {@code Digest}.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -243,9 +249,14 @@ public Response getManifestPropertiesWithResponse(Co
}
/**
- * Gets the {@link ArtifactManifestProperties properties} associated with the current artifact.
+ * Gets the {@link ArtifactManifestProperties properties} associated with an artifact in given {@link #getRepositoryName() repository}.
+ *
+ * This method can take in both a digest as well as a tag.
+ * In case a tag is provided it calls the service to get the digest associated with the given tag.
*
- * Get manifest properties
+ * Code Samples
+ *
+ * Get the registry artifact properties for a given tag or digest.
*
*
*
@@ -254,8 +265,8 @@ public Response getManifestPropertiesWithResponse(Co
*
*
*
- * @return The {@link ArtifactManifestProperties properties} associated with the current artifact.
- * @throws ClientAuthenticationException thrown if the client's credentials do not have access to perform this operation.
+ * @return The {@link ArtifactManifestProperties properties} associated with the given {@code Digest}.
+ * @throws ClientAuthenticationException thrown if the client's credentials do not have access to modify the namespace.
* @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@@ -265,9 +276,11 @@ public ArtifactManifestProperties getManifestProperties() {
}
/**
- * Gets the tag properties associated with a given tag on the current artifact.
+ * Gets the tag properties associated with a given tag in the {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Retrieve the properties associated with the given tag
+ * Retrieve the properties associated with the given tag.
*
*
*
@@ -281,7 +294,7 @@ public ArtifactManifestProperties getManifestProperties() {
* @param tag name of the tag.
* @param context Additional context that is passed through the Http pipeline during the service call.
* @return A REST response with the {@link ArtifactTagProperties properties} associated with the given tag.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException throws if {@code tag} is empty.
@@ -306,9 +319,11 @@ public Response getTagPropertiesWithResponse(String tag,
}
/**
- * Gets the tag properties associated with a given tag on the current artifact.
+ * Gets the tag properties associated with a given tag in the {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Retrieve the properties associated with the given tag
+ * Retrieve the properties associated with the given tag.
*
*
*
@@ -320,7 +335,7 @@ public Response getTagPropertiesWithResponse(String tag,
*
* @param tag name of the tag.
* @return The {@link ArtifactTagProperties properties} associated with the given tag.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException throws if {@code tag} is empty.
@@ -332,14 +347,16 @@ public ArtifactTagProperties getTagProperties(String tag) {
}
/**
- * Fetches all the tags associated with the current artifact.
+ * Fetches all the tags associated with the given {@link #getRepositoryName() repository}.
*
* If you would like to specify the order in which the tags are returned please
- * use the overload that takes in the options parameter {@link #listTagProperties(ArtifactTagOrder)}
+ * use the overload that takes in the options parameter {@link #listTagProperties(ArtifactTagOrder, Context)} listTagProperties}
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * Retrieve all the tags associated with the current artifact
+ * Code Samples
+ *
+ * Retrieve all the tags associated with the given repository.
*
*
*
@@ -350,8 +367,8 @@ public ArtifactTagProperties getTagProperties(String tag) {
*
*
*
- * @return {@link PagedIterable} of the tag properties for the current artifact in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -360,14 +377,16 @@ public PagedIterable listTagProperties() {
}
/**
- * Fetches all the tags associated with the current artifact.
+ * Fetches all the tags associated with the given {@link #getRepositoryName() repository}.
*
* The method supports options to select the order in which the tags are returned by the service.
* Currently the service supports an ascending or descending order based on the last updated time of the tag.
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * List all tags associated with the current artifact ordered by update time
+ * Code Samples
+ *
+ * Retrieve all the tags associated with the given repository from the most recently updated to the last.
*
*
*
@@ -382,8 +401,8 @@ public PagedIterable listTagProperties() {
*
*
* @param order The order in which the tags should be returned by the service.
- * @return {@link PagedIterable} of the tags for the current artifact in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -392,14 +411,16 @@ public PagedIterable listTagProperties(ArtifactTagOrder o
}
/**
- * Fetches all the tags associated with the current artifact.
+ * Fetches all the tags associated with the given {@link #getRepositoryName() repository}.
*
* The method supports options to select the order in which the tags are returned by the service.
* Currently the service supports an ascending or descending order based on the last updated time of the tag.
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * List all tags associated with the current artifact ordered by update time
+ * Code Samples
+ *
+ * Retrieve all the tags associated with the given repository from the most recently updated to the last.
*
*
*
@@ -415,8 +436,8 @@ public PagedIterable listTagProperties(ArtifactTagOrder o
*
* @param order The order in which the tags should be returned by the service.
* @param context Additional context that is passed through the Http pipeline during the service call.
- * @return {@link PagedIterable} of the tags for the current artifacts in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @return {@link PagedIterable} of the artifacts for the given repository in the order specified by the options.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -436,10 +457,12 @@ private PagedResponse listTagPropertiesNextSinglePageSync
}
/**
- * Update the properties {@link ArtifactTagProperties} of the tag with the given name {@code tag}.
+ * Update the properties {@link ArtifactTagProperties} of the given tag in {@link #getRepositoryName() repository}.
* These properties set whether the given tag can be updated, deleted and retrieved.
*
- * Update writeable tag properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given tag.
*
*
*
@@ -487,10 +510,12 @@ public Response updateTagPropertiesWithResponse(String ta
}
/**
- * Update the properties {@link ArtifactTagProperties} of the tag with the given name {@code tag}.
+ * Update the properties {@link ArtifactTagProperties} of the given {@code tag}.
* These properties set whether the given tag can be updated, deleted and retrieved.
*
- * Update writable tag properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given tag.
*
*
*
@@ -515,10 +540,12 @@ public ArtifactTagProperties updateTagProperties(String tag, ArtifactTagProperti
}
/**
- * Update the properties {@link ArtifactTagProperties} of the tag with the given {@code tag}.
- * These properties set whether the given tag can be updated, deleted and retrieved.
+ * Update the properties {@link ArtifactTagProperties} of the artifact with the given {@code digest}.
+ * These properties set whether the given manifest can be updated, deleted and retrieved.
+ *
+ * Code Samples
*
- * Update writable tag properties
+ * Update the writeable properties of a given artifact.
*
*
*
@@ -532,7 +559,7 @@ public ArtifactTagProperties updateTagProperties(String tag, ArtifactTagProperti
* @return A REST response for the completion.
* @throws ClientAuthenticationException thrown if the client does not have access to repository.
* @throws NullPointerException thrown if the {@code manifestProperties} is null.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @throws ResourceNotFoundException thrown if the given {@code digest} was not found.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response
@@ -558,10 +585,12 @@ public ArtifactTagProperties updateTagProperties(String tag, ArtifactTagProperti
}
/**
- * Update the properties {@link ArtifactManifestProperties} of the current artifact.
+ * Update the writeable properties {@link ArtifactTagProperties} of the artifact with the given {@code digest}.
* These properties set whether the given manifest can be updated, deleted and retrieved.
*
- * >Update writeable manifest properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given manifest.
*
*
*
@@ -573,7 +602,7 @@ public ArtifactTagProperties updateTagProperties(String tag, ArtifactTagProperti
* @param manifestProperties {@link ArtifactManifestProperties manifestProperties} to be set.
* @return The updated {@link ArtifactManifestProperties properties }
* @throws ClientAuthenticationException thrown if the client does not have access to repository.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @throws ResourceNotFoundException thrown if the given {@code digest} was not found.
* @throws NullPointerException thrown if the {@code manifestProperties} is null.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -582,18 +611,18 @@ public ArtifactManifestProperties updateManifestProperties(ArtifactManifestPrope
}
/**
- * Gets the Azure Container Registry service endpoint.
- *
- * @return The service endpoint.
+ * Gets the Azure Container Registry service endpoint for the current instance.
+ * @return The service endpoint for the current instance.
*/
public String getRegistryEndpoint() {
return endpoint;
}
/**
- * Gets the fully qualified reference for the current instance
- * following the 'registryName/repositoryName@digest' or 'registryName/repositoryName:tag' format.
- *
+ * Gets the fully qualified reference for the current instance.
+ * The fully qualifiedName is of the form 'registryName/repositoryName@digest'
+ * or 'registryName/repositoryName:tag' based on the docker naming convention and whether
+ * tag or digest was supplied to the constructor.
* @return Fully qualified reference of the current instance.
* */
public String getFullyQualifiedReference() {
@@ -601,9 +630,9 @@ public String getFullyQualifiedReference() {
}
/**
- * Gets the repository name.
- *
- * @return Name of the current repository.
+ * Gets the repository name for the current instance.
+ * Gets the repository name for the current instance.
+ * @return Name of the repository for the current instance.
* */
public String getRepositoryName() {
return repositoryName;
@@ -611,7 +640,7 @@ public String getRepositoryName() {
private PagedIterable listTagPropertiesSync(ArtifactTagOrder order, Context context) {
return new PagedIterable<>((pageSize) -> listTagPropertiesSinglePageSync(pageSize, order, context),
- (token, ignored) -> listTagPropertiesNextSinglePageSync(token, context));
+ (token, pageSize) -> listTagPropertiesNextSinglePageSync(token, context));
}
private PagedResponse listTagPropertiesSinglePageSync(Integer pageSize,
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifactAsync.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifactAsync.java
index 3e067ec20075..cad6b5cf28ff 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifactAsync.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/RegistryArtifactAsync.java
@@ -34,15 +34,14 @@
import static com.azure.containers.containerregistry.implementation.UtilsImpl.formatFullyQualifiedReference;
import static com.azure.containers.containerregistry.implementation.UtilsImpl.isDigest;
+import static com.azure.containers.containerregistry.implementation.UtilsImpl.mapAcrErrorsException;
import static com.azure.core.util.FluxUtil.monoError;
import static com.azure.core.util.FluxUtil.withContext;
/**
- * This class provides a client that works with a specific artifact.
- * It allows to get and update manifest and tag properties, delete tags and the artifact
+ * This class provides a helper type that contains all the operations for artifacts in a given repository.
*
- * Instantiating an asynchronous {@link RegistryArtifactAsync}
- *
+ * Instantiating an asynchronous RegistryArtifact helper.
*
*
*
@@ -53,10 +52,9 @@
*
*
*
- * View {@link ContainerRegistryClientBuilder} for additional ways to construct the client.
+ * View {@link ContainerRegistryClientBuilder this} for additional ways to construct the client.
*
* @see ContainerRegistryClientBuilder
- * @see ContainerRegistryAsyncClient
*/
@ServiceClient(builder = ContainerRegistryClientBuilder.class, isAsync = true)
public final class RegistryArtifactAsync {
@@ -68,7 +66,7 @@ public final class RegistryArtifactAsync {
private final Mono digestMono;
/**
- * Creates a RegistryArtifactAsync that sends requests to the current repository in the container registry service at {@code endpoint}.
+ * Creates a RegistryArtifactAsync type that sends requests to the given repository in the container registry service at {@code endpoint}.
* Each service call goes through the {@code pipeline}.
* @param repositoryName The name of the repository on which the service operations are performed.
* @param tagOrDigest The tag or digest associated with the given artifact.
@@ -94,13 +92,15 @@ public final class RegistryArtifactAsync {
this.repositoryName = repositoryName;
this.digestMono = isDigest(tagOrDigest)
? Mono.just(tagOrDigest)
- : Mono.defer(() -> getTagProperties(tagOrDigest).map(ArtifactTagProperties::getDigest).cache());
+ : Mono.defer(() -> getTagProperties(tagOrDigest).map(a -> a.getDigest()).cache());
}
/**
- * Deletes the current registry artifact.
+ * Deletes the registry artifact with the matching digest in the given {@link #getRepositoryName() respository.}
*
- * Delete the registry artifact
+ * Code Samples
+ *
+ * Delete the registry artifact.
*
*
*
@@ -108,13 +108,13 @@ public final class RegistryArtifactAsync {
*
*
*
- * @return A REST response.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @return A REST response with completion signal.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> deleteWithResponse() {
- return withContext(this::deleteWithResponse);
+ return withContext(context -> deleteWithResponse(context));
}
private Mono> deleteWithResponse(Context context) {
@@ -125,9 +125,11 @@ private Mono> deleteWithResponse(Context context) {
}
/**
- * Deletes the current registry artifact.
+ * Deletes the registry artifact with the matching digest in the given {@link #getRepositoryName() respository.}
+ *
+ * Code Samples
*
- * Delete the registry artifact
+ * Delete the registry artifact.
*
*
*
@@ -136,7 +138,7 @@ private Mono> deleteWithResponse(Context context) {
*
*
* @return the completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -145,9 +147,11 @@ public Mono delete() {
}
/**
- * Deletes the tag with the matching name on the current artifact.
+ * Deletes the tag with the matching tag name for the given {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Delete the tag
+ * Delete the tag for the given repository.
*
*
*
@@ -156,9 +160,9 @@ public Mono delete() {
*
*
*
- * @param tag A tag to be deleted.
- * @return A REST response.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @param tag The name of the 'tag' that uniquely identifies the 'tag' that needs to be deleted.
+ * @return A REST response with completion signal.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException thrown if {@code tag} is empty.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
@@ -182,9 +186,11 @@ private Mono> deleteTagWithResponse(String tag, Context context)
}
/**
- * Deletes the tag with the matching name on the current artifact.
+ * Deletes the tag with the matching tag name for the given {@link #getRepositoryName() repository}.
*
- * Delete the tag on the current artifact
+ * Code Samples
+ *
+ * Delete the tag for the given repository.
*
*
*
@@ -193,9 +199,9 @@ private Mono> deleteTagWithResponse(String tag, Context context)
*
*
*
- * @param tag The tag to be deleted.
+ * @param tag The name of the tag that uniquely identifies the tag that needs to be deleted.
* @return The completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws NullPointerException thrown if {@code tag} is null.
* @throws IllegalArgumentException thrown if the {@code tag} is empty.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
@@ -206,9 +212,14 @@ public Mono deleteTag(String tag) {
}
/**
- * Gets the {@link ArtifactManifestProperties properties} associated with the current artifact.
+ * Gets the {@link ArtifactManifestProperties properties} associated with an artifact in given {@link #getRepositoryName() repository}.
+ *
+ * This method can take in both a digest as well as a tag.
+ * In case a tag is provided it calls the service to get the digest associated with the given tag.
+ *
+ * Code Samples
*
- * Get manifest properties
+ * Get the properties for the given repository.
*
*
*
@@ -221,13 +232,13 @@ public Mono deleteTag(String tag) {
*
*
* @return A REST response containing {@link ArtifactManifestProperties properties} associated with the given {@code Digest}.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
+ * @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getManifestPropertiesWithResponse() {
- return withContext(this::getManifestPropertiesWithResponse);
+ return withContext(context -> getManifestPropertiesWithResponse(context));
}
private Mono> getManifestPropertiesWithResponse(Context context) {
@@ -239,9 +250,14 @@ private Mono> getManifestPropertiesWithResp
}
/**
- * Gets the {@link ArtifactManifestProperties properties} associated with the current artifact.
+ * Gets the {@link ArtifactManifestProperties properties} associated with an artifact in given {@link #getRepositoryName() repository}.
*
- * Get manifest properties
+ * This method can take in both a digest as well as a tag.
+ * In case a tag is provided it calls the service to get the digest associated with the given tag.
+ *
+ * Code Samples
+ *
+ * Get the properties for the given repository.
*
*
*
@@ -252,9 +268,9 @@ private Mono> getManifestPropertiesWithResp
*
*
*
- * @return The {@link ArtifactManifestProperties properties} associated with the current artifact.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @return The {@link ArtifactManifestProperties properties} associated with the given {@code Digest}.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
+ * @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
@@ -263,9 +279,11 @@ public Mono getManifestProperties() {
}
/**
- * Gets the tag properties associated with a given tag on the current artifact.
+ * Gets the tag properties associated with a given tag in the {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Retrieve the properties associated with the given tag
+ * Retrieve the properties associated with the given tag.
*
*
*
@@ -277,9 +295,9 @@ public Mono getManifestProperties() {
*
*
*
- * @param tag name of the tag
+ * @param tag name of the tag that uniquely identifies a given tag.
* @return A REST response with the {@link ArtifactTagProperties properties} associated with the given tag.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code tag} is null.
@@ -305,9 +323,11 @@ private Mono> getTagPropertiesWithResponse(Strin
}
/**
- * Gets the tag properties associated with a given tag on the current artifact.
+ * Gets the tag properties associated with a given tag in the {@link #getRepositoryName() repository}.
+ *
+ * Code Samples
*
- * Retrieve the properties associated with the given tag
+ * Retrieve the properties associated with the given tag.
*
*
*
@@ -320,7 +340,7 @@ private Mono> getTagPropertiesWithResponse(Strin
*
* @param tag name of the tag that uniquely identifies a given tag.
* @return The {@link ArtifactTagProperties properties} associated with the given tag.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code tag} is null.
@@ -332,14 +352,16 @@ public Mono getTagProperties(String tag) {
}
/**
- * Fetches all the tags associated with the current artifact.
+ * Fetches all the tags associated with the given {@link #getRepositoryName() repository}.
*
* If you would like to specify the order in which the tags are returned please
- * use the overload that takes in the options parameter {@link #listTagProperties(ArtifactTagOrder)}
+ * use the overload that takes in the options parameter {@link #listTagProperties(ArtifactTagOrder)} listTagProperties}
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * Retrieve all the tags associated with the current artifact
+ * Code Samples
+ *
+ * Retrieve all the tags associated with the given repository.
*
*
*
@@ -351,8 +373,8 @@ public Mono getTagProperties(String tag) {
*
*
*
- * @return {@link PagedFlux} of the tags for the current artifact.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @return {@link PagedFlux} of the artifacts for the given repository in the order specified by the options.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
@@ -368,7 +390,9 @@ public PagedFlux listTagProperties() {
* No assumptions on the order can be made if no options are provided to the service.
*
*
- * List all tags associated with the current artifact ordered by update time
+ * Code Samples
+ *
+ * Retrieve all the tags associated with the given repository from the most recently updated to the last.
*
*
*
@@ -384,14 +408,14 @@ public PagedFlux listTagProperties() {
*
* @param order The order in which the tags should be returned by the service.
* @return {@link PagedFlux} of the artifacts for the given repository in the order specified by the options.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to the repository.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
*/
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux listTagProperties(ArtifactTagOrder order) {
return new PagedFlux<>(
(pageSize) -> withContext(context -> listTagPropertiesSinglePageAsync(pageSize, order, context)),
- (token, ignored) -> withContext(context -> listTagPropertiesNextSinglePageAsync(token, context)));
+ (token, pageSize) -> withContext(context -> listTagPropertiesNextSinglePageAsync(token, context)));
}
private Mono> listTagPropertiesSinglePageAsync(Integer pageSize,
@@ -419,10 +443,12 @@ private Mono> listTagPropertiesNextSinglePa
}
/**
- * Update the properties {@link ArtifactTagProperties} of the tag with the given name {@code tag}.
+ * Update the properties {@link ArtifactTagProperties} of the tag with the given name {@code tag}..
* These properties set whether the given tag can be updated, deleted and retrieved.
*
- * Update writeable tag properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given tag.
*
*
*
@@ -435,7 +461,7 @@ private Mono> listTagPropertiesNextSinglePa
* @param tag Name of the tag that uniquely identifies it.
* @param tagProperties {@link ArtifactTagProperties value} to be set.
* @return A REST response for completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code tag} is null.
@@ -479,7 +505,9 @@ private Mono> updateTagPropertiesWithResponse(St
* Update the properties {@link ArtifactTagProperties} of the tag with the given name {@code tag}.
* These properties set whether the given tag can be updated, deleted and retrieved.
*
- * Update writable tag properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given tag.
*
*
*
@@ -492,7 +520,7 @@ private Mono> updateTagPropertiesWithResponse(St
* @param tag Name of the tag that uniquely identifies it.
* @param tagProperties {@link ArtifactTagProperties tagProperties} to be set.
* @return The completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
+ * @throws ClientAuthenticationException thrown if the client does not have access to repository.
* @throws ResourceNotFoundException thrown if the given tag was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code tag} is null.
@@ -505,10 +533,12 @@ public Mono updateTagProperties(String tag, ArtifactTagPr
}
/**
- * Update the properties {@link ArtifactManifestProperties} of the current artifact.
+ * Update the properties {@link ArtifactManifestProperties} of the artifact with the given {@code digest}.
* These properties set whether the given manifest can be updated, deleted and retrieved.
*
- * >Update writeable manifest properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given manifest.
*
*
*
@@ -519,8 +549,8 @@ public Mono updateTagProperties(String tag, ArtifactTagPr
*
* @param manifestProperties {@link ArtifactManifestProperties manifestProperties} to be set.
* @return A REST response for the completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @throws ClientAuthenticationException thrown if the client does not have access to repository.
+ * @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code manifestProperties} is null.
*/
@@ -551,10 +581,12 @@ public Mono updateTagProperties(String tag, ArtifactTagPr
}
/**
- * Update the properties {@link ArtifactManifestProperties} of the current artifact.
+ * Update the properties {@link ArtifactManifestProperties} of the artifact with the given {@code digest}.
* These properties set whether the given manifest can be updated, deleted and retrieved.
*
- * Update writeable manifest properties
+ * Code Samples
+ *
+ * Update the writeable properties of a given manifest.
*
*
*
@@ -565,8 +597,8 @@ public Mono updateTagProperties(String tag, ArtifactTagPr
*
* @param manifestProperties {@link ArtifactManifestProperties manifestProperties} to be set.
* @return The completion.
- * @throws ClientAuthenticationException thrown if the client does not have access to perform this operation.
- * @throws ResourceNotFoundException thrown if the current artifact was not found.
+ * @throws ClientAuthenticationException thrown if the client does not have access to repository.
+ * @throws ResourceNotFoundException thrown if the given digest was not found.
* @throws HttpResponseException thrown if any other unexpected exception is returned by the service.
* @throws NullPointerException thrown if the {@code manifestProperties} is null.
*/
@@ -576,18 +608,18 @@ public Mono updateManifestProperties(ArtifactManifes
}
/**
- * Gets the Azure Container Registry service endpoint.
- *
- * @return The service endpoint.
+ * Gets the Azure Container Registry service endpoint for the current instance.
+ * @return The service endpoint for the current instance.
*/
public String getRegistryEndpoint() {
return endpoint;
}
/**
- * Gets the fully qualified reference for the current instance
- * following the 'registryName/repositoryName@digest' or 'registryName/repositoryName:tag' format.
- *
+ * Gets the fully qualified reference for the current instance.
+ * The fully qualifiedName is of the form 'registryName/repositoryName@digest'
+ * or 'registryName/repositoryName:tag' based on the docker naming convention and whether
+ * tag or digest was supplied to the constructor.
* @return Fully qualified reference of the current instance.
* */
public String getFullyQualifiedReference() {
@@ -595,9 +627,9 @@ public String getFullyQualifiedReference() {
}
/**
- * Gets the repository name.
- *
- * @return Name of the current repository.
+ * Gets the repository name for the current instance.
+ * Gets the repository name for the current instance.
+ * @return Name of the repository for the current instance.
* */
public String getRepositoryName() {
return repositoryName;
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
index 8d3d3ebefa05..8a4b08fd4242 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AuthenticationsImpl.java
@@ -26,23 +26,17 @@
import com.azure.core.util.FluxUtil;
import reactor.core.publisher.Mono;
-/**
- * An instance of this class provides access to all the operations defined in Authentications.
- */
+/** An instance of this class provides access to all the operations defined in Authentications. */
public final class AuthenticationsImpl {
- /**
- * The proxy service used to perform REST calls.
- */
+ /** The proxy service used to perform REST calls. */
private final AuthenticationsService service;
- /**
- * The service client containing this operation class.
- */
+ /** The service client containing this operation class. */
private final AzureContainerRegistryImpl client;
/**
* Initializes an instance of AuthenticationsImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
AuthenticationsImpl(AzureContainerRegistryImpl client) {
@@ -56,7 +50,7 @@ public final class AuthenticationsImpl {
* to perform REST calls.
*/
@Host("{url}")
- @ServiceInterface(name = "AzureContainerRegistryAuthentications")
+ @ServiceInterface(name = "AzureContainerRegist")
public interface AuthenticationsService {
// @Multipart not supported by RestProxy
@Post("/oauth2/exchange")
@@ -99,7 +93,7 @@ Response exchangeAcrRefreshTokenForAcrAccessTokenSync(@HostParam
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -114,13 +108,14 @@ Response exchangeAcrRefreshTokenForAcrAccessTokenSync(@HostParam
public Mono> exchangeAadAccessTokenForAcrRefreshTokenWithResponseAsync(
PostContentSchemaGrantType grantType, String serviceParam, String tenant, String refreshToken,
String accessToken) {
- return FluxUtil.withContext(context -> exchangeAadAccessTokenForAcrRefreshTokenWithResponseAsync(grantType,
- serviceParam, tenant, refreshToken, accessToken, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.exchangeAadAccessTokenForAcrRefreshToken(this.client.getUrl(),
+ this.client.getApiVersion(), grantType, serviceParam, tenant, refreshToken, accessToken, accept, context));
}
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -143,7 +138,7 @@ public Mono> exchangeAadAccessTokenForAcrRefreshTokenW
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -163,7 +158,7 @@ public Mono exchangeAadAccessTokenForAcrRefreshTokenAsync(PostC
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -184,7 +179,7 @@ public Mono exchangeAadAccessTokenForAcrRefreshTokenAsync(PostC
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -207,7 +202,7 @@ public Response exchangeAadAccessTokenForAcrRefreshTokenWithRes
/**
* Exchange AAD tokens for an ACR refresh Token.
- *
+ *
* @param grantType Can take a value of access_token_refresh_token, or access_token, or refresh_token.
* @param serviceParam Indicates the name of your Azure container registry.
* @param tenant AAD tenant associated to the AAD credentials.
@@ -227,10 +222,10 @@ public AcrRefreshToken exchangeAadAccessTokenForAcrRefreshToken(PostContentSchem
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -241,16 +236,17 @@ public AcrRefreshToken exchangeAadAccessTokenForAcrRefreshToken(PostContentSchem
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> exchangeAcrRefreshTokenForAcrAccessTokenWithResponseAsync(String serviceParam,
String scope, String refreshToken, TokenGrantType grantType) {
- return FluxUtil.withContext(context -> exchangeAcrRefreshTokenForAcrAccessTokenWithResponseAsync(serviceParam,
- scope, refreshToken, grantType, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.exchangeAcrRefreshTokenForAcrAccessToken(this.client.getUrl(),
+ this.client.getApiVersion(), serviceParam, scope, refreshToken, grantType, accept, context));
}
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @param context The context to associate with this operation.
@@ -269,10 +265,10 @@ public Mono> exchangeAcrRefreshTokenForAcrAccessTokenWi
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -289,10 +285,10 @@ public Mono exchangeAcrRefreshTokenForAcrAccessTokenAsync(String
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @param context The context to associate with this operation.
@@ -310,10 +306,10 @@ public Mono exchangeAcrRefreshTokenForAcrAccessTokenAsync(String
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @param context The context to associate with this operation.
@@ -332,10 +328,10 @@ public Response exchangeAcrRefreshTokenForAcrAccessTokenWithResp
/**
* Exchange ACR Refresh token for an ACR Access Token.
- *
+ *
* @param serviceParam Indicates the name of your Azure container registry.
* @param scope Which is expected to be a valid scope, and can be specified more than once for multiple scope
- * requests. You obtained this from the Www-Authenticate response header from the challenge.
+ * requests. You obtained this from the Www-Authenticate response header from the challenge.
* @param refreshToken Must be a valid ACR refresh token.
* @param grantType Grant type is expected to be refresh_token.
* @throws IllegalArgumentException thrown if parameters fail the validation.
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java
index 0da735ccf77e..b1a2d756dc2c 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/AzureContainerRegistryImpl.java
@@ -6,107 +6,92 @@
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.policy.CookiePolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.util.serializer.JacksonAdapter;
import com.azure.core.util.serializer.SerializerAdapter;
-/**
- * Initializes a new instance of the AzureContainerRegistry type.
- */
+/** Initializes a new instance of the AzureContainerRegistry type. */
public final class AzureContainerRegistryImpl {
- /**
- * Registry login URL.
- */
+ /** Registry login URL. */
private final String url;
/**
* Gets Registry login URL.
- *
+ *
* @return the url value.
*/
public String getUrl() {
return this.url;
}
- /**
- * Api Version.
- */
+ /** Api Version. */
private final String apiVersion;
/**
* Gets Api Version.
- *
+ *
* @return the apiVersion value.
*/
public String getApiVersion() {
return this.apiVersion;
}
- /**
- * The HTTP pipeline to send requests through.
- */
+ /** The HTTP pipeline to send requests through. */
private final HttpPipeline httpPipeline;
/**
* Gets The HTTP pipeline to send requests through.
- *
+ *
* @return the httpPipeline value.
*/
public HttpPipeline getHttpPipeline() {
return this.httpPipeline;
}
- /**
- * The serializer to serialize an object into a string.
- */
+ /** The serializer to serialize an object into a string. */
private final SerializerAdapter serializerAdapter;
/**
* Gets The serializer to serialize an object into a string.
- *
+ *
* @return the serializerAdapter value.
*/
public SerializerAdapter getSerializerAdapter() {
return this.serializerAdapter;
}
- /**
- * The ContainerRegistriesImpl object to access its operations.
- */
+ /** The ContainerRegistriesImpl object to access its operations. */
private final ContainerRegistriesImpl containerRegistries;
/**
* Gets the ContainerRegistriesImpl object to access its operations.
- *
+ *
* @return the ContainerRegistriesImpl object.
*/
public ContainerRegistriesImpl getContainerRegistries() {
return this.containerRegistries;
}
- /**
- * The ContainerRegistryBlobsImpl object to access its operations.
- */
+ /** The ContainerRegistryBlobsImpl object to access its operations. */
private final ContainerRegistryBlobsImpl containerRegistryBlobs;
/**
* Gets the ContainerRegistryBlobsImpl object to access its operations.
- *
+ *
* @return the ContainerRegistryBlobsImpl object.
*/
public ContainerRegistryBlobsImpl getContainerRegistryBlobs() {
return this.containerRegistryBlobs;
}
- /**
- * The AuthenticationsImpl object to access its operations.
- */
+ /** The AuthenticationsImpl object to access its operations. */
private final AuthenticationsImpl authentications;
/**
* Gets the AuthenticationsImpl object to access its operations.
- *
+ *
* @return the AuthenticationsImpl object.
*/
public AuthenticationsImpl getAuthentications() {
@@ -115,18 +100,18 @@ public AuthenticationsImpl getAuthentications() {
/**
* Initializes an instance of AzureContainerRegistry client.
- *
+ *
* @param url Registry login URL.
* @param apiVersion Api Version.
*/
public AzureContainerRegistryImpl(String url, String apiVersion) {
- this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy()).build(),
+ this(new HttpPipelineBuilder().policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy()).build(),
JacksonAdapter.createDefaultSerializerAdapter(), url, apiVersion);
}
/**
* Initializes an instance of AzureContainerRegistry client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
* @param url Registry login URL.
* @param apiVersion Api Version.
@@ -137,7 +122,7 @@ public AzureContainerRegistryImpl(HttpPipeline httpPipeline, String url, String
/**
* Initializes an instance of AzureContainerRegistry client.
- *
+ *
* @param httpPipeline The HTTP pipeline to send requests through.
* @param serializerAdapter The serializer to serialize an object into a string.
* @param url Registry login URL.
diff --git a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java
index dc824ae38ab4..8fe5426e27bd 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java
+++ b/sdk/containerregistry/azure-containers-containerregistry/src/main/java/com/azure/containers/containerregistry/implementation/ContainerRegistriesImpl.java
@@ -53,23 +53,17 @@
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
-/**
- * An instance of this class provides access to all the operations defined in ContainerRegistries.
- */
+/** An instance of this class provides access to all the operations defined in ContainerRegistries. */
public final class ContainerRegistriesImpl {
- /**
- * The proxy service used to perform REST calls.
- */
+ /** The proxy service used to perform REST calls. */
private final ContainerRegistriesService service;
- /**
- * The service client containing this operation class.
- */
+ /** The service client containing this operation class. */
private final AzureContainerRegistryImpl client;
/**
* Initializes an instance of ContainerRegistriesImpl.
- *
+ *
* @param client the instance of the service client containing this operation class.
*/
ContainerRegistriesImpl(AzureContainerRegistryImpl client) {
@@ -83,7 +77,7 @@ public final class ContainerRegistriesImpl {
* service to perform REST calls.
*/
@Host("{url}")
- @ServiceInterface(name = "AzureContainerRegistryContainerRegistries")
+ @ServiceInterface(name = "AzureContainerRegist")
public interface ContainerRegistriesService {
@Get("/v2/")
@ExpectedResponses({ 200 })
@@ -118,14 +112,6 @@ Mono> createManifes
@BodyParam("application/vnd.docker.distribution.manifest.v2+json") Flux payload,
@HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
- @Put("/v2/{name}/manifests/{reference}")
- @ExpectedResponses({ 201 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> createManifestNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name,
- @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType,
- @BodyParam("application/vnd.docker.distribution.manifest.v2+json") Flux payload,
- @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
-
@Put("/v2/{name}/manifests/{reference}")
@ExpectedResponses({ 201 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -135,14 +121,6 @@ Mono> createManifes
@BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload,
@HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
- @Put("/v2/{name}/manifests/{reference}")
- @ExpectedResponses({ 201 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> createManifestNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name,
- @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType,
- @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload,
- @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
-
@Put("/v2/{name}/manifests/{reference}")
@ExpectedResponses({ 201 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -152,14 +130,6 @@ ResponseBase createManifestSync(
@BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload,
@HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
- @Put("/v2/{name}/manifests/{reference}")
- @ExpectedResponses({ 201 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response createManifestNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name,
- @PathParam("reference") String reference, @HeaderParam("Content-Type") String contentType,
- @BodyParam("application/vnd.docker.distribution.manifest.v2+json") BinaryData payload,
- @HeaderParam("Content-Length") long contentLength, @HeaderParam("Accept") String accept, Context context);
-
@Delete("/v2/{name}/manifests/{reference}")
@ExpectedResponses({ 202, 404 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -179,13 +149,6 @@ Mono> getR
@HostParam("url") String url, @QueryParam("last") String last, @QueryParam("n") Integer n,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/_catalog")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getRepositoriesNoCustomHeaders(@HostParam("url") String url,
- @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/_catalog")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -193,13 +156,6 @@ ResponseBase getReposit
@HostParam("url") String url, @QueryParam("last") String last, @QueryParam("n") Integer n,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/_catalog")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getRepositoriesNoCustomHeadersSync(@HostParam("url") String url,
- @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/{name}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -252,14 +208,6 @@ Mono> getTags(@HostPara
@QueryParam("orderby") String orderBy, @QueryParam("digest") String digest,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/{name}/_tags")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getTagsNoCustomHeaders(@HostParam("url") String url, @PathParam("name") String name,
- @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy,
- @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/{name}/_tags")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -268,14 +216,6 @@ ResponseBase getTagsSync(@HostParam(
@QueryParam("orderby") String orderBy, @QueryParam("digest") String digest,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/{name}/_tags")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getTagsNoCustomHeadersSync(@HostParam("url") String url, @PathParam("name") String name,
- @QueryParam("last") String last, @QueryParam("n") Integer n, @QueryParam("orderby") String orderBy,
- @QueryParam("digest") String digest, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/{name}/_tags/{reference}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -328,14 +268,6 @@ Mono> getMani
@QueryParam("n") Integer n, @QueryParam("orderby") String orderBy,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/{name}/_manifests")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getManifestsNoCustomHeaders(@HostParam("url") String url,
- @PathParam("name") String name, @QueryParam("last") String last, @QueryParam("n") Integer n,
- @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/{name}/_manifests")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -344,14 +276,6 @@ ResponseBase getManifestsS
@QueryParam("n") Integer n, @QueryParam("orderby") String orderBy,
@QueryParam("api-version") String apiVersion, @HeaderParam("Accept") String accept, Context context);
- @Get("/acr/v1/{name}/_manifests")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getManifestsNoCustomHeadersSync(@HostParam("url") String url,
- @PathParam("name") String name, @QueryParam("last") String last, @QueryParam("n") Integer n,
- @QueryParam("orderby") String orderBy, @QueryParam("api-version") String apiVersion,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("/acr/v1/{name}/_manifests/{digest}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -391,13 +315,6 @@ Mono>
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getRepositoriesNextNoCustomHeaders(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -405,13 +322,6 @@ ResponseBase getRep
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getRepositoriesNextNoCustomHeadersSync(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -419,13 +329,6 @@ Mono> getTagsNext(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getTagsNextNoCustomHeaders(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -433,12 +336,6 @@ ResponseBase getTagsNextSync(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getTagsNextNoCustomHeadersSync(@PathParam(value = "nextLink", encoded = true) String nextLink,
- @HostParam("url") String url, @HeaderParam("Accept") String accept, Context context);
-
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
@@ -446,43 +343,30 @@ Mono> get
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Mono> getManifestsNextNoCustomHeaders(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
- @HeaderParam("Accept") String accept, Context context);
-
@Get("{nextLink}")
@ExpectedResponses({ 200 })
@UnexpectedResponseExceptionType(AcrErrorsException.class)
ResponseBase getManifestsNextSync(
@PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
@HeaderParam("Accept") String accept, Context context);
-
- @Get("{nextLink}")
- @ExpectedResponses({ 200 })
- @UnexpectedResponseExceptionType(AcrErrorsException.class)
- Response getManifestsNextNoCustomHeadersSync(
- @PathParam(value = "nextLink", encoded = true) String nextLink, @HostParam("url") String url,
- @HeaderParam("Accept") String accept, Context context);
}
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> checkDockerV2SupportWithResponseAsync() {
- return FluxUtil.withContext(context -> checkDockerV2SupportWithResponseAsync(context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.checkDockerV2Support(this.client.getUrl(), accept, context));
}
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -497,7 +381,7 @@ public Mono> checkDockerV2SupportWithResponseAsync(Context contex
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return A {@link Mono} that completes when a successful response is received.
@@ -509,7 +393,7 @@ public Mono checkDockerV2SupportAsync() {
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -523,7 +407,7 @@ public Mono checkDockerV2SupportAsync(Context context) {
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -538,7 +422,7 @@ public Response checkDockerV2SupportWithResponse(Context context) {
/**
* Tells whether this Docker Registry instance supports Docker Registry HTTP API v2.
- *
+ *
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
*/
@@ -549,35 +433,36 @@ public void checkDockerV2Support() {
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with
- * {@link Response} on successful completion of {@link Mono}.
+ * {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getManifestWithResponseAsync(String name, String reference, String accept) {
- return FluxUtil.withContext(context -> getManifestWithResponseAsync(name, reference, accept, context));
+ return FluxUtil
+ .withContext(context -> service.getManifest(this.client.getUrl(), name, reference, accept, context));
}
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with
- * {@link Response} on successful completion of {@link Mono}.
+ * {@link Response} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getManifestWithResponseAsync(String name, String reference, String accept,
@@ -587,16 +472,16 @@ public Mono> getManifestWithResponseAsync(String name, Stri
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest on successful
- * completion of {@link Mono}.
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono getManifestAsync(String name, String reference, String accept) {
@@ -605,17 +490,17 @@ public Mono getManifestAsync(String name, String reference, String a
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest on successful
- * completion of {@link Mono}.
+ * completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono getManifestAsync(String name, String reference, String accept, Context context) {
@@ -625,17 +510,17 @@ public Mono getManifestAsync(String name, String reference, String a
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the manifest identified by `name` and `reference` where `reference` can be a tag or digest along with
- * {@link Response}.
+ * {@link Response}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Response getManifestWithResponse(String name, String reference, String accept, Context context) {
@@ -644,11 +529,11 @@ public Response getManifestWithResponse(String name, String referenc
/**
* Get the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param accept Accept header string delimited by comma. For example,
- * application/vnd.docker.distribution.manifest.v2+json.
+ * application/vnd.docker.distribution.manifest.v2+json.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -661,7 +546,7 @@ public BinaryData getManifest(String name, String reference, String accept) {
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -675,13 +560,14 @@ public BinaryData getManifest(String name, String reference, String accept) {
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> createManifestWithResponseAsync(
String name, String reference, Flux payload, long contentLength, String contentType) {
- return FluxUtil.withContext(
- context -> createManifestWithResponseAsync(name, reference, payload, contentLength, contentType, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.createManifest(this.client.getUrl(), name, reference,
+ contentType, payload, contentLength, accept, context));
}
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -704,7 +590,7 @@ public Mono> create
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -724,7 +610,7 @@ public Mono createManifestAsync(String name, String reference, Flux createManifestAsync(String name, String reference, Flux> createManifestNoCustomHeadersWithResponseAsync(String name, String reference,
- Flux payload, long contentLength, String contentType) {
- return FluxUtil.withContext(context -> createManifestNoCustomHeadersWithResponseAsync(name, reference, payload,
- contentLength, contentType, context));
- }
-
- /**
- * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
- * @param name Name of the image (including the namespace).
- * @param reference A tag or a digest, pointing to a specific image.
- * @param payload Manifest body, can take v1 or v2 values depending on accept header.
- * @param contentLength The Content-Length header for the request.
- * @param contentType The manifest's Content-Type.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference,
- Flux payload, long contentLength, String contentType, Context context) {
- final String accept = "application/json";
- return service.createManifestNoCustomHeaders(this.client.getUrl(), name, reference, contentType, payload,
- contentLength, accept, context);
- }
-
- /**
- * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -801,13 +645,14 @@ public Mono> createManifestNoCustomHeadersWithResponseAsync(Strin
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> createManifestWithResponseAsync(
String name, String reference, BinaryData payload, long contentLength, String contentType) {
- return FluxUtil.withContext(
- context -> createManifestWithResponseAsync(name, reference, payload, contentLength, contentType, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.createManifest(this.client.getUrl(), name, reference,
+ contentType, payload, contentLength, accept, context));
}
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -829,7 +674,7 @@ public Mono> create
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -849,7 +694,7 @@ public Mono createManifestAsync(String name, String reference, BinaryData
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -870,49 +715,7 @@ public Mono createManifestAsync(String name, String reference, BinaryData
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
- * @param name Name of the image (including the namespace).
- * @param reference A tag or a digest, pointing to a specific image.
- * @param payload Manifest body, can take v1 or v2 values depending on accept header.
- * @param contentLength The Content-Length header for the request.
- * @param contentType The manifest's Content-Type.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference,
- BinaryData payload, long contentLength, String contentType) {
- return FluxUtil.withContext(context -> createManifestNoCustomHeadersWithResponseAsync(name, reference, payload,
- contentLength, contentType, context));
- }
-
- /**
- * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
- * @param name Name of the image (including the namespace).
- * @param reference A tag or a digest, pointing to a specific image.
- * @param payload Manifest body, can take v1 or v2 values depending on accept header.
- * @param contentLength The Content-Length header for the request.
- * @param contentType The manifest's Content-Type.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> createManifestNoCustomHeadersWithResponseAsync(String name, String reference,
- BinaryData payload, long contentLength, String contentType, Context context) {
- final String accept = "application/json";
- return service.createManifestNoCustomHeaders(this.client.getUrl(), name, reference, contentType, payload,
- contentLength, accept, context);
- }
-
- /**
- * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -934,7 +737,7 @@ public ResponseBase createManife
/**
* Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference A tag or a digest, pointing to a specific image.
* @param payload Manifest body, can take v1 or v2 values depending on accept header.
@@ -950,31 +753,9 @@ public void createManifest(String name, String reference, BinaryData payload, lo
createManifestWithResponse(name, reference, payload, contentLength, contentType, Context.NONE);
}
- /**
- * Put the manifest identified by `name` and `reference` where `reference` can be a tag or digest.
- *
- * @param name Name of the image (including the namespace).
- * @param reference A tag or a digest, pointing to a specific image.
- * @param payload Manifest body, can take v1 or v2 values depending on accept header.
- * @param contentLength The Content-Length header for the request.
- * @param contentType The manifest's Content-Type.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return the {@link Response}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Response createManifestNoCustomHeadersWithResponse(String name, String reference, BinaryData payload,
- long contentLength, String contentType, Context context) {
- final String accept = "application/json";
- return service.createManifestNoCustomHeadersSync(this.client.getUrl(), name, reference, contentType, payload,
- contentLength, accept, context);
- }
-
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -984,12 +765,14 @@ public Response createManifestNoCustomHeadersWithResponse(String name, Str
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> deleteManifestWithResponseAsync(String name, String reference) {
- return FluxUtil.withContext(context -> deleteManifestWithResponseAsync(name, reference, context));
+ final String accept = "application/json";
+ return FluxUtil
+ .withContext(context -> service.deleteManifest(this.client.getUrl(), name, reference, accept, context));
}
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @param context The context to associate with this operation.
@@ -1006,7 +789,7 @@ public Mono> deleteManifestWithResponseAsync(String name, String
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1021,7 +804,7 @@ public Mono deleteManifestAsync(String name, String reference) {
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @param context The context to associate with this operation.
@@ -1037,7 +820,7 @@ public Mono deleteManifestAsync(String name, String reference, Context con
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @param context The context to associate with this operation.
@@ -1054,7 +837,7 @@ public Response deleteManifestWithResponse(String name, String reference,
/**
* Delete the manifest identified by `name` and `reference`. Note that a manifest can _only_ be deleted by `digest`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param reference Digest of a BLOB.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1068,9 +851,9 @@ public void deleteManifest(String name, String reference) {
/**
* List repositories.
- *
+ *
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1088,9 +871,9 @@ public Mono> getRepositoriesSinglePageAsync(String last, I
/**
* List repositories.
- *
+ *
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1106,49 +889,9 @@ public PagedFlux getRepositoriesAsync(String last, Integer n, Context co
/**
* List repositories.
- *
+ *
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of repositories along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getRepositoriesNoCustomHeadersSinglePageAsync(String last, Integer n,
- Context context) {
- final String accept = "application/json";
- return service
- .getRepositoriesNoCustomHeaders(this.client.getUrl(), last, n, this.client.getApiVersion(), accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().getRepositories(), res.getValue().getLink(), null));
- }
-
- /**
- * List repositories.
- *
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of repositories as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux getRepositoriesNoCustomHeadersAsync(String last, Integer n, Context context) {
- return new PagedFlux<>(() -> getRepositoriesNoCustomHeadersSinglePageAsync(last, n, context),
- nextLink -> getRepositoriesNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * List repositories.
- *
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1167,9 +910,9 @@ public PagedResponse getRepositoriesSinglePage(String last, Integer n, C
/**
* List repositories.
- *
+ *
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1183,48 +926,9 @@ public PagedIterable getRepositories(String last, Integer n, Context con
nextLink -> getRepositoriesNextSinglePage(nextLink, context));
}
- /**
- * List repositories.
- *
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of repositories along with {@link PagedResponse}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public PagedResponse getRepositoriesNoCustomHeadersSinglePage(String last, Integer n, Context context) {
- final String accept = "application/json";
- Response res = service.getRepositoriesNoCustomHeadersSync(this.client.getUrl(), last, n,
- this.client.getApiVersion(), accept, context);
- return new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().getRepositories(), res.getValue().getLink(), null);
- }
-
- /**
- * List repositories.
- *
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of repositories as paginated response with {@link PagedIterable}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedIterable getRepositoriesNoCustomHeaders(String last, Integer n, Context context) {
- return new PagedIterable<>(() -> getRepositoriesNoCustomHeadersSinglePage(last, n, context),
- nextLink -> getRepositoriesNextSinglePage(nextLink, context));
- }
-
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1233,12 +937,14 @@ public PagedIterable getRepositoriesNoCustomHeaders(String last, Integer
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getPropertiesWithResponseAsync(String name) {
- return FluxUtil.withContext(context -> getPropertiesWithResponseAsync(name, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context -> service.getProperties(this.client.getUrl(), name, this.client.getApiVersion(), accept, context));
}
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1254,7 +960,7 @@ public Mono> getPropertiesWithResponseAs
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1268,7 +974,7 @@ public Mono getPropertiesAsync(String name) {
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1283,7 +989,7 @@ public Mono getPropertiesAsync(String name, Conte
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1299,7 +1005,7 @@ public Response getPropertiesWithResponse(String
/**
* Get repository attributes.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1313,7 +1019,7 @@ public ContainerRepositoryProperties getProperties(String name) {
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1322,12 +1028,14 @@ public ContainerRepositoryProperties getProperties(String name) {
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> deleteRepositoryWithResponseAsync(String name) {
- return FluxUtil.withContext(context -> deleteRepositoryWithResponseAsync(name, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.deleteRepository(this.client.getUrl(), name,
+ this.client.getApiVersion(), accept, context));
}
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1343,7 +1051,7 @@ public Mono> deleteRepositoryWithResponseAsync(
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1357,7 +1065,7 @@ public Mono deleteRepositoryAsync(String name) {
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1372,7 +1080,7 @@ public Mono deleteRepositoryAsync(String name, Context c
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1388,7 +1096,7 @@ public Response deleteRepositoryWithResponse(String name
/**
* Delete the repository identified by `name`.
- *
+ *
* @param name Name of the image (including the namespace).
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws AcrErrorsException thrown if the request is rejected by server.
@@ -1402,7 +1110,7 @@ public DeleteRepositoryResult deleteRepository(String name) {
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1413,12 +1121,14 @@ public DeleteRepositoryResult deleteRepository(String name) {
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> updatePropertiesWithResponseAsync(String name,
RepositoryWriteableProperties value) {
- return FluxUtil.withContext(context -> updatePropertiesWithResponseAsync(name, value, context));
+ final String accept = "application/json";
+ return FluxUtil.withContext(context -> service.updateProperties(this.client.getUrl(), name,
+ this.client.getApiVersion(), value, accept, context));
}
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @param context The context to associate with this operation.
@@ -1437,7 +1147,7 @@ public Mono> updatePropertiesWithRespons
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1452,7 +1162,7 @@ public Mono updatePropertiesAsync(String name, Re
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @param context The context to associate with this operation.
@@ -1469,7 +1179,7 @@ public Mono updatePropertiesAsync(String name, Re
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @param context The context to associate with this operation.
@@ -1488,7 +1198,7 @@ public Response updatePropertiesWithResponse(Stri
/**
* Update the attribute identified by `name` where `reference` is the name of the repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param value Repository attribute value.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -1503,10 +1213,10 @@ public ContainerRepositoryProperties updateProperties(String name, RepositoryWri
/**
* List tags of a repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param orderBy orderby query parameter.
* @param digest filter by digest.
@@ -1528,10 +1238,10 @@ public Mono> getTagsSinglePageAsync(String name
/**
* List tags of a repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param orderBy orderby query parameter.
* @param digest filter by digest.
@@ -1550,58 +1260,10 @@ public PagedFlux getTagsAsync(String name, String last, Integ
/**
* List tags of a repository.
- *
- * @param name Name of the image (including the namespace).
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param orderBy orderby query parameter.
- * @param digest filter by digest.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of tag details along with {@link PagedResponse} on successful completion of {@link Mono}.
- */
- @ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getTagsNoCustomHeadersSinglePageAsync(String name, String last,
- Integer n, String orderBy, String digest, Context context) {
- final String accept = "application/json";
- return service
- .getTagsNoCustomHeaders(this.client.getUrl(), name, last, n, orderBy, digest, this.client.getApiVersion(),
- accept, context)
- .map(res -> new PagedResponseBase<>(res.getRequest(), res.getStatusCode(), res.getHeaders(),
- res.getValue().getTagAttributeBases(), res.getValue().getLink(), null));
- }
-
- /**
- * List tags of a repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
- * @param n query parameter for max number of items.
- * @param orderBy orderby query parameter.
- * @param digest filter by digest.
- * @param context The context to associate with this operation.
- * @throws IllegalArgumentException thrown if parameters fail the validation.
- * @throws AcrErrorsException thrown if the request is rejected by server.
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
- * @return list of tag details as paginated response with {@link PagedFlux}.
- */
- @ServiceMethod(returns = ReturnType.COLLECTION)
- public PagedFlux getTagsNoCustomHeadersAsync(String name, String last, Integer n, String orderBy,
- String digest, Context context) {
- return new PagedFlux<>(() -> getTagsNoCustomHeadersSinglePageAsync(name, last, n, orderBy, digest, context),
- nextLink -> getTagsNextSinglePageAsync(nextLink, context));
- }
-
- /**
- * List tags of a repository.
- *
- * @param name Name of the image (including the namespace).
- * @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param orderBy orderby query parameter.
* @param digest filter by digest.
@@ -1623,10 +1285,10 @@ public PagedResponse getTagsSinglePage(String name, String la
/**
* List tags of a repository.
- *
+ *
* @param name Name of the image (including the namespace).
* @param last Query parameter for the last item in previous query. Result set will include values lexically after
- * last.
+ * last.
* @param n query parameter for max number of items.
* @param orderBy orderby query parameter.
* @param digest filter by digest.
@@ -1643,56 +1305,9 @@ public PagedIterable