diff --git a/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/StepVerifierCheck.java b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/StepVerifierCheck.java
new file mode 100644
index 000000000000..a92bf04f6f11
--- /dev/null
+++ b/eng/code-quality-reports/src/main/java/com/azure/tools/checkstyle/checks/StepVerifierCheck.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.api.AbstractCheck;
+import com.puppycrawl.tools.checkstyle.api.DetailAST;
+import com.puppycrawl.tools.checkstyle.api.FullIdent;
+import com.puppycrawl.tools.checkstyle.api.TokenTypes;
+
+/**
+ * Ensures that test code doesn't use {@code StepVerifier.setDefaultTimeout}.
+ *
+ * This configures a default timeout used by all {@code StepVerifier} calls, which can lead to flaky tests as this may
+ * affect other tests.
+ */
+public class StepVerifierCheck extends AbstractCheck {
+ private static final String SET_DEFAULT_TIMEOUT = "setDefaultTimeout";
+ private static final String FULLY_QUALIFIED = "reactor.test.StepVerifier.setDefaultTimeout";
+ private static final String METHOD_CALL = "StepVerifier.setDefaultTimeout";
+
+ static final String ERROR_MESSAGE = "Do not use StepVerifier.setDefaultTimeout as it can affect other tests. "
+ + "Instead use expect* methods on StepVerifier and use verify(Duration) to "
+ + "set timeouts on a test-by-test basis.";
+
+ private boolean hasStaticImport;
+
+ @Override
+ public int[] getDefaultTokens() {
+ return new int[]{
+ TokenTypes.METHOD_CALL,
+ TokenTypes.STATIC_IMPORT
+ };
+ }
+
+ @Override
+ public int[] getAcceptableTokens() {
+ return getDefaultTokens();
+ }
+
+ @Override
+ public int[] getRequiredTokens() {
+ return getDefaultTokens();
+ }
+
+ @Override
+ public void init() {
+ super.init();
+ hasStaticImport = false;
+ }
+
+ @Override
+ public void destroy() {
+ super.destroy();
+ hasStaticImport = false;
+ }
+
+ @Override
+ public void visitToken(DetailAST ast) {
+ if (ast.getType() == TokenTypes.STATIC_IMPORT) {
+ // Compare if the static import is for StepVerifier.setDefaultTimeout
+ hasStaticImport = FULLY_QUALIFIED.equals(
+ FullIdent.createFullIdent(ast.getFirstChild().getNextSibling()).getText());
+ } else {
+ // Compare the method call against StepVerifier.setDefaultTimeout or setDefaultTimeout if there is a static
+ // import for StepVerifier.setDefaultTimeout
+ FullIdent fullIdent = FullIdent.createFullIdentBelow(ast);
+ if (hasStaticImport && SET_DEFAULT_TIMEOUT.equals(fullIdent.getText())) {
+ log(ast.getLineNo(), fullIdent.getColumnNo(), ERROR_MESSAGE);
+ } else if (METHOD_CALL.equals(fullIdent.getText())) {
+ log(ast.getLineNo(), fullIdent.getColumnNo(), ERROR_MESSAGE);
+ } else if (FULLY_QUALIFIED.equals(fullIdent.getText())) {
+ log(ast.getLineNo(), fullIdent.getColumnNo(), ERROR_MESSAGE);
+ }
+ }
+ }
+}
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 3b6602fc88a0..e4dfe75efa70 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -113,7 +113,10 @@
+ files="com.azure.monitor.applicationinsights.spring.AzureSpringMonitorAutoConfig.java"/>
+
+
@@ -434,6 +437,7 @@ the main ServiceBusClientBuilder. -->
+
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
index d235b73b44f6..9d76af0f18f2 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle.xml
@@ -408,5 +408,7 @@ page at http://checkstyle.sourceforge.net/config.html -->
+
+
diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json
index 639feca01fd7..9162d7b5e17e 100644
--- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json
+++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json
@@ -299,6 +299,19 @@
"code": "java.annotation.added",
"new": "class com.azure.cosmos.models.ChangeFeedProcessorItem",
"justification": "Modifies the type of changeFeedMetaData from ChangeFeedMetaData to JsonNode."
+ },
+ {
+ "ignore": true,
+ "code": "java.field.addedStaticField",
+ "new": "field com.azure.data.schemaregistry.SchemaRegistryVersion.V2022_10",
+ "justification": "Another version of Schema Registry API released."
+ },
+ {
+ "regex": true,
+ "ignore": true,
+ "code": "java.field.addedStaticField",
+ "new": "field com\\.azure\\.data\\.schemaregistry\\.models\\.SchemaFormat\\.(CUSTOM|JSON)",
+ "justification": "Additional schema formats are supported by Schema Registry."
}
]
}
diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
index 4fd5b0cf37d3..7dddfc325231 100644
--- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
+++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
@@ -462,8 +462,9 @@
+
+
-
@@ -2697,4 +2698,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/code-quality-reports/src/test/java/com/azure/tools/checkstyle/checks/StepVerifierCheckTest.java b/eng/code-quality-reports/src/test/java/com/azure/tools/checkstyle/checks/StepVerifierCheckTest.java
new file mode 100644
index 000000000000..d9cc94f9c413
--- /dev/null
+++ b/eng/code-quality-reports/src/test/java/com/azure/tools/checkstyle/checks/StepVerifierCheckTest.java
@@ -0,0 +1,94 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.tools.checkstyle.checks;
+
+import com.puppycrawl.tools.checkstyle.AbstractModuleTestSupport;
+import com.puppycrawl.tools.checkstyle.Checker;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+import java.io.File;
+import java.util.Arrays;
+
+public class StepVerifierCheckTest extends AbstractModuleTestSupport {
+ private Checker checker;
+
+ @BeforeEach
+ public void prepare() throws Exception {
+ checker = createChecker(createModuleConfig(StepVerifierCheck.class));
+ }
+
+ @AfterEach
+ public void cleanup() {
+ checker.destroy();
+ }
+
+ @Override
+ protected String getPackageLocation() {
+ return "com/azure/tools/checkstyle/checks/StepVerifierCheck";
+ }
+
+ @Test
+ public void noStepVerifierSetDefaultTimeout() throws Exception {
+ File file = TestUtils.createCheckFile("publicClassImplementsPublicApi", Arrays.asList(
+ "package com.azure;",
+ "public class MyTestClass {",
+ "}"
+ ));
+
+ verify(checker, new File[]{file}, file.getAbsolutePath());
+ }
+
+ @Test
+ public void stepVerifierSetDefaultTimeout() throws Exception {
+ File file = TestUtils.createCheckFile("publicClassImplementsPublicApi", Arrays.asList(
+ "package com.azure;",
+ "public class MyTestClass {",
+ " public void test() {",
+ " StepVerifier.setDefaultTimeout(Duration.ofSeconds(10));", // line 4, column 9
+ " }",
+ "}"
+ ));
+
+ String[] expected = new String[] {
+ String.format("%d:%d: %s", 4, 9, StepVerifierCheck.ERROR_MESSAGE)
+ };
+ verify(checker, new File[]{file}, file.getAbsolutePath(), expected);
+ }
+
+ @Test
+ public void stepVerifierStaticImportSetDefaultTimeout() throws Exception {
+ File file = TestUtils.createCheckFile("publicClassImplementsPublicApi", Arrays.asList(
+ "package com.azure;",
+ "import static reactor.test.StepVerifier.setDefaultTimeout;",
+ "public class MyTestClass {",
+ " public void test() {",
+ " setDefaultTimeout(Duration.ofSeconds(10));", // line 5, column 9
+ " }",
+ "}"
+ ));
+
+ String[] expected = new String[] {
+ String.format("%d:%d: %s", 5, 9, StepVerifierCheck.ERROR_MESSAGE)
+ };
+ verify(checker, new File[]{file}, file.getAbsolutePath(), expected);
+ }
+
+ @Test
+ public void stepVerifierFullyQualifierSetDefaultTimeout() throws Exception {
+ File file = TestUtils.createCheckFile("publicClassImplementsPublicApi", Arrays.asList(
+ "package com.azure;",
+ "public class MyTestClass {",
+ " public void test() {",
+ " reactor.test.StepVerifier.setDefaultTimeout(Duration.ofSeconds(10));", // line 4, column 9
+ " }",
+ "}"
+ ));
+
+ String[] expected = new String[] {
+ String.format("%d:%d: %s", 4, 9, StepVerifierCheck.ERROR_MESSAGE)
+ };
+ verify(checker, new File[]{file}, file.getAbsolutePath(), expected);
+ }
+}
diff --git a/eng/common/pipelines/templates/steps/sparse-checkout.yml b/eng/common/pipelines/templates/steps/sparse-checkout.yml
index ab95453954cb..448cb2c2e313 100644
--- a/eng/common/pipelines/templates/steps/sparse-checkout.yml
+++ b/eng/common/pipelines/templates/steps/sparse-checkout.yml
@@ -29,7 +29,7 @@ steps:
if (!$dir) {
$dir = "./$($repository.Name)"
}
- New-Item $dir -ItemType Directory -Force
+ New-Item $dir -ItemType Directory -Force | Out-Null
Push-Location $dir
if (Test-Path .git/info/sparse-checkout) {
@@ -70,9 +70,14 @@ steps:
# sparse-checkout commands after initial checkout will auto-checkout again
if (!$hasInitialized) {
- Write-Host "git -c advice.detachedHead=false checkout $($repository.Commitish)"
+ # Remove refs/heads/ prefix from branch names
+ $commitish = $repository.Commitish -replace '^refs/heads/', ''
+
+ # use -- to prevent git from interpreting the commitish as a path
+ Write-Host "git -c advice.detachedHead=false checkout $commitish --"
+
# This will use the default branch if repo.Commitish is empty
- git -c advice.detachedHead=false checkout $($repository.Commitish)
+ git -c advice.detachedHead=false checkout $commitish --
} else {
Write-Host "Skipping checkout as repo has already been initialized"
}
diff --git a/eng/common/scripts/Get-BuildSourceDescription.ps1 b/eng/common/scripts/Get-BuildSourceDescription.ps1
new file mode 100644
index 000000000000..b0856101538d
--- /dev/null
+++ b/eng/common/scripts/Get-BuildSourceDescription.ps1
@@ -0,0 +1,24 @@
+param(
+ [string]$Variable,
+ [switch]$IsOutput
+)
+
+$repoUrl = $env:BUILD_REPOSITORY_URI
+$sourceBranch = $env:BUILD_SOURCEBRANCH
+
+$description = "[$sourceBranch]($repoUrl/tree/$sourceBranch)"
+if ($sourceBranch -match "^refs/heads/(.+)$") {
+ $description = "Branch: [$($Matches[1])]($repoUrl/tree/$sourceBranch)"
+} elseif ($sourceBranch -match "^refs/tags/(.+)$") {
+ $description = "Tag: [$($Matches[1])]($repoUrl/tree/$sourceBranch)"
+} elseif ($sourceBranch -match "^refs/pull/(\d+)/(head|merge)$") {
+ $description = "Pull request: $repoUrl/pull/$($Matches[1])"
+}
+
+if ($IsOutput) {
+ Write-Host "Setting output variable '$Variable' to '$description'"
+ Write-Host "##vso[task.setvariable variable=$Variable;isoutput=true]$description"
+} else {
+ Write-Host "Setting variable '$Variable' to '$description'"
+ Write-Host "##vso[task.setvariable variable=$Variable]$description"
+}
diff --git a/eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1 b/eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1
new file mode 100644
index 000000000000..5dc0c8c7da1a
--- /dev/null
+++ b/eng/common/scripts/Helpers/CommandInvocation-Helpers.ps1
@@ -0,0 +1,42 @@
+function Invoke-LoggedCommand($Command, $ExecutePath, [switch]$GroupOutput)
+{
+ $pipelineBuild = !!$env:TF_BUILD
+ $startTime = Get-Date
+
+ if($pipelineBuild -and $GroupOutput) {
+ Write-Host "##[group]$Command"
+ } else {
+ Write-Host "> $Command"
+ }
+
+ if($ExecutePath) {
+ Push-Location $ExecutePath
+ }
+
+ try {
+ Invoke-Expression $Command
+
+ $duration = (Get-Date) - $startTime
+
+ if($pipelineBuild -and $GroupOutput) {
+ Write-Host "##[endgroup]"
+ }
+
+ if($LastExitCode -ne 0)
+ {
+ if($pipelineBuild) {
+ Write-Error "##[error]Command failed to execute ($duration): $Command`n"
+ } else {
+ Write-Error "Command failed to execute ($duration): $Command`n"
+ }
+ }
+ else {
+ Write-Host "Command succeeded ($duration)`n"
+ }
+ }
+ finally {
+ if($ExecutePath) {
+ Pop-Location
+ }
+ }
+}
diff --git a/eng/common/scripts/New-RegenerateMatrix.ps1 b/eng/common/scripts/New-RegenerateMatrix.ps1
new file mode 100644
index 000000000000..1df97420c25d
--- /dev/null
+++ b/eng/common/scripts/New-RegenerateMatrix.ps1
@@ -0,0 +1,102 @@
+[CmdLetBinding()]
+param (
+ [Parameter()]
+ [string]$OutputDirectory,
+
+ [Parameter()]
+ [string]$OutputVariableName,
+
+ [Parameter()]
+ [int]$JobCount = 8,
+
+ # The minimum number of items per job. If the number of items is less than this, then the number of jobs will be reduced.
+ [Parameter()]
+ [int]$MinimumPerJob = 10,
+
+ [Parameter()]
+ [string]$OnlyTypespec
+)
+
+. (Join-Path $PSScriptRoot common.ps1)
+
+[bool]$OnlyTypespec = $OnlyTypespec -in @("true", "t", "1", "yes", "y")
+
+# Divide the items into groups of approximately equal size.
+function Split-Items([array]$Items) {
+ # given $Items.Length = 22 and $JobCount = 5
+ # then $itemsPerGroup = 4
+ # and $largeJobCount = 2
+ # and $group.Length = 5, 5, 4, 4, 4
+ $itemCount = $Items.Length
+ $jobsForMinimum = $itemCount -lt $MinimumPerJob ? 1 : [math]::Floor($itemCount / $MinimumPerJob)
+
+ if ($JobCount -gt $jobsForMinimum) {
+ $JobCount = $jobsForMinimum
+ }
+
+ $itemsPerGroup = [math]::Floor($itemCount / $JobCount)
+ $largeJobCount = $itemCount % $itemsPerGroup
+ $groups = [object[]]::new($JobCount)
+
+ $i = 0
+ for ($g = 0; $g -lt $JobCount; $g++) {
+ $groupLength = if ($g -lt $largeJobCount) { $itemsPerGroup + 1 } else { $itemsPerGroup }
+ $group = [object[]]::new($groupLength)
+ $groups[$g] = $group
+ for ($gi = 0; $gi -lt $groupLength; $gi++) {
+ $group[$gi] = $Items[$i++]
+ }
+ }
+
+ Write-Host "$itemCount items split into $JobCount groups of approximately $itemsPerGroup items each."
+
+ return , $groups
+}
+
+# ensure the output directory exists
+New-Item -ItemType Directory -Path $OutputDirectory -Force | Out-Null
+
+if (Test-Path "Function:$GetDirectoriesForGenerationFn") {
+ $directoriesForGeneration = &$GetDirectoriesForGenerationFn
+}
+else {
+ $directoriesForGeneration = Get-ChildItem "$RepoRoot/sdk" -Directory | Get-ChildItem -Directory
+}
+
+if ($OnlyTypespec) {
+ $directoriesForGeneration = $directoriesForGeneration | Where-Object { Test-Path "$_/tsp-location.yaml" }
+}
+
+[array]$packageDirectories = $directoriesForGeneration
+| Sort-Object -Property FullName
+| ForEach-Object {
+ [ordered]@{
+ "PackageDirectory" = "$($_.Parent.Name)/$($_.Name)"
+ "ServiceArea" = $_.Parent.Name
+ }
+}
+
+$batches = Split-Items -Items $packageDirectories
+
+$matrix = [ordered]@{}
+for ($i = 0; $i -lt $batches.Length; $i++) {
+ $batch = $batches[$i]
+ $json = $batch.PackageDirectory | ConvertTo-Json -AsArray
+
+ $firstPrefix = $batch[0].ServiceArea.Substring(0, 2)
+ $lastPrefix = $batch[-1].ServiceArea.Substring(0, 2)
+
+ $key = "$firstPrefix`_$lastPrefix`_$i"
+ $fileName = "$key.json"
+
+ Write-Host "`n`n=================================="
+ Write-Host $fileName
+ Write-Host "=================================="
+ $json | Out-Host
+ $json | Out-File "$OutputDirectory/$fileName"
+
+ $matrix[$key] = [ordered]@{ "JobKey" = $key; "DirectoryList" = $fileName }
+}
+
+$compressed = ConvertTo-Json $matrix -Depth 100 -Compress
+Write-Output "##vso[task.setVariable variable=$OutputVariableName;isOutput=true]$compressed"
diff --git a/eng/common/scripts/Service-Level-Readme-Automation.ps1 b/eng/common/scripts/Service-Level-Readme-Automation.ps1
index e7dcbf7bf5fd..a03e78e4e223 100644
--- a/eng/common/scripts/Service-Level-Readme-Automation.ps1
+++ b/eng/common/scripts/Service-Level-Readme-Automation.ps1
@@ -40,7 +40,10 @@ param(
[string]$ClientSecret,
[Parameter(Mandatory = $false)]
- [string]$ReadmeFolderRoot = "docs-ref-services"
+ [string]$ReadmeFolderRoot = "docs-ref-services",
+
+ [Parameter(Mandatory = $false)]
+ [array]$Monikers = @('latest', 'preview', 'legacy')
)
. $PSScriptRoot/common.ps1
. $PSScriptRoot/Helpers/Service-Level-Readme-Automation-Helpers.ps1
@@ -50,8 +53,7 @@ param(
Set-StrictMode -Version 3
$fullMetadata = Get-CSVMetadata
-$monikers = @("latest", "preview")
-foreach($moniker in $monikers) {
+foreach($moniker in $Monikers) {
# The onboarded packages return is key-value pair, which key is the package index, and value is the package info from {metadata}.json
# E.g.
# Key as: @azure/storage-blob
diff --git a/eng/common/scripts/TypeSpec-Project-Generate.ps1 b/eng/common/scripts/TypeSpec-Project-Generate.ps1
index e323f42aff6d..05a0e0bdfd45 100644
--- a/eng/common/scripts/TypeSpec-Project-Generate.ps1
+++ b/eng/common/scripts/TypeSpec-Project-Generate.ps1
@@ -11,6 +11,7 @@ param (
$ErrorActionPreference = "Stop"
. $PSScriptRoot/Helpers/PSModule-Helpers.ps1
+. $PSScriptRoot/Helpers/CommandInvocation-Helpers.ps1
. $PSScriptRoot/common.ps1
Install-ModuleIfNotInstalled "powershell-yaml" "0.4.1" | Import-Module
@@ -21,38 +22,30 @@ function NpmInstallForProject([string]$workingDirectory) {
Write-Host "Generating from $currentDur"
if (Test-Path "package.json") {
+ Write-Host "Removing existing package.json"
Remove-Item -Path "package.json" -Force
}
if (Test-Path ".npmrc") {
+ Write-Host "Removing existing .nprc"
Remove-Item -Path ".npmrc" -Force
}
if (Test-Path "node_modules") {
+ Write-Host "Removing existing node_modules"
Remove-Item -Path "node_modules" -Force -Recurse
}
if (Test-Path "package-lock.json") {
+ Write-Host "Removing existing package-lock.json"
Remove-Item -Path "package-lock.json" -Force
}
- #default to root/eng/emitter-package.json but you can override by writing
- #Get-${Language}-EmitterPackageJsonPath in your Language-Settings.ps1
$replacementPackageJson = Join-Path $PSScriptRoot "../../emitter-package.json"
- if (Test-Path "Function:$GetEmitterPackageJsonPathFn") {
- $replacementPackageJson = &$GetEmitterPackageJsonPathFn
- }
Write-Host("Copying package.json from $replacementPackageJson")
Copy-Item -Path $replacementPackageJson -Destination "package.json" -Force
-
- #default to root/eng/emitter-package-lock.json but you can override by writing
- #Get-${Language}-EmitterPackageLockPath in your Language-Settings.ps1
$emitterPackageLock = Join-Path $PSScriptRoot "../../emitter-package-lock.json"
- if (Test-Path "Function:$GetEmitterPackageLockPathFn") {
- $emitterPackageLock = &$GetEmitterPackageLockPathFn
- }
-
$usingLockFile = Test-Path $emitterPackageLock
if ($usingLockFile) {
@@ -68,12 +61,10 @@ function NpmInstallForProject([string]$workingDirectory) {
}
if ($usingLockFile) {
- Write-Host "> npm ci"
- npm ci
+ Invoke-LoggedCommand "npm ci"
}
else {
- Write-Host "> npm install"
- npm install
+ Invoke-LoggedCommand "npm install"
}
if ($LASTEXITCODE) { exit $LASTEXITCODE }
diff --git a/eng/common/scripts/Update-DocsMsMetadata.ps1 b/eng/common/scripts/Update-DocsMsMetadata.ps1
index 94aa8c1efe1b..9b665dbc98d3 100644
--- a/eng/common/scripts/Update-DocsMsMetadata.ps1
+++ b/eng/common/scripts/Update-DocsMsMetadata.ps1
@@ -205,7 +205,7 @@ function UpdateDocsMsMetadataForPackage($packageInfoJsonLocation) {
Write-Host "The docs metadata json $packageMetadataName does not exist, creating a new one to docs repo..."
New-Item -ItemType Directory -Path $packageInfoLocation -Force
}
- $packageInfoJson = ConvertTo-Json $packageInfo
+ $packageInfoJson = ConvertTo-Json $packageInfo -Depth 100
Set-Content `
-Path $packageInfoLocation/$packageMetadataName `
-Value $packageInfoJson
diff --git a/eng/common/scripts/Update-DocsMsPackageMonikers.ps1 b/eng/common/scripts/Update-DocsMsPackageMonikers.ps1
new file mode 100644
index 000000000000..f1f282a6b372
--- /dev/null
+++ b/eng/common/scripts/Update-DocsMsPackageMonikers.ps1
@@ -0,0 +1,122 @@
+<#
+.SYNOPSIS
+Move metadata JSON and package-level overview markdown files for deprecated packages to the legacy folder.
+
+.DESCRIPTION
+Move onboarding information to the "legacy" moniker for whose support is "deprecated" in the Metadata CSV.
+Only one version of a package can be documented in the "legacy" moniker. If multiple versions are available,
+the "latest" version will be used and the "preview" version will be deleted.
+
+.PARAMETER DocRepoLocation
+The location of the target docs repository.
+#>
+
+param(
+ [Parameter(Mandatory = $true)]
+ [string] $DocRepoLocation
+)
+
+. (Join-Path $PSScriptRoot common.ps1)
+
+Set-StrictMode -Version 3
+
+function getPackageMetadata($moniker) {
+ $jsonFiles = Get-ChildItem -Path (Join-Path $DocRepoLocation "metadata/$moniker") -Filter *.json
+ $metadata = @{}
+
+ foreach ($jsonFile in $jsonFiles) {
+ $packageMetadata = Get-Content $jsonFile -Raw | ConvertFrom-Json -AsHashtable
+ $packageIdentity = $packageMetadata.Name
+ if (Test-Path "Function:$GetPackageIdentity") {
+ $packageIdentity = &$GetPackageIdentity $packageMetadata
+ }
+
+ $metadata[$packageIdentity] = @{ File = $jsonFile; Metadata = $packageMetadata }
+ }
+
+ return $metadata
+}
+
+function getPackageInfoFromLookup($packageIdentity, $version, $lookupTable) {
+ if ($lookupTable.ContainsKey($packageIdentity)) {
+ if ($lookupTable[$packageIdentity]['Metadata'].Version -eq $version) {
+ # Only return if the version matches
+ return $lookupTable[$packageIdentity]
+ }
+ }
+
+ return $null
+}
+
+function moveToLegacy($packageInfo) {
+ $docsMsMetadata = &$GetDocsMsMetadataForPackageFn -PackageInfo $packageInfo['Metadata']
+
+ Write-Host "Move to legacy: $($packageInfo['Metadata'].Name)"
+ $packageInfoPath = $packageInfo['File']
+ Move-Item "$($packageInfoPath.Directory)/$($packageInfoPath.BaseName).*" "$DocRepoLocation/metadata/legacy/" -Force
+
+ $readmePath = "$DocRepoLocation/$($docsMsMetadata.PreviewReadMeLocation)/$($docsMsMetadata.DocsMsReadMeName)-readme.md"
+ if (Test-Path $readmePath) {
+ Move-Item `
+ $readmePath `
+ "$DocRepoLocation/$($docsMsMetadata.LegacyReadMeLocation)/" `
+ -Force
+ }
+}
+
+function deletePackageInfo($packageInfo) {
+ $docsMsMetadata = &$GetDocsMsMetadataForPackageFn -PackageInfo $packageInfo['Metadata']
+
+ Write-Host "Delete superseded package: $($packageInfo['Metadata'].Name)"
+ $packageInfoPath = $packageInfo['File']
+ Remove-Item "$($packageInfoPath.Directory)/$($packageInfoPath.BaseName).*" -Force
+
+ $readmePath = "$DocRepoLocation/$($docsMsMetadata.PreviewReadMeLocation)/$($docsMsMetadata.DocsMsReadMeName)-readme.md"
+ if (Test-Path $readmePath) {
+ Remove-Item $readmePath -Force
+ }
+}
+
+$metadataLookup = @{
+ 'latest' = getPackageMetadata 'latest'
+ 'preview' = getPackageMetadata 'preview'
+}
+$deprecatedPackages = (Get-CSVMetadata).Where({ $_.Support -eq 'deprecated' })
+
+foreach ($package in $deprecatedPackages) {
+ $packageIdentity = $package.Package
+ if (Test-Path "Function:$GetPackageIdentityFromCsvMetadata") {
+ $packageIdentity = &$GetPackageIdentityFromCsvMetadata $package
+ }
+
+ $packageInfoPreview = $packageInfoLatest = $null
+ if ($package.VersionPreview) {
+ $packageInfoPreview = getPackageInfoFromLookup `
+ -packageIdentity $packageIdentity `
+ -version $package.VersionPreview `
+ -lookupTable $metadataLookup['preview']
+ }
+
+ if ($package.VersionGA) {
+ $packageInfoLatest = getPackageInfoFromLookup `
+ -packageIdentity $packageIdentity `
+ -version $package.VersionGA `
+ -lookupTable $metadataLookup['latest']
+ }
+
+ if (!$packageInfoPreview -and !$packageInfoLatest) {
+ # Nothing to move or delete
+ continue
+ }
+
+ if ($packageInfoPreview -and $packageInfoLatest) {
+ # Delete metadata JSON and package-level overview markdown files for
+ # the preview version instead of moving both. This mitigates situations
+ # where the "latest" verison doesn't have a package-level overview
+ # markdown file and the "preview" version does.
+ deletePackageInfo $packageInfoPreview
+ moveToLegacy $packageInfoLatest
+ } else {
+ moveToLegacy ($packageInfoPreview ?? $packageInfoLatest)
+ }
+}
diff --git a/eng/common/scripts/Update-GeneratedSdks.ps1 b/eng/common/scripts/Update-GeneratedSdks.ps1
new file mode 100644
index 000000000000..dd671f6d8ad8
--- /dev/null
+++ b/eng/common/scripts/Update-GeneratedSdks.ps1
@@ -0,0 +1,16 @@
+[CmdLetBinding()]
+param(
+ [Parameter(Mandatory)]
+ [string]$PackageDirectoriesFile
+)
+
+. $PSScriptRoot/common.ps1
+. $PSScriptRoot/Helpers/CommandInvocation-Helpers.ps1
+
+$ErrorActionPreference = 'Stop'
+
+if (Test-Path "Function:$UpdateGeneratedSdksFn") {
+ &$UpdateGeneratedSdksFn $PackageDirectoriesFile
+} else {
+ Write-Error "Function $UpdateGeneratedSdksFn not implemented in Language-Settings.ps1"
+}
diff --git a/eng/common/scripts/common.ps1 b/eng/common/scripts/common.ps1
index e6b5f09fe7c8..cef0b23c5620 100644
--- a/eng/common/scripts/common.ps1
+++ b/eng/common/scripts/common.ps1
@@ -60,10 +60,11 @@ $GetPackageLevelReadmeFn = "Get-${Language}-PackageLevelReadme"
$GetRepositoryLinkFn = "Get-${Language}-RepositoryLink"
$GetEmitterAdditionalOptionsFn = "Get-${Language}-EmitterAdditionalOptions"
$GetEmitterNameFn = "Get-${Language}-EmitterName"
-$GetEmitterPackageJsonPathFn = "Get-${Language}-EmitterPackageJsonPath"
-$GetEmitterPackageLockPathFn = "Get-${Language}-EmitterPackageLockPath"
+$GetDirectoriesForGenerationFn = "Get-${Language}-DirectoriesForGeneration"
+$UpdateGeneratedSdksFn = "Update-${Language}-GeneratedSdks"
# Expected to be set in eng/scripts/docs/Docs-Onboarding.ps1
$SetDocsPackageOnboarding = "Set-${Language}-DocsPackageOnboarding"
$GetDocsPackagesAlreadyOnboarded = "Get-${Language}-DocsPackagesAlreadyOnboarded"
$GetPackageIdentity = "Get-${Language}-PackageIdentity"
+$GetPackageIdentityFromCsvMetadata = "Get-${Language}-PackageIdentityFromCsvMetadata"
diff --git a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1 b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1
index 8abaa40d0cb4..61d8f947d800 100644
--- a/eng/common/scripts/stress-testing/deploy-stress-tests.ps1
+++ b/eng/common/scripts/stress-testing/deploy-stress-tests.ps1
@@ -31,7 +31,10 @@ param(
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
[Parameter(Mandatory=$False)][array]$MatrixFilters,
[Parameter(Mandatory=$False)][array]$MatrixReplace,
- [Parameter(Mandatory=$False)][array]$MatrixNonSparseParameters
+ [Parameter(Mandatory=$False)][array]$MatrixNonSparseParameters,
+
+ # Prevent kubernetes from deleting nodes or rebalancing pods related to this test for N days
+ [Parameter(Mandatory=$False)][ValidateRange(1, 14)][int]$LockDeletionForDays
)
. $PSScriptRoot/stress-test-deployment-lib.ps1
diff --git a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1 b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
index bdaec9e711a9..dde43649a391 100644
--- a/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
+++ b/eng/common/scripts/stress-testing/stress-test-deployment-lib.ps1
@@ -59,7 +59,7 @@ function Login([string]$subscription, [string]$clusterGroup, [switch]$skipPushIm
$kubeContext = (RunOrExitOnFailure kubectl config view -o json) | ConvertFrom-Json -AsHashtable
$defaultNamespace = $null
$targetContext = $kubeContext.contexts.Where({ $_.name -eq $clusterName }) | Select -First 1
- if ($targetContext -ne $null -and $targetContext.PSObject.Properties.Name -match "namespace") {
+ if ($targetContext -ne $null -and $targetContext.Contains('context') -and $targetContext.context.Contains('namespace')) {
$defaultNamespace = $targetContext.context.namespace
}
@@ -107,7 +107,8 @@ function DeployStressTests(
[Parameter(Mandatory=$False)][string]$MatrixDisplayNameFilter,
[Parameter(Mandatory=$False)][array]$MatrixFilters,
[Parameter(Mandatory=$False)][array]$MatrixReplace,
- [Parameter(Mandatory=$False)][array]$MatrixNonSparseParameters
+ [Parameter(Mandatory=$False)][array]$MatrixNonSparseParameters,
+ [Parameter(Mandatory=$False)][int]$LockDeletionForDays
) {
if ($environment -eq 'pg') {
if ($clusterGroup -or $subscription) {
@@ -168,7 +169,7 @@ function DeployStressTests(
-subscription $subscription
}
- if ($FailedCommands.Count -lt $pkgs.Count) {
+ if ($FailedCommands.Count -lt $pkgs.Count -and !$Template) {
Write-Host "Releases deployed by $deployer"
Run helm list --all-namespaces -l deployId=$deployer
}
@@ -211,12 +212,14 @@ function DeployStressPackage(
}
$imageTagBase += "/$($pkg.Namespace)/$($pkg.ReleaseName)"
- Write-Host "Creating namespace $($pkg.Namespace) if it does not exist..."
- kubectl create namespace $pkg.Namespace --dry-run=client -o yaml | kubectl apply -f -
- if ($LASTEXITCODE) {exit $LASTEXITCODE}
- Write-Host "Adding default resource requests to namespace/$($pkg.Namespace)"
- $limitRangeSpec | kubectl apply -n $pkg.Namespace -f -
- if ($LASTEXITCODE) {exit $LASTEXITCODE}
+ if (!$Template) {
+ Write-Host "Creating namespace $($pkg.Namespace) if it does not exist..."
+ kubectl create namespace $pkg.Namespace --dry-run=client -o yaml | kubectl apply -f -
+ if ($LASTEXITCODE) {exit $LASTEXITCODE}
+ Write-Host "Adding default resource requests to namespace/$($pkg.Namespace)"
+ $limitRangeSpec | kubectl apply -n $pkg.Namespace -f -
+ if ($LASTEXITCODE) {exit $LASTEXITCODE}
+ }
$dockerBuildConfigs = @()
@@ -317,8 +320,18 @@ function DeployStressPackage(
$generatedConfigPath = Join-Path $pkg.Directory generatedValues.yaml
$subCommand = $Template ? "template" : "upgrade"
- $installFlag = $Template ? "" : "--install"
- $helmCommandArg = "helm", $subCommand, $releaseName, $pkg.Directory, "-n", $pkg.Namespace, $installFlag, "--set", "stress-test-addons.env=$environment", "--values", $generatedConfigPath
+ $subCommandFlag = $Template ? "--debug" : "--install"
+ $helmCommandArg = "helm", $subCommand, $releaseName, $pkg.Directory, "-n", $pkg.Namespace, $subCommandFlag, "--values", $generatedConfigPath, "--set", "stress-test-addons.env=$environment"
+
+ if ($LockDeletionForDays) {
+ $date = (Get-Date).AddDays($LockDeletionForDays).ToUniversalTime()
+ $isoDate = $date.ToString("o")
+ # Tell kubernetes job to run only on this specific future time. Technically it will run once per year.
+ $cron = "$($date.Minute) $($date.Hour) $($date.Day) $($date.Month) *"
+
+ Write-Host "PodDisruptionBudget will be set to prevent deletion until $isoDate"
+ $helmCommandArg += "--set", "PodDisruptionBudgetExpiry=$($isoDate)", "--set", "PodDisruptionBudgetExpiryCron=$cron"
+ }
$result = (Run @helmCommandArg) 2>&1 | Write-Host
@@ -342,7 +355,7 @@ function DeployStressPackage(
# Helm 3 stores release information in kubernetes secrets. The only way to add extra labels around
# specific releases (thereby enabling filtering on `helm list`) is to label the underlying secret resources.
# There is not currently support for setting these labels via the helm cli.
- if(!$Template) {
+ if (!$Template) {
$helmReleaseConfig = RunOrExitOnFailure kubectl get secrets `
-n $pkg.Namespace `
-l "status=deployed,name=$releaseName" `
diff --git a/eng/common/testproxy/target_version.txt b/eng/common/testproxy/target_version.txt
index eaeb3436b8d8..49c8aea654f1 100644
--- a/eng/common/testproxy/target_version.txt
+++ b/eng/common/testproxy/target_version.txt
@@ -1 +1 @@
-1.0.0-dev.20230818.1
+1.0.0-dev.20230912.4
diff --git a/eng/emitter-package.json b/eng/emitter-package.json
index ccf78420f433..c48cf55f3056 100644
--- a/eng/emitter-package.json
+++ b/eng/emitter-package.json
@@ -1,6 +1,6 @@
{
"main": "dist/src/index.js",
"dependencies": {
- "@azure-tools/typespec-java": "0.8.11"
+ "@azure-tools/typespec-java": "0.8.13"
}
-}
\ No newline at end of file
+}
diff --git a/eng/jacoco-test-coverage/CHANGELOG.md b/eng/jacoco-test-coverage/CHANGELOG.md
deleted file mode 100644
index 4d28c9afbfe3..000000000000
--- a/eng/jacoco-test-coverage/CHANGELOG.md
+++ /dev/null
@@ -1,5 +0,0 @@
-# Release History
-
-## 1.0.0-SNAPSHOT (Unreleased)
-
-
diff --git a/eng/jacoco-test-coverage/README.md b/eng/jacoco-test-coverage/README.md
deleted file mode 100644
index 56ddda8e4e3d..000000000000
--- a/eng/jacoco-test-coverage/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Microsoft Azure Client Library - Test coverage
-Nothing exciting to see here, this just aggregates the modules for reporting purposes.
\ No newline at end of file
diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
deleted file mode 100644
index 727496176aab..000000000000
--- a/eng/jacoco-test-coverage/pom.xml
+++ /dev/null
@@ -1,644 +0,0 @@
-
-
-
-
-
- 4.0.0
-
-
- com.azure
- azure-client-sdk-parent
- 1.7.0
- ../../sdk/parents/azure-client-sdk-parent
-
-
- com.azure
- jacoco-test-coverage
- 1.0.0-SNAPSHOT
-
- Microsoft Azure Client Library - Test coverage
- Package for generating test coverage report for Azure Client Libraries
- https://github.com/Azure/azure-sdk-for-java
-
-
-
- azure-java-build-docs
- ${site.url}/site/${project.artifactId}
-
-
-
-
- scm:git:https://github.com/Azure/azure-sdk-for-java
- scm:git:git@github.com:Azure/azure-sdk-for-java.git
- HEAD
-
-
-
- ../..
-
-
-
-
- com.azure
- azure-ai-anomalydetector
- 3.0.0-beta.6
-
-
- com.azure
- azure-ai-formrecognizer
- 4.2.0-beta.1
-
-
- com.azure
- azure-ai-personalizer
- 1.0.0-beta.2
-
-
- com.azure
- azure-ai-metricsadvisor
- 1.2.0-beta.1
-
-
- com.azure
- azure-ai-textanalytics
- 5.4.0-beta.1
-
-
- com.azure
- azure-communication-chat
- 1.4.0-beta.1
-
-
- com.azure
- azure-communication-common
- 2.0.0-beta.2
-
-
- com.azure
- azure-communication-identity
- 1.5.0-beta.1
-
-
- com.azure
- azure-communication-networktraversal
- 1.1.0-beta.3
-
-
- com.azure
- azure-communication-sms
- 1.2.0-beta.1
-
-
- com.azure
- azure-communication-phonenumbers
- 1.2.0-beta.1
-
-
- com.azure
- azure-communication-callingserver
- 1.0.0-beta.5
-
-
- com.azure
- azure-containers-containerregistry
- 1.3.0-beta.1
-
-
- com.azure
- azure-analytics-synapse-accesscontrol
- 1.0.0-beta.5
-
-
- com.azure
- azure-analytics-synapse-artifacts
- 1.0.0-beta.14
-
-
- com.azure
- azure-analytics-synapse-spark
- 1.0.0-beta.6
-
-
- com.azure
- azure-core
- 1.44.0-beta.1
-
-
- com.azure
- azure-core-amqp
- 2.9.0-beta.6
-
-
- com.azure
- azure-core-amqp-experimental
- 1.0.0-beta.1
-
-
- com.azure
- azure-core-experimental
- 1.0.0-beta.44
-
-
- com.azure
- azure-core-http-jdk-httpclient
- 1.0.0-beta.7
-
-
- com.azure
- azure-core-http-netty
- 1.14.0-beta.2
-
-
- com.azure
- azure-core-http-okhttp
- 1.12.0-beta.1
-
-
- com.azure
- azure-core-management
- 1.12.0-beta.1
-
-
- com.azure
- azure-core-serializer-avro-apache
- 1.0.0-beta.40
-
-
- com.azure
- azure-core-serializer-json-gson
- 1.3.0-beta.1
-
-
- com.azure
- azure-core-serializer-json-jackson
- 1.5.0-beta.1
-
-
- com.azure
- azure-core-tracing-opentelemetry
- 1.0.0-beta.40
-
-
- com.azure
- azure-cosmos
- 4.50.0-beta.1
-
-
- com.azure
- azure-cosmos-encryption
- 2.5.0-beta.1
-
-
- com.azure
- azure-data-appconfiguration
- 1.5.0-beta.2
-
-
- com.azure
- azure-data-schemaregistry
- 1.4.0-beta.3
-
-
- com.azure
- azure-data-schemaregistry-apacheavro
- 1.2.0-beta.3
-
-
- com.azure
- azure-data-tables
- 12.4.0-beta.1
-
-
- com.azure
- azure-identity
- 1.11.0-beta.1
-
-
- com.azure
- azure-identity-extensions
- 1.2.0-beta.2
-
-
- com.azure
- azure-iot-deviceupdate
- 1.1.0-beta.1
-
-
- com.azure
- azure-json
- 1.2.0-beta.1
-
-
- com.azure
- azure-messaging-eventgrid
- 4.18.0-beta.1
-
-
- com.azure
- azure-messaging-eventgrid-cloudnative-cloudevents
- 1.0.0-beta.2
-
-
- com.azure
- azure-messaging-eventhubs
- 5.16.0-beta.2
-
-
- com.azure
- azure-messaging-eventhubs-checkpointstore-blob
- 1.17.0-beta.2
-
-
- com.azure
- azure-messaging-servicebus
- 7.15.0-beta.4
-
-
- com.azure
- azure-messaging-webpubsub
- 1.3.0-beta.1
-
-
- com.azure
- azure-monitor-ingestion
- 1.1.0-beta.1
-
-
- com.azure
- azure-monitor-opentelemetry-exporter
- 1.0.0-beta.12
-
-
- com.azure
- azure-monitor-query
- 1.3.0-beta.2
-
-
- com.azure
- azure-search-documents
- 11.6.0-beta.9
-
-
- com.azure
- azure-security-keyvault-administration
- 4.4.0-beta.1
-
-
- com.azure
- azure-security-keyvault-certificates
- 4.6.0-beta.1
-
-
- com.azure
- azure-security-keyvault-jca
- 2.8.0-beta.1
-
-
- com.azure
- azure-security-keyvault-keys
- 4.7.0-beta.1
-
-
- com.azure
- azure-security-keyvault-secrets
- 4.7.0-beta.1
-
-
- com.azure
- azure-storage-common
- 12.23.0
-
-
- com.azure
- azure-storage-blob
- 12.24.0
-
-
- com.azure
- azure-storage-blob-batch
- 12.20.0
-
-
- com.azure
- azure-storage-blob-changefeed
- 12.0.0-beta.19
-
-
- com.azure
- azure-storage-blob-cryptography
- 12.23.0
-
-
- com.azure
- azure-storage-blob-nio
- 12.0.0-beta.20
-
-
- com.azure
- azure-storage-file-share
- 12.20.0
-
-
- com.azure
- azure-storage-file-datalake
- 12.17.0
-
-
- com.azure
- azure-storage-internal-avro
- 12.9.0
-
-
- com.azure
- azure-storage-queue
- 12.19.0
-
-
- com.azure
- azure-sdk-template
- 1.2.2-beta.1
-
-
- com.azure
- azure-sdk-template-two
- 1.0.0-beta.1
-
-
- com.azure
- azure-sdk-template-three
- 1.0.0-beta.1
-
-
- com.azure
- azure-xml
- 1.0.0-beta.3
-
-
-
- com.azure.resourcemanager
- azure-resourcemanager
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-appplatform
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-appservice
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-authorization
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-compute
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-containerinstance
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-containerregistry
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-containerservice
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-cosmos
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-dns
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-keyvault
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-monitor
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-msi
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-network
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-resources
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-sql
- 2.31.0-beta.1
-
-
- com.azure.resourcemanager
- azure-resourcemanager-storage
- 2.31.0-beta.1
-
-
-
- com.azure.spring
- spring-cloud-azure-core
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-resourcemanager
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-messaging-azure
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-messaging-azure-eventhubs
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-messaging-azure-servicebus
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-messaging-azure-storage-queue
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-integration-azure-core
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-integration-azure-eventhubs
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-integration-azure-servicebus
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-integration-azure-storage-queue
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-autoconfigure
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-stream-binder-servicebus-core
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-stream-binder-servicebus
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-stream-binder-eventhubs
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-stream-binder-eventhubs-core
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-service
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-trace-sleuth
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-actuator
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-actuator-autoconfigure
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-appconfiguration-config
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-appconfiguration-config-web
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-feature-management
- 4.12.0-beta.1
-
-
- com.azure.spring
- spring-cloud-azure-feature-management-web
- 4.12.0-beta.1
-
-
- com.azure
- azure-spring-data-cosmos
- 3.39.0-beta.1
-
-
- com.azure
- azure-digitaltwins-core
- 1.4.0-beta.1
-
-
- com.azure
- azure-mixedreality-authentication
- 1.3.0-beta.1
-
-
- com.azure
- azure-mixedreality-remoterendering
- 1.2.0-beta.1
-
-
-
-
-
- org.apache.maven.plugins
- maven-enforcer-plugin
- 3.0.0-M3
-
-
-
-
-
- com.azure:azure-monitor-opentelemetry-exporter:[1.0.0-beta.12]
-
-
-
-
-
-
-
- org.jacoco
- jacoco-maven-plugin
- 0.8.9
-
-
- report-aggregate
- verify
-
- report-aggregate
-
-
- ${project.reporting.outputDirectory}/test-coverage
-
- **/com/azure/cosmos/implementation/apachecommons/**/*
- **/com/azure/cosmos/implementation/guava25/**/*
- **/com/azure/cosmos/implementation/guava27/**/*
- **/com/azure/cosmos/encryption/implementation/mdesrc/**/*
-
-
-
-
-
-
-
-
diff --git a/eng/mgmt/automation/api-specs.yaml b/eng/mgmt/automation/api-specs.yaml
index 85aa6c8f40f4..4151d28f7a81 100644
--- a/eng/mgmt/automation/api-specs.yaml
+++ b/eng/mgmt/automation/api-specs.yaml
@@ -96,6 +96,8 @@ service-map:
service: servicemap
servicebus:
suffix: generated
+solutions:
+ service: managedapplications
sql:
suffix: generated
storage:
diff --git a/eng/mgmt/automation/generation.yml b/eng/mgmt/automation/generation.yml
index f3da9df30783..d1423af5d341 100644
--- a/eng/mgmt/automation/generation.yml
+++ b/eng/mgmt/automation/generation.yml
@@ -33,6 +33,7 @@ steps:
# - template: /eng/common/testproxy/test-proxy-tool.yml
# parameters:
# runProxy: true
+# targetVersion: 1.0.0-dev.20230908.1
- bash: |
export PATH=$JAVA_HOME_11_X64/bin:$PATH
diff --git a/eng/mgmt/automation/parameters.py b/eng/mgmt/automation/parameters.py
index 3517a28ce121..6be41d6089b0 100644
--- a/eng/mgmt/automation/parameters.py
+++ b/eng/mgmt/automation/parameters.py
@@ -16,7 +16,7 @@
SDK_ROOT = '../../../' # related to file dir
AUTOREST_CORE_VERSION = '3.9.7'
-AUTOREST_JAVA = '@autorest/java@4.1.19'
+AUTOREST_JAVA = '@autorest/java@4.1.21'
DEFAULT_VERSION = '1.0.0-beta.1'
GROUP_ID = 'com.azure.resourcemanager'
API_SPECS_FILE = 'api-specs.yaml'
diff --git a/eng/pipelines/docindex.yml b/eng/pipelines/docindex.yml
index bab1ffefc82d..55720dd2989a 100644
--- a/eng/pipelines/docindex.yml
+++ b/eng/pipelines/docindex.yml
@@ -33,7 +33,15 @@ jobs:
ContainerRegistryClientId: $(azuresdkimages-cr-clientid)
ContainerRegistryClientSecret: $(azuresdkimages-cr-clientsecret)
ImageId: "$(DocValidationImageId)"
- # Call update docs ci script to onboard packages
+
+ - task: Powershell@2
+ inputs:
+ pwsh: true
+ filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
+ arguments: -DocRepoLocation $(DocRepoLocation)
+ displayName: Move deprecated packages to legacy moniker
+ condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
+
- task: Powershell@2
inputs:
pwsh: true
@@ -116,6 +124,15 @@ jobs:
Copy-Item "./eng/repo-docs/docms/daily.update.setting.xml" -Destination "~/.m2/settings.xml"
displayName: 'Configure mvn'
workingDirectory: $(Build.SourcesDirectory)
+
+ - task: Powershell@2
+ inputs:
+ pwsh: true
+ filePath: eng/common/scripts/Update-DocsMsPackageMonikers.ps1
+ arguments: -DocRepoLocation $(DocRepoLocation)
+ displayName: Move deprecated packages to legacy moniker
+ condition: and(succeeded(), or(eq(variables['Build.Reason'], 'Schedule'), eq(variables['Force.MainUpdate'], 'true')))
+
- task: Powershell@2
inputs:
pwsh: true
diff --git a/eng/pipelines/templates/jobs/ci.tests.yml b/eng/pipelines/templates/jobs/ci.tests.yml
index ad166aef6c77..0e23dacfb1d3 100644
--- a/eng/pipelines/templates/jobs/ci.tests.yml
+++ b/eng/pipelines/templates/jobs/ci.tests.yml
@@ -79,10 +79,6 @@ jobs:
parameters:
runProxy: true
- - template: /eng/pipelines/templates/steps/restore-test-proxy-recordings.yml
- parameters:
- Paths: $(SparseCheckoutDirectories)
-
- pwsh: |
$files = Get-ChildItem -Path $(Build.SourcesDirectory) -Filter test-proxy.log
foreach($file in $files){
diff --git a/eng/pipelines/templates/jobs/ci.versions.tests.yml b/eng/pipelines/templates/jobs/ci.versions.tests.yml
index b4f9cf4d6f61..5fc0caeb8ab8 100644
--- a/eng/pipelines/templates/jobs/ci.versions.tests.yml
+++ b/eng/pipelines/templates/jobs/ci.versions.tests.yml
@@ -69,10 +69,6 @@ jobs:
parameters:
runProxy: true
- - template: /eng/pipelines/templates/steps/restore-test-proxy-recordings.yml
- parameters:
- Paths: $(SparseCheckoutDirectories)
-
- pwsh: |
$files = Get-ChildItem -Path $(Build.SourcesDirectory) -Filter test-proxy.log
foreach($file in $files){
diff --git a/eng/pipelines/templates/steps/restore-test-proxy-recordings.yml b/eng/pipelines/templates/steps/restore-test-proxy-recordings.yml
deleted file mode 100644
index 3156a393267c..000000000000
--- a/eng/pipelines/templates/steps/restore-test-proxy-recordings.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-parameters:
- - name: Paths
- type: object
- default: []
-
-steps:
- - task: PowerShell@2
- displayName: 'Restore Test Proxy Recordings'
- inputs:
- targetType: inline
- script: |
- $paths = '${{ convertToJson(parameters.Paths) }}'.Trim('"') | ConvertFrom-Json
- foreach($path in $paths) {
- Get-ChildItem -Recurse -Path $(Build.SourcesDirectory)$path -Filter assets.json | ForEach-Object { test-proxy restore -a $_.FullName }
- }
- pwsh: true
diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1
index c491b5afd330..48e53e584c30 100644
--- a/eng/scripts/Language-Settings.ps1
+++ b/eng/scripts/Language-Settings.ps1
@@ -741,6 +741,7 @@ function Get-java-DocsMsMetadataForPackage($PackageInfo) {
DocsMsReadMeName = $readmeName
LatestReadMeLocation = 'docs-ref-services/latest'
PreviewReadMeLocation = 'docs-ref-services/preview'
+ LegacyReadMeLocation = 'docs-ref-services/legacy'
Suffix = ''
}
}
diff --git a/eng/scripts/TypeSpec-Compare-CurrentToCodegeneration.ps1 b/eng/scripts/TypeSpec-Compare-CurrentToCodegeneration.ps1
index e05014b1f0a4..87f48d77bff1 100644
--- a/eng/scripts/TypeSpec-Compare-CurrentToCodegeneration.ps1
+++ b/eng/scripts/TypeSpec-Compare-CurrentToCodegeneration.ps1
@@ -43,7 +43,7 @@ Verify no diff
"
# prevent warning related to EOL differences which triggers an exception for some reason
-git -c core.safecrlf=false diff --ignore-space-at-eol --exit-code -- "*.java"
+git -c core.safecrlf=false diff --ignore-space-at-eol --exit-code -- "*.java" ":(exclude)**/src/test/**" ":(exclude)**/src/samples/**"
if ($LastExitCode -ne 0) {
$status = git status -s | Out-String
diff --git a/eng/scripts/docs/Docs-Onboarding.ps1 b/eng/scripts/docs/Docs-Onboarding.ps1
index eefb6c418936..e00958605ac2 100644
--- a/eng/scripts/docs/Docs-Onboarding.ps1
+++ b/eng/scripts/docs/Docs-Onboarding.ps1
@@ -1,12 +1,5 @@
#$SetDocsPackageOnboarding = "Set-${Language}-DocsPackageOnboarding"
function Set-java-DocsPackageOnboarding($moniker, $metadata, $docRepoLocation, $packageSourceOverride) {
-
- # Do not write onboarding information for legacy moniker
- # TODO: remove this once legacy moniker is properly configured
- if ($moniker -eq 'legacy') {
- return
- }
-
$packageJsonPath = Join-Path $docRepoLocation "package.json"
$onboardingInfo = Get-Content $packageJsonPath | ConvertFrom-Json
@@ -64,3 +57,9 @@ function Get-java-DocsPackagesAlreadyOnboarded($docRepoLocation, $moniker) {
function Get-java-PackageIdentity($package) {
return "$($package['Group']):$($package['Name'])"
}
+
+# Declared in common.ps1 as
+# $GetPackageIdentityFromCsvMetadata = "Get-${Language}-PackageIdentityFromCsvMetadata"
+function Get-java-PackageIdentityFromCsvMetadata($package) {
+ return "$($package.GroupId):$($Package.Package)"
+}
\ No newline at end of file
diff --git a/eng/scripts/docs/Docs-ToC.ps1 b/eng/scripts/docs/Docs-ToC.ps1
index 3152853a0e37..03c68676ed28 100644
--- a/eng/scripts/docs/Docs-ToC.ps1
+++ b/eng/scripts/docs/Docs-ToC.ps1
@@ -15,13 +15,12 @@ function Get-java-OnboardedDocsMsPackagesForMoniker ($DocRepoLocation, $moniker)
$onboardingSpec = ConvertFrom-Json (Get-Content $packageOnboardingFiles -Raw)
if ("preview" -eq $moniker) {
$onboardingSpec = $onboardingSpec | Where-Object { $_.output_path -eq "preview/docs-ref-autogen" }
- }
- elseif("latest" -eq $moniker) {
+ } elseif("latest" -eq $moniker) {
$onboardingSpec = $onboardingSpec | Where-Object { $_.output_path -eq "docs-ref-autogen" }
+ } elseif ("legacy" -eq $moniker) {
+ $onboardingSpec = $onboardingSpec | Where-Object { $_.output_path -eq "legacy/docs-ref-autogen" }
}
- # TODO: Add support for "legacy" moniker
-
$onboardedPackages = @{}
foreach ($spec in $onboardingSpec.packages) {
$packageName = $spec.packageArtifactId
diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt
index 8e23faf7e4bc..b8601cb632a3 100644
--- a/eng/versioning/external_dependencies.txt
+++ b/eng/versioning/external_dependencies.txt
@@ -200,7 +200,6 @@ io.opentelemetry:opentelemetry-sdk;1.28.0
io.opentelemetry:opentelemetry-sdk-metrics;1.28.0
io.opentelemetry:opentelemetry-sdk-logs;1.28.0
io.opentelemetry:opentelemetry-exporter-logging;1.28.0
-io.opentelemetry:opentelemetry-exporter-jaeger;1.28.0
io.opentelemetry:opentelemetry-exporter-otlp;1.28.0
io.opentelemetry:opentelemetry-api-logs;1.26.0-alpha
io.opentelemetry:opentelemetry-sdk-testing;1.28.0
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 5edd65e6bdb7..c0d432746ea1 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -37,18 +37,20 @@ com.azure:azure-sdk-all;1.0.0;1.0.0
com.azure:azure-sdk-parent;1.6.0;1.6.0
com.azure:azure-client-sdk-parent;1.7.0;1.7.0
com.azure:azure-ai-anomalydetector;3.0.0-beta.5;3.0.0-beta.6
+com.azure:azure-ai-contentsafety;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-ai-documenttranslator;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-ai-formrecognizer;4.1.0;4.2.0-beta.1
+com.azure:azure-ai-formrecognizer;4.1.1;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-metricsadvisor;1.1.17;1.2.0-beta.1
+com.azure:azure-ai-metricsadvisor;1.1.18;1.2.0-beta.1
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.4;1.0.0-beta.5
+com.azure:azure-ai-openai;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-ai-personalizer;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-ai-textanalytics;5.3.2;5.4.0-beta.1
+com.azure:azure-ai-textanalytics;5.3.3;5.4.0-beta.1
com.azure:azure-ai-textanalytics-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-translation-text;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-analytics-purview-catalog;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-analytics-purview-scanning;1.0.0-beta.2;1.0.0-beta.3
+com.azure:azure-analytics-purview-sharing;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-analytics-purview-administration;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-analytics-purview-workflow;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-analytics-synapse-accesscontrol;1.0.0-beta.4;1.0.0-beta.5
@@ -61,18 +63,19 @@ com.azure:azure-aot-graalvm-support-netty;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-aot-graalvm-samples;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-aot-graalvm-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-code-customization-parent;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-communication-chat;1.3.11;1.4.0-beta.1
+com.azure:azure-communication-callautomation;1.0.4;1.1.0-beta.1
com.azure:azure-communication-callingserver;1.0.0-beta.4;1.0.0-beta.5
-com.azure:azure-communication-callautomation;1.0.3;1.1.0-beta.1
-com.azure:azure-communication-common;1.2.11;2.0.0-beta.2
+com.azure:azure-communication-chat;1.3.12;1.4.0-beta.1
+com.azure:azure-communication-common;1.2.12;2.0.0-beta.2
com.azure:azure-communication-common-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-communication-sms;1.1.16;1.2.0-beta.1
-com.azure:azure-communication-identity;1.4.9;1.5.0-beta.1
-com.azure:azure-communication-phonenumbers;1.1.5;1.2.0-beta.1
-com.azure:azure-communication-networktraversal;1.1.0-beta.2;1.1.0-beta.3
+com.azure:azure-communication-email;1.0.6;1.1.0-beta.1
+com.azure:azure-communication-identity;1.4.10;1.5.0-beta.1
com.azure:azure-communication-jobrouter;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-communication-rooms;1.0.3;1.1.0-beta.1
-com.azure:azure-containers-containerregistry;1.2.0;1.3.0-beta.1
+com.azure:azure-communication-networktraversal;1.1.0-beta.2;1.1.0-beta.3
+com.azure:azure-communication-phonenumbers;1.1.6;1.2.0-beta.1
+com.azure:azure-communication-rooms;1.0.4;1.1.0-beta.1
+com.azure:azure-communication-sms;1.1.17;1.2.0-beta.1
+com.azure:azure-containers-containerregistry;1.2.1;1.3.0-beta.1
com.azure:azure-containers-containerregistry-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-core;1.43.0;1.44.0-beta.1
com.azure:azure-core-amqp;2.8.9;2.9.0-beta.6
@@ -93,33 +96,38 @@ com.azure:azure-core-test;1.20.0;1.21.0-beta.1
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.39;1.0.0-beta.40
com.azure:azure-core-tracing-opentelemetry-samples;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-core-version-tests;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-cosmos;4.49.0;4.50.0-beta.1
+com.azure:azure-cosmos;4.50.0;4.51.0-beta.1
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-dotnet-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure.cosmos.spark:azure-cosmos-spark_3_2-12;1.0.0-beta.1;1.0.0-beta.1
-com.azure.cosmos.spark:azure-cosmos-spark_3-1_2-12;4.21.1;4.22.0-beta.1
-com.azure.cosmos.spark:azure-cosmos-spark_3-2_2-12;4.21.1;4.22.0-beta.1
-com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.21.1;4.22.0-beta.1
-com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.21.1;4.22.0-beta.1
-com.azure:azure-cosmos-encryption;2.4.0;2.5.0-beta.1
+com.azure.cosmos.spark:azure-cosmos-spark_3-1_2-12;4.22.0;4.23.0-beta.1
+com.azure.cosmos.spark:azure-cosmos-spark_3-2_2-12;4.22.0;4.23.0-beta.1
+com.azure.cosmos.spark:azure-cosmos-spark_3-3_2-12;4.22.0;4.23.0-beta.1
+com.azure.cosmos.spark:azure-cosmos-spark_3-4_2-12;4.22.0;4.23.0-beta.1
+com.azure:azure-cosmos-encryption;2.5.0;2.6.0-beta.1
com.azure:azure-cosmos-test;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-cosmos-tests;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-data-appconfiguration;1.4.8;1.5.0-beta.2
+com.azure:azure-data-appconfiguration;1.4.9;1.5.0-beta.2
com.azure:azure-data-appconfiguration-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-data-schemaregistry;1.3.9;1.4.0-beta.3
-com.azure:azure-data-schemaregistry-apacheavro;1.1.9;1.2.0-beta.3
-com.azure:azure-data-schemaregistry-jsonschema;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-data-tables;12.3.14;12.4.0-beta.1
+com.azure:azure-data-schemaregistry;1.3.10;1.4.0-beta.3
+com.azure:azure-data-schemaregistry-apacheavro;1.1.10;1.2.0-beta.3
+com.azure:azure-data-schemaregistry-jsonschema;1.0.0-beta.1;1.0.0-beta.2
+com.azure:azure-data-tables;12.3.15;12.4.0-beta.1
com.azure:azure-data-tables-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-digitaltwins-core;1.3.12;1.4.0-beta.1
com.azure:azure-developer-devcenter;1.0.0-beta.2;1.0.0-beta.3
+com.azure:azure-developer-loadtesting;1.0.6;1.1.0-beta.1
+com.azure:azure-digitaltwins-core;1.3.13;1.4.0-beta.1
com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1
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-identity;1.10.1;1.11.0-beta.1
+com.azure:azure-identity;1.10.1;1.11.0-beta.2
+com.azure:azure-identity-extensions;1.1.8;1.2.0-beta.2
com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-iot-deviceupdate;1.0.10;1.1.0-beta.1
+com.azure:azure-iot-deviceupdate;1.0.11;1.1.0-beta.1
com.azure:azure-iot-modelsrepository;1.0.0-beta.1;1.0.0-beta.2
+com.azure:azure-json;1.1.0;1.2.0-beta.1
+com.azure:azure-json-gson;1.0.0-beta.3;1.0.0-beta.4
+com.azure:azure-json-reflect;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-maps-traffic;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-maps-weather;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-maps-elevation;1.0.0-beta.2;1.0.0-beta.3
@@ -128,67 +136,60 @@ com.azure:azure-maps-geolocation;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-maps-render;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-maps-route;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-maps-search;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-json;1.1.0;1.2.0-beta.1
-com.azure:azure-json-gson;1.0.0-beta.3;1.0.0-beta.4
-com.azure:azure-json-reflect;1.0.0-beta.2;1.0.0-beta.3
-com.azure:azure-messaging-eventgrid;4.17.2;4.18.0-beta.1
+com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.6;1.0.0-beta.7
+com.azure:azure-messaging-eventgrid;4.18.0;4.19.0-beta.1
com.azure:azure-messaging-eventgrid-cloudnative-cloudevents;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-messaging-eventhubs;5.15.8;5.16.0-beta.2
-com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.16.9;1.17.0-beta.2
-com.azure:azure-messaging-eventhubs-checkpointstore-jedis;1.0.0-beta.1;1.0.0-beta.2
+com.azure:azure-messaging-eventhubs;5.16.0;5.17.0-beta.1
+com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.17.0;1.18.0-beta.1
+com.azure:azure-messaging-eventhubs-checkpointstore-jedis;1.0.0-beta.2;1.0.0-beta.3
com.azure:azure-messaging-eventhubs-stress;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-eventhubs-track1-perf;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.14.3;7.15.0-beta.4
+com.azure:azure-messaging-servicebus;7.14.4;7.15.0-beta.4
com.azure:azure-messaging-servicebus-stress;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-servicebus-track1-perf;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.2.7;1.3.0-beta.1
+com.azure:azure-messaging-webpubsub;1.2.8;1.3.0-beta.1
com.azure:azure-messaging-webpubsub-client;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-mixedreality-authentication;1.2.16;1.3.0-beta.1
-com.azure:azure-mixedreality-remoterendering;1.1.21;1.2.0-beta.1
+com.azure:azure-mixedreality-authentication;1.2.17;1.3.0-beta.1
+com.azure:azure-mixedreality-remoterendering;1.1.22;1.2.0-beta.1
com.azure:azure-monitor-opentelemetry-exporter;1.0.0-beta.11;1.0.0-beta.12
-com.azure:azure-monitor-ingestion;1.0.6;1.1.0-beta.1
+com.azure:azure-monitor-ingestion;1.1.0;1.2.0-beta.1
com.azure:azure-monitor-ingestion-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-monitor-query;1.2.4;1.3.0-beta.2
+com.azure:azure-monitor-query;1.2.5;1.3.0-beta.3
com.azure:azure-monitor-query-perf;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.5.10;11.6.0-beta.9
+com.azure:azure-search-documents;11.5.11;11.6.0-beta.10
com.azure:azure-search-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-security-attestation;1.1.16;1.2.0-beta.1
-com.azure:azure-security-confidentialledger;1.0.12;1.1.0-beta.1
-com.azure:azure-security-keyvault-administration;4.3.5;4.4.0-beta.1
-com.azure:azure-security-keyvault-certificates;4.5.5;4.6.0-beta.1
+com.azure:azure-security-attestation;1.1.17;1.2.0-beta.1
+com.azure:azure-security-confidentialledger;1.0.13;1.1.0-beta.1
+com.azure:azure-security-keyvault-administration;4.4.0;4.5.0-beta.1
+com.azure:azure-security-keyvault-certificates;4.5.6;4.6.0-beta.1
com.azure:azure-security-keyvault-jca;2.7.1;2.8.0-beta.1
com.azure:azure-security-test-keyvault-jca;1.0.0;1.0.0
-com.azure:azure-security-keyvault-keys;4.6.5;4.7.0-beta.1
-com.azure:azure-security-keyvault-secrets;4.6.5;4.7.0-beta.1
+com.azure:azure-security-keyvault-keys;4.7.0;4.8.0-beta.1
+com.azure:azure-security-keyvault-secrets;4.7.0;4.8.0-beta.1
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
com.azure:azure-sdk-template-three;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-spring-data-cosmos;3.38.0;3.39.0-beta.1
-com.azure:azure-storage-blob;12.23.1;12.24.0
-com.azure:azure-storage-blob-batch;12.19.1;12.20.0
+com.azure:azure-storage-blob;12.24.0;12.25.0-beta.1
+com.azure:azure-storage-blob-batch;12.20.0;12.21.0-beta.1
com.azure:azure-storage-blob-changefeed;12.0.0-beta.18;12.0.0-beta.19
-com.azure:azure-storage-blob-cryptography;12.22.1;12.23.0
+com.azure:azure-storage-blob-cryptography;12.23.0;12.24.0-beta.1
com.azure:azure-storage-blob-nio;12.0.0-beta.19;12.0.0-beta.20
-com.azure:azure-storage-common;12.22.1;12.23.0
-com.azure:azure-storage-file-share;12.19.1;12.20.0
-com.azure:azure-storage-file-datalake;12.16.1;12.17.0
-com.azure:azure-storage-internal-avro;12.8.1;12.9.0
+com.azure:azure-storage-common;12.23.0;12.24.0-beta.1
+com.azure:azure-storage-file-share;12.20.0;12.21.0-beta.1
+com.azure:azure-storage-file-datalake;12.17.0;12.18.0-beta.1
+com.azure:azure-storage-internal-avro;12.9.0;12.10.0-beta.1
com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-storage-queue;12.18.1;12.19.0
+com.azure:azure-storage-queue;12.19.0;12.20.0-beta.1
com.azure:azure-template-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-media-videoanalyzer-edge;1.0.0-beta.6;1.0.0-beta.7
com.azure:azure-verticals-agrifood-farming;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-xml;1.0.0-beta.2;1.0.0-beta.3
com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-communication-email;1.0.5;1.1.0-beta.1
-com.azure:azure-developer-loadtesting;1.0.5;1.1.0-beta.1
-com.azure:azure-identity-extensions;1.1.7;1.2.0-beta.2
-com.azure:azure-analytics-purview-sharing;1.0.0-beta.2;1.0.0-beta.3
com.azure.spring:azure-monitor-spring-native;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:azure-monitor-spring-native-test;1.0.0-beta.1;1.0.0-beta.1
com.azure.spring:spring-cloud-azure-appconfiguration-config-web;4.11.0;4.12.0-beta.1
@@ -225,7 +226,7 @@ com.azure.spring:spring-cloud-azure-starter-redis;4.11.0;4.12.0-beta.1
com.azure.spring:spring-cloud-azure-starter-keyvault;4.11.0;4.12.0-beta.1
com.azure.spring:spring-cloud-azure-starter-keyvault-certificates;4.11.0;4.12.0-beta.1
com.azure.spring:spring-cloud-azure-starter-keyvault-secrets;4.11.0;4.12.0-beta.1
-com.azure.spring:spring-cloud-azure-starter-monitor;1.0.0-beta.1;1.0.0-beta.1
+com.azure.spring:spring-cloud-azure-starter-monitor;1.0.0-beta.1;1.0.0-beta.2
com.azure.spring:spring-cloud-azure-starter-servicebus-jms;4.11.0;4.12.0-beta.1
com.azure.spring:spring-cloud-azure-starter-servicebus;4.11.0;4.12.0-beta.1
com.azure.spring:spring-cloud-azure-starter-storage;4.11.0;4.12.0-beta.1
@@ -288,11 +289,11 @@ com.azure.resourcemanager:azure-resourcemanager-netapp;1.0.0-beta.13;1.0.0-beta.
com.azure.resourcemanager:azure-resourcemanager-storagecache;1.0.0-beta.9;1.0.0-beta.10
com.azure.resourcemanager:azure-resourcemanager-redisenterprise;1.0.0;1.1.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-hybridkubernetes;1.0.0-beta.3;1.0.0-beta.4
-com.azure.resourcemanager:azure-resourcemanager-iothub;1.1.0;1.2.0-beta.4
+com.azure.resourcemanager:azure-resourcemanager-iothub;1.2.0;1.3.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-datadog;1.0.0-beta.4;1.0.0-beta.5
-com.azure.resourcemanager:azure-resourcemanager-communication;2.0.0;2.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-communication;2.0.0;2.1.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-apimanagement;1.0.0-beta.4;1.0.0-beta.5
-com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration;1.0.0-beta.4;1.0.0-beta.5
+com.azure.resourcemanager:azure-resourcemanager-kubernetesconfiguration;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-resourcegraph;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-changeanalysis;1.0.1;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-delegatednetwork;1.0.0-beta.2;1.0.0-beta.3
@@ -304,7 +305,7 @@ com.azure.resourcemanager:azure-resourcemanager-frontdoor;1.0.0-beta.3;1.0.0-bet
com.azure.resourcemanager:azure-resourcemanager-mixedreality;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-automation;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-resourcemover;1.0.0;1.1.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-datafactory;1.0.0-beta.22;1.0.0-beta.23
+com.azure.resourcemanager:azure-resourcemanager-datafactory;1.0.0-beta.23;1.0.0-beta.24
com.azure.resourcemanager:azure-resourcemanager-advisor;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-appconfiguration;1.0.0-beta.7;1.0.0-beta.8
com.azure.resourcemanager:azure-resourcemanager-attestation;1.0.0-beta.2;1.0.0-beta.3
@@ -315,7 +316,7 @@ com.azure.resourcemanager:azure-resourcemanager-consumption;1.0.0-beta.3;1.0.0-b
com.azure.resourcemanager:azure-resourcemanager-commerce;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-billing;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-batchai;1.0.0-beta.1;1.0.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0-beta.6;1.0.0-beta.7
+com.azure.resourcemanager:azure-resourcemanager-signalr;1.0.0-beta.7;1.0.0-beta.8
com.azure.resourcemanager:azure-resourcemanager-cognitiveservices;1.0.0;1.1.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-customerinsights;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-databox;1.0.0-beta.3;1.0.0-beta.4
@@ -349,7 +350,7 @@ com.azure.resourcemanager:azure-resourcemanager-datalakestore;1.0.0-beta.2;1.0.0
com.azure.resourcemanager:azure-resourcemanager-iotcentral;1.0.0;1.1.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-labservices;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-vmwarecloudsimple;1.0.0-beta.2;1.0.0-beta.3
-com.azure.resourcemanager:azure-resourcemanager-managedapplications;1.0.0-beta.2;1.0.0-beta.3
+com.azure.resourcemanager:azure-resourcemanager-managedapplications;1.0.0-beta.3;1.0.0-beta.4
com.azure.resourcemanager:azure-resourcemanager-videoanalyzer;1.0.0-beta.5;1.0.0-beta.6
com.azure.resourcemanager:azure-resourcemanager-imagebuilder;1.0.0-beta.4;1.0.0-beta.5
com.azure.resourcemanager:azure-resourcemanager-maps;1.0.0;1.1.0-beta.1
@@ -405,12 +406,12 @@ com.azure.resourcemanager:azure-resourcemanager-hybridcontainerservice;1.0.0-bet
com.azure.resourcemanager:azure-resourcemanager-securitydevops;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-appcomplianceautomation;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-servicenetworking;1.0.0-beta.2;1.0.0-beta.3
-com.azure.resourcemanager:azure-resourcemanager-recoveryservicessiterecovery;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-recoveryservicessiterecovery;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-billingbenefits;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-providerhub;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-reservations;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-storagemover;1.0.0;1.1.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-containerservicefleet;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-containerservicefleet;1.0.0-beta.2;1.0.0-beta.3
com.azure.resourcemanager:azure-resourcemanager-voiceservices;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-graphservices;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-paloaltonetworks-ngfw;1.0.0;1.1.0-beta.1
@@ -418,7 +419,7 @@ com.azure.resourcemanager:azure-resourcemanager-newrelicobservability;1.0.0;1.1.
com.azure.resourcemanager:azure-resourcemanager-qumulo;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-selfhelp;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-networkcloud;1.0.0;1.1.0-beta.1
-com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-cosmosdbforpostgresql;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-managementgroups;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-managednetworkfabric;1.0.0;1.1.0-beta.1
com.azure.resourcemanager:azure-resourcemanager-iotfirmwaredefense;1.0.0-beta.1;1.0.0-beta.2
@@ -428,7 +429,8 @@ com.azure.resourcemanager:azure-resourcemanager-chaos;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-defendereasm;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-hdinsight-containers;1.0.0-beta.1;1.0.0-beta.2
com.azure.resourcemanager:azure-resourcemanager-apicenter;1.0.0-beta.1;1.0.0-beta.2
-com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0-beta.1;1.0.0-beta.2
+com.azure.resourcemanager:azure-resourcemanager-hybridconnectivity;1.0.0;1.1.0-beta.1
+com.azure.resourcemanager:azure-resourcemanager-playwrighttesting;1.0.0-beta.1;1.0.0-beta.2
com.azure.tools:azure-sdk-archetype;1.0.0;1.2.0-beta.1
com.azure.tools:azure-sdk-build-tool;1.0.0;1.1.0-beta.1
diff --git a/pom.xml b/pom.xml
index 6d46c835c391..2933b7b5264a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -11,7 +11,6 @@
common/perf-test-core
eng/code-quality-reports
- eng/jacoco-test-coverage
sdk/advisor
sdk/agrifood
sdk/alertsmanagement
@@ -49,6 +48,7 @@
sdk/consumption
sdk/containerregistry
sdk/containerservicefleet
+ sdk/contentsafety
sdk/core
sdk/cosmos
sdk/cosmosdbforpostgresql
@@ -143,6 +143,7 @@
sdk/parents
sdk/peering
sdk/personalizer
+ sdk/playwrighttesting
sdk/policyinsights
sdk/postgresql
sdk/postgresqlflexibleserver
diff --git a/sdk/agrifood/azure-verticals-agrifood-farming/README.md b/sdk/agrifood/azure-verticals-agrifood-farming/README.md
index 40c27ebccf14..4b5c3f3b8ff2 100644
--- a/sdk/agrifood/azure-verticals-agrifood-farming/README.md
+++ b/sdk/agrifood/azure-verticals-agrifood-farming/README.md
@@ -47,7 +47,7 @@ To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below
com.azure
azure-identity
- 1.10.0
+ 1.10.1
```
diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/README.md b/sdk/anomalydetector/azure-ai-anomalydetector/README.md
index 0e294fa71d0c..2c2250350180 100644
--- a/sdk/anomalydetector/azure-ai-anomalydetector/README.md
+++ b/sdk/anomalydetector/azure-ai-anomalydetector/README.md
@@ -54,7 +54,7 @@ To use the [DefaultAzureCredential][DefaultAzureCredential] provider shown below
com.azure
azure-identity
- 1.10.0
+ 1.10.1
```
diff --git a/sdk/aot/azure-aot-graalvm-samples/pom.xml b/sdk/aot/azure-aot-graalvm-samples/pom.xml
index 1eaf9948a18b..0e97d21f428b 100644
--- a/sdk/aot/azure-aot-graalvm-samples/pom.xml
+++ b/sdk/aot/azure-aot-graalvm-samples/pom.xml
@@ -61,7 +61,7 @@
com.azure
azure-data-appconfiguration
- 1.4.8
+ 1.4.9
com.azure
@@ -71,44 +71,44 @@
com.azure
azure-security-keyvault-keys
- 4.6.5
+ 4.7.0
com.azure
azure-storage-blob
- 12.23.1
+ 12.24.0
com.azure
azure-security-keyvault-secrets
- 4.6.5
+ 4.7.0
com.azure
azure-security-keyvault-certificates
- 4.5.5
+ 4.5.6
com.azure
azure-messaging-eventhubs
- 5.15.8
+ 5.16.0
com.azure
azure-cosmos
- 4.49.0
+ 4.50.0
com.azure
azure-ai-formrecognizer
- 4.1.0
+ 4.1.1
com.azure
azure-ai-textanalytics
- 5.3.2
+ 5.3.3
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md b/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md
index 935026758bca..2ba1448ca9b7 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-data-appconfiguration/CHANGELOG.md
@@ -18,6 +18,15 @@ Note: Below breaking changes only affect the version `1.5.0-beta.1`.
### Other Changes
+## 1.4.9 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-core-http-netty` from `1.13.6` to version `1.13.7`.
+
## 1.4.8 (2023-08-18)
### Other Changes
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/assets.json b/sdk/appconfiguration/azure-data-appconfiguration/assets.json
index 7a8378f73d69..40b2c9e6febf 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/assets.json
+++ b/sdk/appconfiguration/azure-data-appconfiguration/assets.json
@@ -2,5 +2,5 @@
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "java",
"TagPrefix": "java/appconfiguration/azure-data-appconfiguration",
- "Tag": "java/appconfiguration/azure-data-appconfiguration_ba464cc28f"
+ "Tag": "java/appconfiguration/azure-data-appconfiguration_2cf918b584"
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java
index 874d8c4aa0dd..1256820cd292 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationAsyncClient.java
@@ -1044,12 +1044,16 @@ public PagedFlux listConfigurationSettings(SettingSelector
acceptDateTime,
settingFields,
null,
+ null,
+ null,
addTracingNamespace(context))
.map(pagedResponse -> toConfigurationSettingWithPagedResponse(pagedResponse))),
nextLink -> withContext(
context -> serviceClient.getKeyValuesNextSinglePageAsync(
nextLink,
acceptDateTime,
+ null,
+ null,
addTracingNamespace(context))
.map(pagedResponse -> toConfigurationSettingWithPagedResponse(pagedResponse)))
);
@@ -1119,12 +1123,16 @@ public PagedFlux listConfigurationSettingsForSnapshot(Stri
null,
fields,
snapshotName,
+ null,
+ null,
addTracingNamespace(context))
.map(pagedResponse -> toConfigurationSettingWithPagedResponse(pagedResponse))),
nextLink -> withContext(
context -> serviceClient.getKeyValuesNextSinglePageAsync(
nextLink,
null,
+ null,
+ null,
addTracingNamespace(context))
.map(pagedResponse -> toConfigurationSettingWithPagedResponse(pagedResponse)))
);
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
index daa39178e403..8b5a732d6211 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClient.java
@@ -1059,12 +1059,14 @@ public PagedIterable listConfigurationSettings(SettingSele
selector == null ? null : selector.getAcceptDateTime(),
selector == null ? null : toSettingFieldsList(selector.getFields()),
null,
+ null,
+ null,
enableSyncRestProxy(addTracingNamespace(context)));
return toConfigurationSettingWithPagedResponse(pagedResponse);
},
nextLink -> {
final PagedResponse pagedResponse = serviceClient.getKeyValuesNextSinglePage(nextLink,
- selector.getAcceptDateTime(), enableSyncRestProxy(addTracingNamespace(context)));
+ selector.getAcceptDateTime(), null, null, enableSyncRestProxy(addTracingNamespace(context)));
return toConfigurationSettingWithPagedResponse(pagedResponse);
}
);
@@ -1136,12 +1138,14 @@ public PagedIterable listConfigurationSettingsForSnapshot(
null,
fields,
snapshotName,
+ null,
+ null,
enableSyncRestProxy(addTracingNamespace(context)));
return toConfigurationSettingWithPagedResponse(pagedResponse);
},
nextLink -> {
final PagedResponse pagedResponse = serviceClient.getKeyValuesNextSinglePage(nextLink,
- null, enableSyncRestProxy(addTracingNamespace(context)));
+ null, null, null, enableSyncRestProxy(addTracingNamespace(context)));
return toConfigurationSettingWithPagedResponse(pagedResponse);
}
);
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
index bd764dc60f12..a743a01d56bc 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/ConfigurationClientBuilder.java
@@ -118,6 +118,7 @@ public final class ConfigurationClientBuilder implements
private static final String CLIENT_NAME;
private static final String CLIENT_VERSION;
private static final HttpPipelinePolicy ADD_HEADERS_POLICY;
+ private static final ClientOptions DEFAULT_CLIENT_OPTIONS = new ClientOptions();
static {
Map properties = CoreUtils.getProperties("azure-data-appconfiguration.properties");
@@ -255,10 +256,11 @@ private HttpPipeline createDefaultHttpPipeline(SyncTokenPolicy syncTokenPolicy,
// endpoint cannot be null, which is required in request authentication
Objects.requireNonNull(buildEndpoint, "'Endpoint' is required and can not be null.");
+ ClientOptions localClientOptions = clientOptions != null ? clientOptions : DEFAULT_CLIENT_OPTIONS;
// Closest to API goes first, closest to wire goes last.
final List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(
- getApplicationId(clientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
+ getApplicationId(localClientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
policies.add(ADD_HEADERS_POLICY);
@@ -286,12 +288,11 @@ private HttpPipeline createDefaultHttpPipeline(SyncTokenPolicy syncTokenPolicy,
policies.add(syncTokenPolicy);
policies.addAll(perRetryPolicies);
- if (clientOptions != null) {
- List httpHeaderList = new ArrayList<>();
- clientOptions.getHeaders().forEach(
- header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
- policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
- }
+ List httpHeaderList = new ArrayList<>();
+ localClientOptions.getHeaders().forEach(
+ header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
+ policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
+
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -301,6 +302,7 @@ private HttpPipeline createDefaultHttpPipeline(SyncTokenPolicy syncTokenPolicy,
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
.tracer(createTracer(clientOptions))
+ .clientOptions(localClientOptions)
.build();
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java
index 35aff14947f5..84196e0381c3 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/AzureAppConfigurationImpl.java
@@ -270,6 +270,8 @@ Mono> getKeyValues(
@HeaderParam("Accept-Datetime") String acceptDatetime,
@QueryParam("$Select") String select,
@QueryParam("snapshot") String snapshot,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
@HeaderParam("Accept") String accept,
Context context);
@@ -286,6 +288,8 @@ ResponseBase getKeyValuesSync(
@HeaderParam("Accept-Datetime") String acceptDatetime,
@QueryParam("$Select") String select,
@QueryParam("snapshot") String snapshot,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
@HeaderParam("Accept") String accept,
Context context);
@@ -302,6 +306,8 @@ Mono> checkKeyValues(
@HeaderParam("Accept-Datetime") String acceptDatetime,
@QueryParam("$Select") String select,
@QueryParam("snapshot") String snapshot,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
Context context);
@Head("/kv")
@@ -317,6 +323,8 @@ ResponseBase checkKeyValuesSync(
@HeaderParam("Accept-Datetime") String acceptDatetime,
@QueryParam("$Select") String select,
@QueryParam("snapshot") String snapshot,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
Context context);
@Get("/kv/{key}")
@@ -447,7 +455,7 @@ Mono> getSnapshots(
@QueryParam("api-version") String apiVersion,
@QueryParam("After") String after,
@QueryParam("$Select") String select,
- @QueryParam("Status") String status,
+ @QueryParam("status") String status,
@HeaderParam("Accept") String accept,
Context context);
@@ -461,7 +469,7 @@ ResponseBase getSnapshotsSync(
@QueryParam("api-version") String apiVersion,
@QueryParam("After") String after,
@QueryParam("$Select") String select,
- @QueryParam("Status") String status,
+ @QueryParam("status") String status,
@HeaderParam("Accept") String accept,
Context context);
@@ -807,6 +815,8 @@ Mono> getKeyValuesNext
@HostParam("endpoint") String endpoint,
@HeaderParam("Sync-Token") String syncToken,
@HeaderParam("Accept-Datetime") String acceptDatetime,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
@HeaderParam("Accept") String accept,
Context context);
@@ -818,6 +828,8 @@ ResponseBase getKeyValuesNextSync(
@HostParam("endpoint") String endpoint,
@HeaderParam("Sync-Token") String syncToken,
@HeaderParam("Accept-Datetime") String acceptDatetime,
+ @HeaderParam("If-Match") String ifMatch,
+ @HeaderParam("If-None-Match") String ifNoneMatch,
@HeaderParam("Accept") String accept,
Context context);
@@ -1236,6 +1248,9 @@ public void checkKeys(String name, String after, String acceptDatetime) {
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1248,7 +1263,9 @@ public Mono> getKeyValuesSinglePageAsync(
String after,
String acceptDatetime,
List select,
- String snapshot) {
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
String selectConverted =
(select == null)
@@ -1266,6 +1283,8 @@ public Mono> getKeyValuesSinglePageAsync(
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
accept,
context))
.map(
@@ -1290,6 +1309,9 @@ public Mono> getKeyValuesSinglePageAsync(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1304,6 +1326,8 @@ public Mono> getKeyValuesSinglePageAsync(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
String selectConverted =
@@ -1320,6 +1344,8 @@ public Mono> getKeyValuesSinglePageAsync(
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
accept,
context)
.map(
@@ -1344,6 +1370,9 @@ public Mono> getKeyValuesSinglePageAsync(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1356,10 +1385,14 @@ public PagedFlux getKeyValuesAsync(
String after,
String acceptDatetime,
List select,
- String snapshot) {
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
return new PagedFlux<>(
- () -> getKeyValuesSinglePageAsync(key, label, after, acceptDatetime, select, snapshot),
- nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime));
+ () ->
+ getKeyValuesSinglePageAsync(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch),
+ nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime, ifMatch, ifNoneMatch));
}
/**
@@ -1373,6 +1406,9 @@ public PagedFlux getKeyValuesAsync(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1387,10 +1423,14 @@ public PagedFlux getKeyValuesAsync(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
return new PagedFlux<>(
- () -> getKeyValuesSinglePageAsync(key, label, after, acceptDatetime, select, snapshot, context),
- nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime, context));
+ () ->
+ getKeyValuesSinglePageAsync(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, context),
+ nextLink -> getKeyValuesNextSinglePageAsync(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context));
}
/**
@@ -1404,6 +1444,9 @@ public PagedFlux getKeyValuesAsync(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1416,7 +1459,9 @@ public PagedResponse getKeyValuesSinglePage(
String after,
String acceptDatetime,
List select,
- String snapshot) {
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
String selectConverted =
(select == null)
@@ -1433,6 +1478,8 @@ public PagedResponse getKeyValuesSinglePage(
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
accept,
Context.NONE);
return new PagedResponseBase<>(
@@ -1455,6 +1502,9 @@ public PagedResponse getKeyValuesSinglePage(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1469,6 +1519,8 @@ public PagedResponse getKeyValuesSinglePage(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
String selectConverted =
@@ -1486,6 +1538,8 @@ public PagedResponse getKeyValuesSinglePage(
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
accept,
context);
return new PagedResponseBase<>(
@@ -1508,6 +1562,9 @@ public PagedResponse getKeyValuesSinglePage(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1520,10 +1577,22 @@ public PagedIterable getKeyValues(
String after,
String acceptDatetime,
List select,
- String snapshot) {
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
return new PagedIterable<>(
- () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, Context.NONE),
- nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime));
+ () ->
+ getKeyValuesSinglePage(
+ key,
+ label,
+ after,
+ acceptDatetime,
+ select,
+ snapshot,
+ ifMatch,
+ ifNoneMatch,
+ Context.NONE),
+ nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch));
}
/**
@@ -1537,6 +1606,9 @@ public PagedIterable getKeyValues(
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. The value should be the name of the snapshot. Not
* valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1551,10 +1623,14 @@ public PagedIterable getKeyValues(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
return new PagedIterable<>(
- () -> getKeyValuesSinglePage(key, label, after, acceptDatetime, select, snapshot, context),
- nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, context));
+ () ->
+ getKeyValuesSinglePage(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, context),
+ nextLink -> getKeyValuesNextSinglePage(nextLink, acceptDatetime, ifMatch, ifNoneMatch, context));
}
/**
@@ -1567,6 +1643,9 @@ public PagedIterable getKeyValues(
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1579,7 +1658,9 @@ public Mono> checkKeyValuesWithRespons
String after,
String acceptDatetime,
List select,
- String snapshot) {
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
String selectConverted =
(select == null)
? null
@@ -1596,6 +1677,8 @@ public Mono> checkKeyValuesWithRespons
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
context));
}
@@ -1609,6 +1692,9 @@ public Mono> checkKeyValuesWithRespons
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1623,6 +1709,8 @@ public Mono> checkKeyValuesWithRespons
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
String selectConverted =
(select == null)
@@ -1638,6 +1726,8 @@ public Mono> checkKeyValuesWithRespons
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
context);
}
@@ -1651,6 +1741,9 @@ public Mono> checkKeyValuesWithRespons
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1663,8 +1756,11 @@ public Mono checkKeyValuesAsync(
String after,
String acceptDatetime,
List select,
- String snapshot) {
- return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot)
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
+ return checkKeyValuesWithResponseAsync(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch)
.flatMap(ignored -> Mono.empty());
}
@@ -1678,6 +1774,9 @@ public Mono checkKeyValuesAsync(
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1692,8 +1791,11 @@ public Mono checkKeyValuesAsync(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
- return checkKeyValuesWithResponseAsync(key, label, after, acceptDatetime, select, snapshot, context)
+ return checkKeyValuesWithResponseAsync(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, context)
.flatMap(ignored -> Mono.empty());
}
@@ -1707,6 +1809,9 @@ public Mono checkKeyValuesAsync(
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -1721,6 +1826,8 @@ public ResponseBase checkKeyValuesWithResponse(
String acceptDatetime,
List select,
String snapshot,
+ String ifMatch,
+ String ifNoneMatch,
Context context) {
String selectConverted =
(select == null)
@@ -1736,6 +1843,8 @@ public ResponseBase checkKeyValuesWithResponse(
acceptDatetime,
selectConverted,
snapshot,
+ ifMatch,
+ ifNoneMatch,
context);
}
@@ -1749,6 +1858,9 @@ public ResponseBase checkKeyValuesWithResponse(
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
* @param select Used to select what fields are present in the returned resource(s).
* @param snapshot A filter used get key-values for a snapshot. Not valid when used with 'key' and 'label' filters.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
@@ -1760,8 +1872,11 @@ public void checkKeyValues(
String after,
String acceptDatetime,
List select,
- String snapshot) {
- checkKeyValuesWithResponse(key, label, after, acceptDatetime, select, snapshot, Context.NONE);
+ String snapshot,
+ String ifMatch,
+ String ifNoneMatch) {
+ checkKeyValuesWithResponse(
+ key, label, after, acceptDatetime, select, snapshot, ifMatch, ifNoneMatch, Context.NONE);
}
/**
@@ -4763,13 +4878,17 @@ public PagedResponse getKeysNextSinglePage(String nextLink, String acceptDa
* @param nextLink The URL to get the next list of items
* The nextLink parameter.
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the result of a list request along with {@link PagedResponse} on successful completion of {@link Mono}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public Mono> getKeyValuesNextSinglePageAsync(String nextLink, String acceptDatetime) {
+ public Mono> getKeyValuesNextSinglePageAsync(
+ String nextLink, String acceptDatetime, String ifMatch, String ifNoneMatch) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
return FluxUtil.withContext(
context ->
@@ -4778,6 +4897,8 @@ public Mono> getKeyValuesNextSinglePageAsync(String next
this.getEndpoint(),
this.getSyncToken(),
acceptDatetime,
+ ifMatch,
+ ifNoneMatch,
accept,
context))
.map(
@@ -4797,6 +4918,9 @@ public Mono> getKeyValuesNextSinglePageAsync(String next
* @param nextLink The URL to get the next list of items
* The nextLink parameter.
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -4805,10 +4929,17 @@ public Mono> getKeyValuesNextSinglePageAsync(String next
*/
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono> getKeyValuesNextSinglePageAsync(
- String nextLink, String acceptDatetime, Context context) {
+ String nextLink, String acceptDatetime, String ifMatch, String ifNoneMatch, Context context) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
return service.getKeyValuesNext(
- nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, context)
+ nextLink,
+ this.getEndpoint(),
+ this.getSyncToken(),
+ acceptDatetime,
+ ifMatch,
+ ifNoneMatch,
+ accept,
+ context)
.map(
res ->
new PagedResponseBase<>(
@@ -4826,17 +4957,28 @@ public Mono> getKeyValuesNextSinglePageAsync(
* @param nextLink The URL to get the next list of items
* The nextLink parameter.
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the result of a list request along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PagedResponse getKeyValuesNextSinglePage(String nextLink, String acceptDatetime) {
+ public PagedResponse getKeyValuesNextSinglePage(
+ String nextLink, String acceptDatetime, String ifMatch, String ifNoneMatch) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
ResponseBase res =
service.getKeyValuesNextSync(
- nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, Context.NONE);
+ nextLink,
+ this.getEndpoint(),
+ this.getSyncToken(),
+ acceptDatetime,
+ ifMatch,
+ ifNoneMatch,
+ accept,
+ Context.NONE);
return new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
@@ -4852,6 +4994,9 @@ public PagedResponse getKeyValuesNextSinglePage(String nextLink, Strin
* @param nextLink The URL to get the next list of items
* The nextLink parameter.
* @param acceptDatetime Requests the server to respond with the state of the resource at the specified time.
+ * @param ifMatch Used to perform an operation only if the targeted resource's etag matches the value provided.
+ * @param ifNoneMatch Used to perform an operation only if the targeted resource's etag does not match the value
+ * provided.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws HttpResponseException thrown if the request is rejected by server.
@@ -4859,11 +5004,19 @@ public PagedResponse getKeyValuesNextSinglePage(String nextLink, Strin
* @return the result of a list request along with {@link PagedResponse}.
*/
@ServiceMethod(returns = ReturnType.SINGLE)
- public PagedResponse getKeyValuesNextSinglePage(String nextLink, String acceptDatetime, Context context) {
+ public PagedResponse getKeyValuesNextSinglePage(
+ String nextLink, String acceptDatetime, String ifMatch, String ifNoneMatch, Context context) {
final String accept = "application/vnd.microsoft.appconfig.kvset+json, application/problem+json";
ResponseBase res =
service.getKeyValuesNextSync(
- nextLink, this.getEndpoint(), this.getSyncToken(), acceptDatetime, accept, context);
+ nextLink,
+ this.getEndpoint(),
+ this.getSyncToken(),
+ acceptDatetime,
+ ifMatch,
+ ifNoneMatch,
+ accept,
+ context);
return new PagedResponseBase<>(
res.getRequest(),
res.getStatusCode(),
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Conditions.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Conditions.java
new file mode 100644
index 000000000000..5c4adcc8eb5c
--- /dev/null
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Conditions.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.data.appconfiguration.implementation;
+
+import com.azure.data.appconfiguration.models.FeatureFlagFilter;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Conditions represents the conditions of a feature flag or unknown user-defined condition.
+ */
+public class Conditions {
+ // Unknown condition is a list of objects because we don't know what the condition user can put in portal or 'value'.
+ private Map unknownConditions;
+
+ // Only condition we know is a list of FeatureFlagFilter. It represents one kind of condition.
+ private List featureFlagFilters;
+
+ public Conditions() {
+ unknownConditions = new LinkedHashMap<>();
+ featureFlagFilters = new ArrayList<>();
+ }
+
+ public Map getUnknownConditions() {
+ return unknownConditions;
+ }
+
+ public List getFeatureFlagFilters() {
+ return featureFlagFilters;
+ }
+
+ public Conditions setFeatureFlagFilters(final List featureFlagFilters) {
+ this.featureFlagFilters = featureFlagFilters;
+ return this;
+ }
+
+ public Conditions setUnknownConditions(final Map unknownConditions) {
+ this.unknownConditions = unknownConditions;
+ return this;
+ }
+}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializationHelper.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializationHelper.java
index b14e894202f8..18a7406ae89b 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializationHelper.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/ConfigurationSettingDeserializationHelper.java
@@ -177,11 +177,10 @@ private static FeatureFlagConfigurationSetting getFeatureFlagPropertyValue(JsonR
} else if (ENABLED.equals(fieldName)) {
isEnabled = reader.getBoolean();
} else if (CONDITIONS.equals(fieldName)) {
- clientFilters = readClientFilters(reader);
+ clientFilters = readConditions(reader).getFeatureFlagFilters();
} else {
reader.skipChildren();
}
-
}
return new FeatureFlagConfigurationSetting(featureId, isEnabled)
@@ -191,25 +190,29 @@ private static FeatureFlagConfigurationSetting getFeatureFlagPropertyValue(JsonR
});
}
- // Feature flag configuration setting: client filters
- private static List readClientFilters(JsonReader jsonReader) throws IOException {
+ // Feature flag configuration setting: conditions
+ public static Conditions readConditions(JsonReader jsonReader) throws IOException {
+ Conditions conditions = new Conditions();
+ Map unknownConditions = conditions.getUnknownConditions();
return jsonReader.readObject(reader -> {
while (reader.nextToken() != JsonToken.END_OBJECT) {
String fieldName = reader.getFieldName();
reader.nextToken();
if (CLIENT_FILTERS.equals(fieldName)) {
- return reader.readArray(ConfigurationSettingDeserializationHelper::readClientFilter);
+ conditions.setFeatureFlagFilters(
+ reader.readArray(ConfigurationSettingDeserializationHelper::readClientFilter));
} else {
- reader.skipChildren();
+ unknownConditions.put(fieldName, reader.readUntyped());
}
}
+ conditions.setUnknownConditions(unknownConditions);
- return null;
+ return conditions;
});
}
- private static FeatureFlagFilter readClientFilter(JsonReader jsonReader) throws IOException {
+ public static FeatureFlagFilter readClientFilter(JsonReader jsonReader) throws IOException {
return jsonReader.readObject(reader -> {
String name = null;
Map parameters = null;
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Utility.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Utility.java
index 13edabee16e0..8668f72722a3 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Utility.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/Utility.java
@@ -29,15 +29,15 @@ public class Utility {
private static final String HTTP_REST_PROXY_SYNC_PROXY_ENABLE = "com.azure.core.http.restproxy.syncproxy.enable";
public static final String APP_CONFIG_TRACING_NAMESPACE_VALUE = "Microsoft.AppConfiguration";
- static final String ID = "id";
- static final String DESCRIPTION = "description";
- static final String DISPLAY_NAME = "display_name";
- static final String ENABLED = "enabled";
- static final String CONDITIONS = "conditions";
- static final String CLIENT_FILTERS = "client_filters";
- static final String NAME = "name";
- static final String PARAMETERS = "parameters";
- static final String URI = "uri";
+ public static final String ID = "id";
+ public static final String DESCRIPTION = "description";
+ public static final String DISPLAY_NAME = "display_name";
+ public static final String ENABLED = "enabled";
+ public static final String CONDITIONS = "conditions";
+ public static final String CLIENT_FILTERS = "client_filters";
+ public static final String NAME = "name";
+ public static final String PARAMETERS = "parameters";
+ public static final String URI = "uri";
/**
* Represents any value in Etag.
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckKeyValuesHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckKeyValuesHeaders.java
index 3004f2dabb8b..37f96eb86727 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckKeyValuesHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckKeyValuesHeaders.java
@@ -11,6 +11,11 @@
/** The CheckKeyValuesHeaders model. */
@Fluent
public final class CheckKeyValuesHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class CheckKeyValuesHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public CheckKeyValuesHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the CheckKeyValuesHeaders object itself.
+ */
+ public CheckKeyValuesHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckRevisionsHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckRevisionsHeaders.java
index 279b819c8d45..a42d15ef9ba6 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckRevisionsHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/CheckRevisionsHeaders.java
@@ -11,6 +11,11 @@
/** The CheckRevisionsHeaders model. */
@Fluent
public final class CheckRevisionsHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class CheckRevisionsHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public CheckRevisionsHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the CheckRevisionsHeaders object itself.
+ */
+ public CheckRevisionsHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesHeaders.java
index f04bc958ecb7..95fe4249b01f 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesHeaders.java
@@ -11,6 +11,11 @@
/** The GetKeyValuesHeaders model. */
@Fluent
public final class GetKeyValuesHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class GetKeyValuesHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public GetKeyValuesHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the GetKeyValuesHeaders object itself.
+ */
+ public GetKeyValuesHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesNextHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesNextHeaders.java
index 2bcae4d6ead9..cc4c3489e3d8 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesNextHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetKeyValuesNextHeaders.java
@@ -11,6 +11,11 @@
/** The GetKeyValuesNextHeaders model. */
@Fluent
public final class GetKeyValuesNextHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class GetKeyValuesNextHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public GetKeyValuesNextHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the GetKeyValuesNextHeaders object itself.
+ */
+ public GetKeyValuesNextHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsHeaders.java
index dec47f22db76..73345782fc7c 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsHeaders.java
@@ -11,6 +11,11 @@
/** The GetRevisionsHeaders model. */
@Fluent
public final class GetRevisionsHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class GetRevisionsHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public GetRevisionsHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the GetRevisionsHeaders object itself.
+ */
+ public GetRevisionsHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsNextHeaders.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsNextHeaders.java
index 3dc20175b37f..78aa57d7e212 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsNextHeaders.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/GetRevisionsNextHeaders.java
@@ -11,6 +11,11 @@
/** The GetRevisionsNextHeaders model. */
@Fluent
public final class GetRevisionsNextHeaders {
+ /*
+ * The ETag property.
+ */
+ private String eTag;
+
/*
* The Sync-Token property.
*/
@@ -25,9 +30,30 @@ public final class GetRevisionsNextHeaders {
* @param rawHeaders The raw HttpHeaders that will be used to create the property values.
*/
public GetRevisionsNextHeaders(HttpHeaders rawHeaders) {
+ this.eTag = rawHeaders.getValue(HttpHeaderName.ETAG);
this.syncToken = rawHeaders.getValue(SYNC_TOKEN);
}
+ /**
+ * Get the eTag property: The ETag property.
+ *
+ * @return the eTag value.
+ */
+ public String getETag() {
+ return this.eTag;
+ }
+
+ /**
+ * Set the eTag property: The ETag property.
+ *
+ * @param eTag the eTag value to set.
+ * @return the GetRevisionsNextHeaders object itself.
+ */
+ public GetRevisionsNextHeaders setETag(String eTag) {
+ this.eTag = eTag;
+ return this;
+ }
+
/**
* Get the syncToken property: The Sync-Token property.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueListResult.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueListResult.java
index 686ae3f583d7..372f85aec07d 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueListResult.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/implementation/models/KeyValueListResult.java
@@ -20,6 +20,11 @@ public final class KeyValueListResult implements JsonSerializable items;
+ /*
+ * An identifier representing the returned state of the resource.
+ */
+ private String etag;
+
/*
* The URI that can be used to request the next set of paged results.
*/
@@ -48,6 +53,26 @@ public KeyValueListResult setItems(List items) {
return this;
}
+ /**
+ * Get the etag property: An identifier representing the returned state of the resource.
+ *
+ * @return the etag value.
+ */
+ public String getEtag() {
+ return this.etag;
+ }
+
+ /**
+ * Set the etag property: An identifier representing the returned state of the resource.
+ *
+ * @param etag the etag value to set.
+ * @return the KeyValueListResult object itself.
+ */
+ public KeyValueListResult setEtag(String etag) {
+ this.etag = etag;
+ return this;
+ }
+
/**
* Get the nextLink property: The URI that can be used to request the next set of paged results.
*
@@ -72,6 +97,7 @@ public KeyValueListResult setNextLink(String nextLink) {
public JsonWriter toJson(JsonWriter jsonWriter) throws IOException {
jsonWriter.writeStartObject();
jsonWriter.writeArrayField("items", this.items, (writer, element) -> writer.writeJson(element));
+ jsonWriter.writeStringField("etag", this.etag);
jsonWriter.writeStringField("@nextLink", this.nextLink);
return jsonWriter.writeEndObject();
}
@@ -95,6 +121,8 @@ public static KeyValueListResult fromJson(JsonReader jsonReader) throws IOExcept
if ("items".equals(fieldName)) {
List items = reader.readArray(reader1 -> KeyValue.fromJson(reader1));
deserializedKeyValueListResult.items = items;
+ } else if ("etag".equals(fieldName)) {
+ deserializedKeyValueListResult.etag = reader.getString();
} else if ("@nextLink".equals(fieldName)) {
deserializedKeyValueListResult.nextLink = reader.getString();
} else {
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/CreateSnapshotOperationDetail.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/CreateSnapshotOperationDetail.java
index 4ff57f148175..f5e9930a319b 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/CreateSnapshotOperationDetail.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/CreateSnapshotOperationDetail.java
@@ -23,6 +23,11 @@ public void setOperationId(CreateSnapshotOperationDetail operationDetail, String
});
}
+ /**
+ * Creates an instance of {@link CreateSnapshotOperationDetail}.
+ */
+ public CreateSnapshotOperationDetail() { }
+
/**
* Gets the operationId property of the {@link CreateSnapshotOperationDetail}.
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/FeatureFlagConfigurationSetting.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/FeatureFlagConfigurationSetting.java
index c6ec527fb402..6f4db70903db 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/FeatureFlagConfigurationSetting.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/FeatureFlagConfigurationSetting.java
@@ -4,14 +4,32 @@
package com.azure.data.appconfiguration.models;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.data.appconfiguration.implementation.Conditions;
+import com.azure.json.JsonProviders;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
+import java.util.Set;
-import static com.azure.data.appconfiguration.implementation.ConfigurationSettingDeserializationHelper.parseFeatureFlagValue;
-import static com.azure.data.appconfiguration.implementation.ConfigurationSettingSerializationHelper.writeFeatureFlagConfigurationSetting;
+import static com.azure.data.appconfiguration.implementation.ConfigurationSettingDeserializationHelper.readConditions;
+import static com.azure.data.appconfiguration.implementation.Utility.CLIENT_FILTERS;
+import static com.azure.data.appconfiguration.implementation.Utility.CONDITIONS;
+import static com.azure.data.appconfiguration.implementation.Utility.DESCRIPTION;
+import static com.azure.data.appconfiguration.implementation.Utility.DISPLAY_NAME;
+import static com.azure.data.appconfiguration.implementation.Utility.ENABLED;
+import static com.azure.data.appconfiguration.implementation.Utility.ID;
+import static com.azure.data.appconfiguration.implementation.Utility.NAME;
+import static com.azure.data.appconfiguration.implementation.Utility.PARAMETERS;
/**
* {@link FeatureFlagConfigurationSetting} allows you to customize your own feature flags to dynamically administer a
@@ -21,16 +39,31 @@ public final class FeatureFlagConfigurationSetting extends ConfigurationSetting
private static final ClientLogger LOGGER = new ClientLogger(FeatureFlagConfigurationSetting.class);
private static final String FEATURE_FLAG_CONTENT_TYPE = "application/vnd.microsoft.appconfig.ff+json;charset=utf-8";
+ /**
+ * A prefix is used to construct a feature flag configuration setting's key.
+ */
+ public static final String KEY_PREFIX = ".appconfig.featureflag/";
private String featureId;
private boolean isEnabled;
private String description;
private String displayName;
private List clientFilters;
- /**
- * A prefix is used to construct a feature flag configuration setting's key.
- */
- public static final String KEY_PREFIX = ".appconfig.featureflag/";
+ // The flag to indicate if the 'value' field is valid. It is a temporary field to store the flag.
+ // If the 'value' field is not valid, we will throw an exception when user try to access the strongly-typed
+ // properties.
+ private boolean isValidFeatureFlagValue;
+
+ // This used to store the parsed properties from the 'value' field. Given initial capacity is 5, it is enough for
+ // current json schema. It should be equal to the number of properties defined in the swagger schema at first level.
+ private final Map parsedProperties = new LinkedHashMap<>(5);
+
+ // The required properties defined in the swagger schema.
+ private final List requiredJsonProperties = Arrays.asList(ID, ENABLED, CONDITIONS);
+
+ // Swagger schema defined properties at first level of FeatureFlagConfigurationSetting.
+ private final List requiredOrOptionalJsonProperties =
+ Arrays.asList(ID, DESCRIPTION, DISPLAY_NAME, ENABLED, CONDITIONS);
/**
* The constructor for a feature flag configuration setting.
@@ -40,12 +73,60 @@ public final class FeatureFlagConfigurationSetting extends ConfigurationSetting
* @param isEnabled A boolean value to turn on/off the feature flag setting.
*/
public FeatureFlagConfigurationSetting(String featureId, boolean isEnabled) {
+ isValidFeatureFlagValue = true;
+
this.featureId = featureId;
this.isEnabled = isEnabled;
super.setKey(KEY_PREFIX + featureId);
super.setContentType(FEATURE_FLAG_CONTENT_TYPE);
}
+ @Override
+ public String getValue() {
+ // Lazily update: Update 'value' by all latest property values when this getValue() method is called.
+ String newValue = null;
+ try {
+ final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ final JsonWriter writer = JsonProviders.createWriter(outputStream);
+
+ final Set knownProperties = new LinkedHashSet<>(requiredOrOptionalJsonProperties);
+
+ writer.writeStartObject();
+ // If 'value' has value, and it is a valid JSON, we need to parse it and write it back.
+ for (Map.Entry entry : parsedProperties.entrySet()) {
+ final String name = entry.getKey();
+ final Object jsonValue = entry.getValue();
+ try {
+ // Try to write the known property. If it is a known property, we need to remove it from the
+ // temporary 'knownProperties' bag.
+ if (tryWriteKnownProperty(name, jsonValue, writer, true)) {
+ knownProperties.remove(name);
+ } else {
+ // Unknown extension property. We need to keep it.
+ writer.writeUntypedField(name, jsonValue);
+ }
+ } catch (IOException e) {
+ throw LOGGER.logExceptionAsError(new RuntimeException(e));
+ }
+ }
+ // Remaining known properties we are not processed yet after 'parsedProperties'.
+ for (final String propertyName : knownProperties) {
+ tryWriteKnownProperty(propertyName, null, writer, false);
+ }
+ writer.writeEndObject();
+
+ writer.flush();
+ newValue = outputStream.toString(StandardCharsets.UTF_8.name());
+ outputStream.close();
+ } catch (IOException exception) {
+ LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Can't parse Feature Flag configuration setting value.", exception));
+ }
+
+ super.setValue(newValue);
+ return newValue;
+ }
+
/**
* Sets the key of this setting.
*
@@ -69,14 +150,9 @@ public FeatureFlagConfigurationSetting setKey(String key) {
*/
@Override
public FeatureFlagConfigurationSetting setValue(String value) {
+ tryParseValue(value);
+ isValidFeatureFlagValue = true;
super.setValue(value);
- // update strongly-typed properties.
- final FeatureFlagConfigurationSetting updatedSetting = parseFeatureFlagValue(value);
- this.featureId = updatedSetting.getFeatureId();
- this.description = updatedSetting.getDescription();
- this.isEnabled = updatedSetting.isEnabled();
- this.displayName = updatedSetting.getDisplayName();
- this.clientFilters = new ArrayList<>(updatedSetting.getClientFilters());
return this;
}
@@ -137,8 +213,10 @@ public FeatureFlagConfigurationSetting setTags(Map tags) {
* Get the feature ID of this configuration setting.
*
* @return the feature ID of this configuration setting.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public String getFeatureId() {
+ checkValid();
return featureId;
}
@@ -151,9 +229,9 @@ public String getFeatureId() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting setFeatureId(String featureId) {
+ checkValid();
this.featureId = featureId;
super.setKey(KEY_PREFIX + featureId);
- updateSettingValue();
return this;
}
@@ -161,8 +239,10 @@ public FeatureFlagConfigurationSetting setFeatureId(String featureId) {
* Get the boolean indicator to show if the setting is turn on or off.
*
* @return the boolean indicator to show if the setting is turn on or off.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public boolean isEnabled() {
+ checkValid();
return this.isEnabled;
}
@@ -175,8 +255,8 @@ public boolean isEnabled() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting setEnabled(boolean isEnabled) {
+ checkValid();
this.isEnabled = isEnabled;
- updateSettingValue();
return this;
}
@@ -184,8 +264,10 @@ public FeatureFlagConfigurationSetting setEnabled(boolean isEnabled) {
* Get the description of this configuration setting.
*
* @return the description of this configuration setting.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public String getDescription() {
+ checkValid();
return description;
}
@@ -198,8 +280,8 @@ public String getDescription() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting setDescription(String description) {
+ checkValid();
this.description = description;
- updateSettingValue();
return this;
}
@@ -207,8 +289,10 @@ public FeatureFlagConfigurationSetting setDescription(String description) {
* Get the display name of this configuration setting.
*
* @return the display name of this configuration setting.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public String getDisplayName() {
+ checkValid();
return displayName;
}
@@ -221,8 +305,8 @@ public String getDisplayName() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting setDisplayName(String displayName) {
+ checkValid();
this.displayName = displayName;
- updateSettingValue();
return this;
}
@@ -230,8 +314,10 @@ public FeatureFlagConfigurationSetting setDisplayName(String displayName) {
* Gets the feature flag filters of this configuration setting.
*
* @return the feature flag filters of this configuration setting.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public List getClientFilters() {
+ checkValid();
if (clientFilters == null) {
clientFilters = new ArrayList<>();
}
@@ -247,8 +333,8 @@ public List getClientFilters() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting setClientFilters(List clientFilters) {
+ checkValid();
this.clientFilters = clientFilters;
- updateSettingValue();
return this;
}
@@ -258,22 +344,137 @@ public FeatureFlagConfigurationSetting setClientFilters(List
* @param clientFilter a feature flag filter to add to this configuration setting.
*
* @return The updated {@link FeatureFlagConfigurationSetting} object.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public FeatureFlagConfigurationSetting addClientFilter(FeatureFlagFilter clientFilter) {
+ checkValid();
if (clientFilters == null) {
clientFilters = new ArrayList<>();
}
clientFilters.add(clientFilter);
- updateSettingValue();
return this;
}
- private void updateSettingValue() {
- try {
- super.setValue(writeFeatureFlagConfigurationSetting(this));
- } catch (IOException exception) {
- LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Can't parse Feature Flag configuration setting value.", exception));
+ private void checkValid() {
+ if (!isValidFeatureFlagValue) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("The content of the " + super.getValue()
+ + " property do not represent a valid feature flag configuration setting."));
+ }
+ }
+
+ // Try to write the known property. If it is a known property, return true. Otherwise, return false.
+ private boolean tryWriteKnownProperty(String propertyName, Object propertyValue, JsonWriter writer,
+ boolean includeOptionalWhenNull) throws IOException {
+ switch (propertyName) {
+ case ID:
+ writer.writeStringField(ID, featureId);
+ break;
+ case DESCRIPTION:
+ if (includeOptionalWhenNull || description != null) {
+ writer.writeStringField(DESCRIPTION, description);
+ }
+ break;
+ case DISPLAY_NAME:
+ if (includeOptionalWhenNull || displayName != null) {
+ writer.writeStringField(DISPLAY_NAME, displayName);
+ }
+ break;
+ case ENABLED:
+ writer.writeBooleanField(ENABLED, isEnabled);
+ break;
+ case CONDITIONS:
+ tryWriteConditions(propertyValue, writer);
+ break;
+ default:
+ return false;
+ }
+ return true;
+ }
+
+ // Helper method: try to write the 'conditions' property.
+ private void tryWriteConditions(Object propertyValue, JsonWriter writer) throws IOException {
+ writer.writeStartObject(CONDITIONS);
+
+ if (propertyValue != null && propertyValue instanceof Conditions) {
+ Conditions propertyValueClone = (Conditions) propertyValue;
+ for (Map.Entry entry : propertyValueClone.getUnknownConditions().entrySet()) {
+ String key = entry.getKey();
+ Object value = entry.getValue();
+ writer.writeUntypedField(key, value);
+ }
+ }
+
+ writer.writeArrayField(CLIENT_FILTERS, this.clientFilters, (jsonWriter, filter) -> {
+ jsonWriter.writeStartObject();
+ jsonWriter.writeStringField(NAME, filter.getName());
+ jsonWriter.writeMapField(PARAMETERS, filter.getParameters(), JsonWriter::writeUntyped);
+ jsonWriter.writeEndObject(); // each filter object
+ });
+
+ writer.writeEndObject();
+ }
+
+ // Given JSON string value, try to parse it and store the parsed properties to the 'parsedProperties' field.
+ // If the parsing is successful, updates the strongly-type property and preserves the unknown properties to
+ // 'parsedProperties' which we will use later in getValue() to get the unknown properties.
+ // Otherwise, set the flag variable 'isValidFeatureFlagValue' = false and throw an exception.
+ private void tryParseValue(String value) {
+ parsedProperties.clear();
+
+ try (JsonReader jsonReader = JsonProviders.createReader(value)) {
+ jsonReader.readObject(reader -> {
+ final Set requiredPropertiesCopy = new LinkedHashSet<>(requiredJsonProperties);
+ String featureIdCopy = this.featureId;
+ String descriptionCopy = this.description;
+ String displayNameCopy = this.displayName;
+ boolean isEnabledCopy = this.isEnabled;
+ List featureFlagFiltersCopy = this.clientFilters;
+
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ final String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if (ID.equals(fieldName)) {
+ final String id = reader.getString();
+ featureIdCopy = id;
+ parsedProperties.put(ID, id);
+ } else if (DESCRIPTION.equals(fieldName)) {
+ final String description = reader.getString();
+ descriptionCopy = description;
+ parsedProperties.put(DESCRIPTION, description);
+ } else if (DISPLAY_NAME.equals(fieldName)) {
+ final String displayName = reader.getString();
+ displayNameCopy = displayName;
+ parsedProperties.put(DISPLAY_NAME, displayName);
+ } else if (ENABLED.equals(fieldName)) {
+ final boolean isEnabled = reader.getBoolean();
+ isEnabledCopy = isEnabled;
+ parsedProperties.put(ENABLED, isEnabled);
+ } else if (CONDITIONS.equals(fieldName)) {
+ final Conditions conditions = readConditions(reader);
+ if (conditions != null) {
+ List featureFlagFilters = conditions.getFeatureFlagFilters();
+ featureFlagFiltersCopy = featureFlagFilters;
+ parsedProperties.put(CONDITIONS, conditions);
+ }
+ } else {
+ // The extension property is possible, we should not skip it.
+ parsedProperties.put(fieldName, reader.readUntyped());
+ }
+ requiredPropertiesCopy.remove(fieldName);
+ }
+
+ this.featureId = featureIdCopy;
+ this.description = descriptionCopy;
+ this.displayName = displayNameCopy;
+ this.isEnabled = isEnabledCopy;
+ this.clientFilters = featureFlagFiltersCopy;
+
+ return requiredPropertiesCopy.isEmpty();
+ });
+ } catch (IOException e) {
+ isValidFeatureFlagValue = false;
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(e));
}
}
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SecretReferenceConfigurationSetting.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SecretReferenceConfigurationSetting.java
index d28bdeece9f6..17baf11c0226 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SecretReferenceConfigurationSetting.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SecretReferenceConfigurationSetting.java
@@ -5,12 +5,18 @@
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
+import com.azure.json.JsonProviders;
+import com.azure.json.JsonReader;
+import com.azure.json.JsonToken;
+import com.azure.json.JsonWriter;
+import java.io.ByteArrayOutputStream;
import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.util.LinkedHashMap;
import java.util.Map;
-import static com.azure.data.appconfiguration.implementation.ConfigurationSettingDeserializationHelper.parseSecretReferenceFieldValue;
-import static com.azure.data.appconfiguration.implementation.ConfigurationSettingSerializationHelper.writeSecretReferenceConfigurationSetting;
+import static com.azure.data.appconfiguration.implementation.Utility.URI;
/**
* {@link SecretReferenceConfigurationSetting} model. It represents a configuration setting that references as
@@ -24,6 +30,11 @@ public final class SecretReferenceConfigurationSetting extends ConfigurationSett
private static final String SECRET_REFERENCE_CONTENT_TYPE =
"application/vnd.microsoft.appconfig.keyvaultref+json;charset=utf-8";
+ // The flag to indicate if the 'value' field is valid. It is a temporary field to store the flag.
+ // If the 'value' field is not valid, we will throw an exception when user try to access the strongly-typed
+ // properties.
+ private boolean isValidSecretReferenceValue;
+ private final Map parsedProperties = new LinkedHashMap<>(1);
/**
* The constructor for a secret reference configuration setting.
*
@@ -31,6 +42,8 @@ public final class SecretReferenceConfigurationSetting extends ConfigurationSett
* @param secretId A uri value that used to in the JSON value of setting. e.x., {"uri":"{secretId}"}.
*/
public SecretReferenceConfigurationSetting(String key, String secretId) {
+ isValidSecretReferenceValue = true;
+
this.secretId = secretId;
super.setKey(key);
super.setValue("{\"uri\":\"" + secretId + "\"}");
@@ -41,8 +54,10 @@ public SecretReferenceConfigurationSetting(String key, String secretId) {
* Get the secret ID value of this configuration setting.
*
* @return the secret ID value of this configuration setting.
+ * @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public String getSecretId() {
+ checkValid();
return secretId;
}
@@ -55,8 +70,8 @@ public String getSecretId() {
* @throws IllegalArgumentException if the setting's {@code value} is an invalid JSON format.
*/
public SecretReferenceConfigurationSetting setSecretId(String secretId) {
+ checkValid();
this.secretId = secretId;
- updateSettingValue();
return this;
}
@@ -73,6 +88,54 @@ public SecretReferenceConfigurationSetting setKey(String key) {
return this;
}
+ @Override
+ public String getValue() {
+ // Lazily update: Update 'value' by all latest property values when this getValue() method is called.
+ String newValue = null;
+ try {
+ final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ final JsonWriter writer = JsonProviders.createWriter(outputStream);
+
+ boolean isUriWritten = false;
+
+ writer.writeStartObject();
+ // If 'value' has value, and it is a valid JSON, we need to parse it and write it back.
+ for (Map.Entry entry : parsedProperties.entrySet()) {
+ final String name = entry.getKey();
+ final Object jsonValue = entry.getValue();
+ try {
+ // Try to write the known property. If it is a known property, we need to remove it from the
+ // temporary 'knownProperties' bag.
+ if (URI.equals(name)) {
+ writer.writeStringField(URI, secretId);
+ isUriWritten = true;
+ } else {
+ // Unknown extension property. We need to keep it.
+ writer.writeUntypedField(name, jsonValue);
+ }
+ } catch (IOException e) {
+ throw LOGGER.logExceptionAsError(new RuntimeException(e));
+ }
+ }
+
+ if (!isUriWritten) {
+ writer.writeStringField(URI, secretId);
+ }
+
+ writer.writeEndObject();
+ writer.flush();
+
+ newValue = outputStream.toString(StandardCharsets.UTF_8.name());
+ outputStream.close();
+ } catch (IOException exception) {
+ LOGGER.logExceptionAsError(new IllegalArgumentException(
+ "Can't parse Secret Reference configuration setting value.", exception));
+ }
+
+ super.setValue(newValue);
+ return newValue;
+ }
+
/**
* Sets the value of this setting.
*
@@ -83,10 +146,9 @@ public SecretReferenceConfigurationSetting setKey(String key) {
*/
@Override
public SecretReferenceConfigurationSetting setValue(String value) {
+ tryParseValue(value);
+ isValidSecretReferenceValue = true;
super.setValue(value);
- // update strongly-typed properties.
- SecretReferenceConfigurationSetting updatedSetting = parseSecretReferenceFieldValue(super.getKey(), value);
- this.secretId = updatedSetting.getSecretId();
return this;
}
@@ -139,12 +201,47 @@ public SecretReferenceConfigurationSetting setTags(Map tags) {
return this;
}
- private void updateSettingValue() {
- try {
- super.setValue(writeSecretReferenceConfigurationSetting(this));
- } catch (IOException exception) {
- LOGGER.logExceptionAsError(new IllegalArgumentException(
- "Can't parse Secret Reference configuration setting value.", exception));
+ private void checkValid() {
+ if (!isValidSecretReferenceValue) {
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException("The content of the " + super.getValue()
+ + " property do not represent a valid secret reference configuration setting."));
+ }
+ }
+
+ // Given JSON string value, try to parse it and store the parsed properties to the 'parsedProperties' field.
+ // If the parsing is successful, updates the strongly-type property and preserves the unknown properties to
+ // 'parsedProperties' which we will use later in getValue() to get the unknown properties.
+ // Otherwise, set the flag variable 'isValidSecretReferenceValue' = false and throw an exception.
+ private void tryParseValue(String value) {
+ parsedProperties.clear();
+
+ try (JsonReader jsonReader = JsonProviders.createReader(value)) {
+ jsonReader.readObject(reader -> {
+ boolean isSecretIdUriValid = false;
+ String secreteIdUri = this.secretId;
+
+ while (reader.nextToken() != JsonToken.END_OBJECT) {
+ final String fieldName = reader.getFieldName();
+ reader.nextToken();
+
+ if (URI.equals(fieldName)) {
+ final String secretIdClone = reader.getString();
+ secreteIdUri = secretIdClone;
+ parsedProperties.put(URI, secreteIdUri);
+ isSecretIdUriValid = true;
+ } else {
+ // The extension property is possible, we should not skip it.
+ parsedProperties.put(fieldName, reader.readUntyped());
+ }
+ }
+
+ // update strongly-typed property, 'secretId'.
+ this.secretId = secreteIdUri;
+ return isSecretIdUriValid;
+ });
+ } catch (IOException e) {
+ isValidSecretReferenceValue = false;
+ throw LOGGER.logExceptionAsError(new IllegalArgumentException(e));
}
}
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SnapshotSelector.java b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SnapshotSelector.java
index 6b03d85a2f24..6807fb63a060 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SnapshotSelector.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/main/java/com/azure/data/appconfiguration/models/SnapshotSelector.java
@@ -21,6 +21,11 @@ public final class SnapshotSelector {
private List fields;
+ /**
+ * Creates an instance of {@link SnapshotSelector}.
+ */
+ public SnapshotSelector() { }
+
/**
* Gets the snapshot name
*
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java
index a8d2539d635d..41f9e38f4145 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationAsyncClientTest.java
@@ -256,6 +256,38 @@ public void setFeatureFlagConfigurationSettingConvenience(HttpClient httpClient,
.verifyComplete());
}
+ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
+ @MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
+ public void featureFlagConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion) {
+ client = getConfigurationAsyncClient(httpClient, serviceVersion);
+ featureFlagConfigurationSettingUnknownAttributesArePreservedRunner(
+ (expected) -> {
+ StepVerifier.create(client.addConfigurationSetting(expected))
+ .assertNext(response -> assertFeatureFlagConfigurationSettingEquals(
+ expected,
+ (FeatureFlagConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.setConfigurationSetting(expected))
+ .assertNext(response -> assertFeatureFlagConfigurationSettingEquals(
+ expected,
+ (FeatureFlagConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.getConfigurationSetting(expected))
+ .assertNext(response -> assertFeatureFlagConfigurationSettingEquals(
+ expected,
+ (FeatureFlagConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.deleteConfigurationSetting(expected))
+ .assertNext(response -> assertFeatureFlagConfigurationSettingEquals(expected,
+ (FeatureFlagConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.getConfigurationSetting(expected))
+ .verifyErrorSatisfies(
+ ex -> assertRestException(ex, HttpResponseException.class, HttpURLConnection.HTTP_NOT_FOUND));
+ });
+ }
+
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
public void setSecretReferenceConfigurationSettingConvenience(HttpClient httpClient,
@@ -269,6 +301,38 @@ public void setSecretReferenceConfigurationSettingConvenience(HttpClient httpCli
.verifyComplete());
}
+ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
+ @MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
+ public void secretReferenceConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion) {
+ client = getConfigurationAsyncClient(httpClient, serviceVersion);
+ secretReferenceConfigurationSettingUnknownAttributesArePreservedRunner(
+ (expected) -> {
+ StepVerifier.create(client.addConfigurationSetting(expected))
+ .assertNext(response -> assertSecretReferenceConfigurationSettingEquals(
+ expected,
+ (SecretReferenceConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.setConfigurationSetting(expected))
+ .assertNext(response -> assertSecretReferenceConfigurationSettingEquals(
+ expected,
+ (SecretReferenceConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.getConfigurationSetting(expected))
+ .assertNext(response -> assertSecretReferenceConfigurationSettingEquals(
+ expected,
+ (SecretReferenceConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.deleteConfigurationSetting(expected))
+ .assertNext(response -> assertSecretReferenceConfigurationSettingEquals(expected,
+ (SecretReferenceConfigurationSetting) response))
+ .verifyComplete();
+ StepVerifier.create(client.getConfigurationSetting(expected))
+ .verifyErrorSatisfies(
+ ex -> assertRestException(ex, HttpResponseException.class, HttpURLConnection.HTTP_NOT_FOUND));
+ });
+ }
+
/**
* Tests that when an ETag is passed to set it will only set if the current representation of the setting has the
* ETag. If the set ETag doesn't match anything the update won't happen, this will result in a 412. This will
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java
index 08bffda67f79..2c9509c21de1 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTest.java
@@ -220,6 +220,26 @@ public void setFeatureFlagConfigurationSettingConvenience(HttpClient httpClient,
(FeatureFlagConfigurationSetting) client.setConfigurationSetting(expected)));
}
+ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
+ @MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
+ public void featureFlagConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion) {
+ client = getConfigurationClient(httpClient, serviceVersion);
+ featureFlagConfigurationSettingUnknownAttributesArePreservedRunner(
+ (expected) -> {
+ assertFeatureFlagConfigurationSettingEquals(expected,
+ (FeatureFlagConfigurationSetting) client.addConfigurationSetting(expected));
+ assertFeatureFlagConfigurationSettingEquals(expected,
+ (FeatureFlagConfigurationSetting) client.setConfigurationSetting(expected));
+ assertFeatureFlagConfigurationSettingEquals(expected,
+ (FeatureFlagConfigurationSetting) client.getConfigurationSetting(expected));
+ assertFeatureFlagConfigurationSettingEquals(expected,
+ (FeatureFlagConfigurationSetting) client.deleteConfigurationSetting(expected));
+ assertRestException(() -> client.getConfigurationSetting(expected.getKey(), expected.getLabel()),
+ HttpResponseException.class, HttpURLConnection.HTTP_NOT_FOUND);
+ });
+ }
+
@ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
@MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
public void setSecretReferenceConfigurationSettingConvenience(HttpClient httpClient,
@@ -230,6 +250,26 @@ public void setSecretReferenceConfigurationSettingConvenience(HttpClient httpCli
(SecretReferenceConfigurationSetting) client.setConfigurationSetting(expected)));
}
+ @ParameterizedTest(name = DISPLAY_NAME_WITH_ARGUMENTS)
+ @MethodSource("com.azure.data.appconfiguration.TestHelper#getTestParameters")
+ public void secretReferenceConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion) {
+ client = getConfigurationClient(httpClient, serviceVersion);
+ secretReferenceConfigurationSettingUnknownAttributesArePreservedRunner(
+ (expected) -> {
+ assertSecretReferenceConfigurationSettingEquals(expected,
+ (SecretReferenceConfigurationSetting) client.addConfigurationSetting(expected));
+ assertSecretReferenceConfigurationSettingEquals(expected,
+ (SecretReferenceConfigurationSetting) client.setConfigurationSetting(expected));
+ assertSecretReferenceConfigurationSettingEquals(expected,
+ (SecretReferenceConfigurationSetting) client.getConfigurationSetting(expected));
+ assertSecretReferenceConfigurationSettingEquals(expected,
+ (SecretReferenceConfigurationSetting) client.deleteConfigurationSetting(expected));
+ assertRestException(() -> client.getConfigurationSetting(expected.getKey(), expected.getLabel()),
+ HttpResponseException.class, HttpURLConnection.HTTP_NOT_FOUND);
+ });
+ }
+
/**
* Tests that when an ETag is passed to set it will only set if the current representation of the setting has the
* ETag. If the set ETag doesn't match anything the update won't happen, this will result in a 412. This will
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java
index 8030b1e81322..0179ba5edd89 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/ConfigurationClientTestBase.java
@@ -184,6 +184,25 @@ void setFeatureFlagConfigurationSettingRunner(
getFeatureFlagConfigurationSetting(key, "new Feature Flag X"));
}
+ @Test
+ public abstract void featureFlagConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion);
+
+ void featureFlagConfigurationSettingUnknownAttributesArePreservedRunner(
+ Consumer testRunner) {
+ String key = getKey();
+ FeatureFlagConfigurationSetting featureFlagX = getFeatureFlagConfigurationSetting(key, "Feature Flag X");
+ String valueWithAdditionalFieldAtFirstLayer =
+ String.format(
+ "{\"id\":\"%s\",\"k1\":\"v1\",\"description\":\"%s\",\"display_name\":\"%s\",\"enabled\":%s,"
+ + "\"conditions\":{\"requirement_type\":\"All\",\"client_filters\":"
+ + "[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]"
+ + "},\"additional_field\":\"additional_value\"}", featureFlagX.getFeatureId(),
+ featureFlagX.getDescription(), featureFlagX.getDisplayName(), featureFlagX.isEnabled());
+ featureFlagX.setValue(valueWithAdditionalFieldAtFirstLayer);
+ testRunner.accept(featureFlagX);
+ }
+
@Test
public abstract void setSecretReferenceConfigurationSettingConvenience(HttpClient httpClient,
ConfigurationServiceVersion serviceVersion);
@@ -195,6 +214,20 @@ void setSecretReferenceConfigurationSettingRunner(
new SecretReferenceConfigurationSetting(key, "https://localhost/100"));
}
+ @Test
+ public abstract void secretReferenceConfigurationSettingUnknownAttributesArePreserved(HttpClient httpClient,
+ ConfigurationServiceVersion serviceVersion);
+
+ void secretReferenceConfigurationSettingUnknownAttributesArePreservedRunner(
+ Consumer testRunner) {
+ String key = getKey();
+ String valueWithAdditionalFields =
+ "{\"uri\":\"uriValue\",\"objectFiledName\":{\"unknown\":\"unknown\",\"unknown2\":\"unknown2\"},"
+ + "\"arrayFieldName\":[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]}";
+
+ testRunner.accept(new SecretReferenceConfigurationSetting(key, valueWithAdditionalFields));
+ }
+
@Test
public abstract void setConfigurationSettingIfETag(HttpClient httpClient,
ConfigurationServiceVersion serviceVersion);
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/FeatureFlagSettingUnitTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/FeatureFlagSettingUnitTest.java
index f471c47a3389..fe5c0c1e85f0 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/FeatureFlagSettingUnitTest.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/FeatureFlagSettingUnitTest.java
@@ -29,16 +29,6 @@ public class FeatureFlagSettingUnitTest {
static final String UPDATED_DISPLAY_NAME_VALUE = "updatedDisplayName";
static final boolean UPDATED_IS_ENABLED = true;
- String getFeatureFlagConfigurationSettingValue(String id, String description, String displayName,
- boolean isEnabled) {
- return String.format("{\"id\":\"%s\",\"description\":\"%s\",\"display_name\":\"%s\","
- + "\"enabled\":%s,"
- + "\"conditions\":{\"client_filters\":"
- + "[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]"
- + "}}",
- id, description, displayName, isEnabled);
- }
-
@Test
public void accessingStronglyTypedPropertiesAfterSettingDifferentFeatureFlagJSON() {
// Create a new feature flag configuration setting,
@@ -64,16 +54,12 @@ public void accessingStronglyTypedPropertiesAfterSettingDifferentFeatureFlagJSON
@Test
public void accessingValueAfterChangingStronglyTypedProperties() {
- // Create a new feature flag configuration setting,
- final List featureFlagFilters = Arrays.asList(
- getFlagFilter(FILTER_NAME, getFilterParameters()));
- FeatureFlagConfigurationSetting setting = getFeatureFlagConfigurationSetting(NEW_KEY, DESCRIPTION_VALUE,
- DISPLAY_NAME_VALUE, IS_ENABLED, featureFlagFilters);
-
+ FeatureFlagConfigurationSetting setting = createFeatureFlagConfigurationSetting();
String expectedNewSettingValue = getFeatureFlagConfigurationSettingValue(NEW_KEY, DESCRIPTION_VALUE,
DISPLAY_NAME_VALUE, IS_ENABLED);
+ // Test getValue()
assertEquals(expectedNewSettingValue, setting.getValue());
- // Change strongly-type properties.
+ // Update strongly-type properties.
setting.setFeatureId(UPDATED_KEY);
setting.setDescription(UPDATED_DESCRIPTION_VALUE);
setting.setDisplayName(UPDATED_DISPLAY_NAME_VALUE);
@@ -88,14 +74,34 @@ public void accessingValueAfterChangingStronglyTypedProperties() {
@Test
public void throwExceptionWhenInvalidNonJsonFeatureFlagValue() {
- // Create a new feature flag configuration setting,
- final List featureFlagFilters = Arrays.asList(
- getFlagFilter(FILTER_NAME, getFilterParameters()));
- FeatureFlagConfigurationSetting setting = getFeatureFlagConfigurationSetting(NEW_KEY, DESCRIPTION_VALUE,
- DISPLAY_NAME_VALUE, IS_ENABLED, featureFlagFilters);
+ FeatureFlagConfigurationSetting setting = createFeatureFlagConfigurationSetting();
+ String expectedValue = getFeatureFlagConfigurationSettingValue(NEW_KEY, DESCRIPTION_VALUE,
+ DISPLAY_NAME_VALUE, IS_ENABLED);
+
+ String originalValue = setting.getValue();
+ assertEquals(expectedValue, originalValue);
+
+ assertThrows(IllegalArgumentException.class, () -> setting.setValue("invalidValueForFeatureFlagSetting"));
+ assertEquals(expectedValue, setting.getValue());
+ assertThrows(IllegalArgumentException.class, () -> setting.getFeatureId());
+ assertThrows(IllegalArgumentException.class, () -> setting.getDescription());
+ assertThrows(IllegalArgumentException.class, () -> setting.getDisplayName());
+ assertThrows(IllegalArgumentException.class, () -> setting.isEnabled());
+ assertThrows(IllegalArgumentException.class, () -> setting.getClientFilters());
+ }
- // Throws IllegalStateException when setting value to non-JSON
- assertThrows(IllegalStateException.class, () -> setting.setValue("Hello World"));
+ @Test
+ public void reserveUnknownPropertiesTest() {
+ FeatureFlagConfigurationSetting setting = createFeatureFlagConfigurationSetting();
+ String newSettingValueJSON = getUnknownPropertiesFeatureFlagConfigurationSettingValue(
+ UPDATED_KEY, UPDATED_DESCRIPTION_VALUE, UPDATED_DISPLAY_NAME_VALUE, UPDATED_IS_ENABLED);
+
+ setting.setValue(newSettingValueJSON);
+ assertEquals(newSettingValueJSON, setting.getValue());
+ assertEquals(UPDATED_KEY, setting.getFeatureId());
+ assertEquals(UPDATED_DESCRIPTION_VALUE, setting.getDescription());
+ assertEquals(UPDATED_DISPLAY_NAME_VALUE, setting.getDisplayName());
+ assertEquals(UPDATED_IS_ENABLED, setting.isEnabled());
}
@Test
@@ -106,6 +112,34 @@ public void addFilter() {
assertEquals(1, setting.getClientFilters().size());
}
+ private FeatureFlagConfigurationSetting createFeatureFlagConfigurationSetting() {
+ // Create a new feature flag configuration setting,
+ final List featureFlagFilters = Arrays.asList(
+ getFlagFilter(FILTER_NAME, getFilterParameters()));
+ return getFeatureFlagConfigurationSetting(NEW_KEY, DESCRIPTION_VALUE,
+ DISPLAY_NAME_VALUE, IS_ENABLED, featureFlagFilters);
+ }
+
+ private String getFeatureFlagConfigurationSettingValue(String id, String description, String displayName,
+ boolean isEnabled) {
+ return String.format("{\"id\":\"%s\",\"description\":\"%s\",\"display_name\":\"%s\","
+ + "\"enabled\":%s,"
+ + "\"conditions\":{\"client_filters\":"
+ + "[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]"
+ + "}}",
+ id, description, displayName, isEnabled);
+ }
+
+ private String getUnknownPropertiesFeatureFlagConfigurationSettingValue(String id, String description,
+ String displayName, boolean isEnabled) {
+ return String.format("{\"id\":\"%s\",\"additional_field_1\":\"additional_value_1\",\"description\":\"%s\",\"display_name\":\"%s\",\"enabled\":%s,"
+ + "\"conditions\":{\"requirement_type\":\"All\",\"client_filters\":"
+ + "[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]"
+ + "},\"objectFiledName\":{\"unknown\":\"unknown\",\"unknown2\":\"unknown2\"},"
+ + "\"arrayFieldName\":[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]}",
+ id, description, displayName, isEnabled);
+ }
+
private FeatureFlagConfigurationSetting getFeatureFlagConfigurationSetting(String id, String description,
String displayName, boolean isEnabled, List filters) {
return new FeatureFlagConfigurationSetting(id, isEnabled)
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/SecretReferenceConfigurationSettingUnitTest.java b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/SecretReferenceConfigurationSettingUnitTest.java
index 3d2de6f6383d..a2fff7b8b649 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/SecretReferenceConfigurationSettingUnitTest.java
+++ b/sdk/appconfiguration/azure-data-appconfiguration/src/test/java/com/azure/data/appconfiguration/SecretReferenceConfigurationSettingUnitTest.java
@@ -47,14 +47,34 @@ public void accessingValueAfterChangingStronglyTypedProperties() {
public void throwExceptionWhenInvalidNonJsonSecretReferenceValue() {
// Create a new feature flag configuration setting,
SecretReferenceConfigurationSetting setting = getSecretReferenceConfigurationSetting(NEW_KEY, SECRET_ID_VALUE);
- // Throws IllegalStateException when setting value to non-JSON
- assertThrows(IllegalStateException.class, () -> setting.setValue("Hello World"));
+
+ String expectedValue = getSecretReferenceConfigurationSettingValue(SECRET_ID_VALUE);
+ String originalValue = setting.getValue();
+ assertEquals(expectedValue, originalValue);
+ assertThrows(IllegalArgumentException.class, () -> setting.setValue("invalidValueForSecretReferenceConfigurationSetting"));
+ assertEquals(originalValue, setting.getValue());
+ assertThrows(IllegalArgumentException.class, () -> setting.getSecretId());
+ }
+
+ @Test
+ public void reserveUnknownPropertiesTest() {
+ SecretReferenceConfigurationSetting setting = getSecretReferenceConfigurationSetting(NEW_KEY, SECRET_ID_VALUE);
+ String newSettingValueJSON = getUnknownPropertiesSecretReferenceConfigurationSettingValue(UPDATED_SECRET_ID_VALUE);
+
+ setting.setValue(newSettingValueJSON);
+ assertEquals(newSettingValueJSON, setting.getValue());
+ assertEquals(UPDATED_SECRET_ID_VALUE, setting.getSecretId());
}
String getSecretReferenceConfigurationSettingValue(String secretId) {
return String.format("{\"uri\":\"%s\"}", secretId);
}
+ String getUnknownPropertiesSecretReferenceConfigurationSettingValue(String secretId) {
+ return String.format("{\"uri\":\"%s\",\"objectFiledName\":{\"unknown\":\"unknown\",\"unknown2\":\"unknown2\"},"
+ + "\"arrayFieldName\":[{\"name\":\"Microsoft.Percentage\",\"parameters\":{\"Value\":\"30\"}}]}", secretId);
+ }
+
private SecretReferenceConfigurationSetting getSecretReferenceConfigurationSetting(String key, String secretId) {
return new SecretReferenceConfigurationSetting(key, secretId);
}
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md b/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md
index 1cefab1ba3a1..fa1b8b3fe48f 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md
+++ b/sdk/appconfiguration/azure-data-appconfiguration/swagger/README.md
@@ -30,7 +30,7 @@ autorest
```yaml
namespace: com.azure.data.appconfiguration
input-file:
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/2f7a3cbda00c6ae4199940d500e5212b6481d9ea/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/preview/2022-11-01-preview/appconfiguration.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/main/specification/appconfiguration/data-plane/Microsoft.AppConfiguration/stable/2023-10-01/appconfiguration.json
models-subpackage: implementation.models
custom-types-subpackage: models
custom-types: KeyValueFields,KeyValueFilter,SettingFields,SnapshotSettingFilter,CompositionType,Snapshot,ConfigurationSettingsSnapshot,SnapshotStatus,SnapshotFields,SnapshotFields
diff --git a/sdk/attestation/azure-security-attestation/CHANGELOG.md b/sdk/attestation/azure-security-attestation/CHANGELOG.md
index bfa448438ff3..a44898062860 100644
--- a/sdk/attestation/azure-security-attestation/CHANGELOG.md
+++ b/sdk/attestation/azure-security-attestation/CHANGELOG.md
@@ -13,6 +13,14 @@
### Other Changes
+## 1.1.17 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+
## 1.1.16 (2023-08-18)
### Other Changes
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClientBuilder.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClientBuilder.java
index c161147f5383..db121be47038 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClientBuilder.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationAdministrationClientBuilder.java
@@ -131,6 +131,7 @@ public final class AttestationAdministrationClientBuilder implements
private static final String SDK_NAME = "name";
private static final String SDK_VERSION = "version";
private static final RetryPolicy DEFAULT_RETRY_POLICY = new RetryPolicy("retry-after-ms", ChronoUnit.MILLIS);
+ private static final ClientOptions DEFAULT_CLIENT_OPTIONS = new ClientOptions();
private final String[] dataplaneScope = new String[] {"https://attest.azure.net/.default"};
@@ -470,10 +471,12 @@ private AttestationClientImpl buildInnerClient() {
HttpPipeline pipeline = this.pipeline;
if (pipeline == null) {
+ ClientOptions localClientOptions = clientOptions != null ? clientOptions : DEFAULT_CLIENT_OPTIONS;
+
// Closest to API goes first, closest to wire goes last.
final List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(
- getApplicationId(clientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
+ getApplicationId(localClientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
@@ -491,12 +494,10 @@ private AttestationClientImpl buildInnerClient() {
}
policies.addAll(perRetryPolicies);
- if (clientOptions != null) {
- List httpHeaderList = new ArrayList<>();
- clientOptions.getHeaders().forEach(
- header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
- policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
- }
+ List httpHeaderList = new ArrayList<>();
+ localClientOptions.getHeaders().forEach(
+ header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
+ policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -505,6 +506,7 @@ private AttestationClientImpl buildInnerClient() {
pipeline = new HttpPipelineBuilder()
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
+ .clientOptions(localClientOptions)
.build();
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationClientBuilder.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationClientBuilder.java
index c95b282283ad..f15f14786aba 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationClientBuilder.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/AttestationClientBuilder.java
@@ -96,6 +96,7 @@ public final class AttestationClientBuilder implements
private static final String SDK_VERSION = "version";
private static final RetryPolicy DEFAULT_RETRY_POLICY = new RetryPolicy("retry-after-ms", ChronoUnit.MILLIS);
+ private static final ClientOptions DEFAULT_CLIENT_OPTIONS = new ClientOptions();
private final String[] dataplaneScope = new String[] {"https://attest.azure.net/.default"};
@@ -438,10 +439,12 @@ private AttestationClientImpl buildInnerClient() {
// which were provided.
HttpPipeline pipeline = this.pipeline;
if (pipeline == null) {
+ ClientOptions localClientOptions = clientOptions != null ? clientOptions : DEFAULT_CLIENT_OPTIONS;
+
// Closest to API goes first, closest to wire goes last.
final List policies = new ArrayList<>();
policies.add(new UserAgentPolicy(
- getApplicationId(clientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
+ getApplicationId(localClientOptions, httpLogOptions), CLIENT_NAME, CLIENT_VERSION, buildConfiguration));
policies.add(new RequestIdPolicy());
policies.add(new AddHeadersFromContextPolicy());
@@ -459,12 +462,10 @@ private AttestationClientImpl buildInnerClient() {
}
policies.addAll(perRetryPolicies);
- if (clientOptions != null) {
- List httpHeaderList = new ArrayList<>();
- clientOptions.getHeaders().forEach(
- header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
- policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
- }
+ List httpHeaderList = new ArrayList<>();
+ localClientOptions.getHeaders().forEach(
+ header -> httpHeaderList.add(new HttpHeader(header.getName(), header.getValue())));
+ policies.add(new AddHeadersPolicy(new HttpHeaders(httpHeaderList)));
HttpPolicyProviders.addAfterRetryPolicies(policies);
policies.add(new HttpLoggingPolicy(httpLogOptions));
@@ -473,6 +474,7 @@ private AttestationClientImpl buildInnerClient() {
pipeline = new HttpPipelineBuilder()
.policies(policies.toArray(new HttpPipelinePolicy[0]))
.httpClient(httpClient)
+ .clientOptions(localClientOptions)
.build();
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationDataInterpretation.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationDataInterpretation.java
index 474266f035d1..a2cc2689468c 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationDataInterpretation.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationDataInterpretation.java
@@ -37,8 +37,16 @@ public static AttestationDataInterpretation fromString(String name) {
return fromString(name, AttestationDataInterpretation.class);
}
- /** @return known AttestationType values. */
+ /**
+ * Returns a collection of {@link AttestationDataInterpretation} as values.
+ *
+ * @return known AttestationType values. */
public static Collection values() {
return values(AttestationDataInterpretation.class);
}
+
+ /**
+ * Creates an instance of {@link AttestationDataInterpretation}
+ */
+ public AttestationDataInterpretation() { }
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationPolicySetOptions.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationPolicySetOptions.java
index 859075bd7903..c77ffa91d025 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationPolicySetOptions.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationPolicySetOptions.java
@@ -22,6 +22,12 @@ public final class AttestationPolicySetOptions {
private String policy;
private AttestationSigningKey signer;
+
+ /**
+ * Creates an instance of {@link AttestationPolicySetOptions}
+ */
+ public AttestationPolicySetOptions() { }
+
/**
* Sets the options used to validate attestation tokens returned from the service.
* @param validationOptions Token Validation options to be used to enhance the validations
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationResponse.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationResponse.java
index 57cf3d2183f7..18c58ff288b3 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationResponse.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationResponse.java
@@ -11,6 +11,8 @@
/**
* The result of an attestation operation.
+ *
+ * @param The type of the attestation response value.
*/
@Immutable
public final class AttestationResponse extends ResponseBase {
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationSigningKey.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationSigningKey.java
index bf388979fb50..433e1918a4b3 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationSigningKey.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationSigningKey.java
@@ -38,14 +38,18 @@ public AttestationSigningKey(X509Certificate certificate, PrivateKey privateKey)
}
/**
- * @return Returns the X.509 certificate associated with this Signing Key.
+ * Returns the X.509 certificate associated with this Signing Key.
+ *
+ * @return the X.509 certificate.
*/
public X509Certificate getCertificate() {
return this.certificate;
}
/**
- * @return Returns the private key associated with this signing key.
+ * Returns the private key associated with this signing key.
+ *
+ * @return the private key.
*/
public PrivateKey getPrivateKey() {
return this.privateKey;
@@ -63,8 +67,9 @@ public AttestationSigningKey setWeakKeyAllowed(boolean weakKeyAllowed) {
}
/**
+ * Returns if a weak key is allowed on this signing key.
*
- * @return Returns if a weak key is allowed on this signing key.
+ * @return the boolean indicator.
*/
public boolean isWeakKeyAllowed() {
return this.weakKeyAllowed;
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationType.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationType.java
index 435094ad7068..ede11ebc0d8e 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationType.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/AttestationType.java
@@ -19,6 +19,11 @@ public final class AttestationType extends ExpandableStringEnum
/** Static value Tpm for AttestationType. */
public static final AttestationType TPM = fromString("Tpm");
+ /**
+ * Creates an instance of {@link AttestationType}
+ */
+ public AttestationType() { }
+
/**
* Creates or finds a AttestationType from its string representation.
*
@@ -30,7 +35,11 @@ public static AttestationType fromString(String name) {
return fromString(name, AttestationType.class);
}
- /** @return known AttestationType values. */
+ /**
+ * Returns the collection of {@link AttestationType} as values.
+ *
+ * @return the known AttestationType values.
+ */
public static Collection values() {
return values(AttestationType.class);
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/CertificateModification.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/CertificateModification.java
index 03e193cb8290..94c285e7b90d 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/CertificateModification.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/CertificateModification.java
@@ -16,6 +16,11 @@ public final class CertificateModification extends ExpandableStringEnum values() {
return values(CertificateModification.class);
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/PolicyModification.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/PolicyModification.java
index 799cb2ef2af5..c8b19d3261cb 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/PolicyModification.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/PolicyModification.java
@@ -16,6 +16,11 @@ public final class PolicyModification extends ExpandableStringEnum values() {
return values(PolicyModification.class);
}
diff --git a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/TpmAttestationResult.java b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/TpmAttestationResult.java
index a099824d4608..2a4229dc75c0 100644
--- a/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/TpmAttestationResult.java
+++ b/sdk/attestation/azure-security-attestation/src/main/java/com/azure/security/attestation/models/TpmAttestationResult.java
@@ -22,7 +22,11 @@ public TpmAttestationResult(BinaryData result) {
this.tpmResult = result;
}
- /** @return known Tpm Attestation Result. */
+ /**
+ * Returns the known Tpm Attestation result.
+ *
+ * @return the known Tpm Attestation Result.
+ */
public BinaryData getTpmResult() {
return tpmResult;
}
diff --git a/sdk/attestation/azure-security-attestation/src/test/java/com/azure/security/attestation/models/AttestationTokenTests.java b/sdk/attestation/azure-security-attestation/src/test/java/com/azure/security/attestation/models/AttestationTokenTests.java
index 2619b1baef65..5a202ac2656a 100644
--- a/sdk/attestation/azure-security-attestation/src/test/java/com/azure/security/attestation/models/AttestationTokenTests.java
+++ b/sdk/attestation/azure-security-attestation/src/test/java/com/azure/security/attestation/models/AttestationTokenTests.java
@@ -14,6 +14,8 @@
import java.security.cert.X509Certificate;
import java.time.OffsetDateTime;
import java.time.ZoneOffset;
+import java.time.format.DateTimeFormatter;
+import java.time.temporal.ChronoUnit;
import java.util.LinkedHashMap;
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
@@ -24,6 +26,7 @@
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.junit.jupiter.api.Assertions.fail;
/**
* Test for Attestation Signing Certificates APIs.
@@ -269,8 +272,7 @@ void verifyAttestationTokenIssuer() {
@Test
void verifyAttestationTokenExpireTimeout() {
- OffsetDateTime timeNow = OffsetDateTime.now();
- timeNow = timeNow.minusNanos(timeNow.getNano());
+ final OffsetDateTime timeNow = OffsetDateTime.now().truncatedTo(ChronoUnit.MICROS);
TestObject testObjectExpired30SecondsAgo = new TestObject()
.setAlg("Test Algorithm")
@@ -290,14 +292,36 @@ void verifyAttestationTokenExpireTimeout() {
((AttestationTokenImpl) newToken).validate(null,
new AttestationTokenValidationOptions()));
// Both the current time and the expiration time should be in the exception message.
- assertTrue(ex.getMessage().contains("expiration"));
+ String exceptionMessage = ex.getMessage();
+ assertTrue(exceptionMessage.contains("expiration"), () ->
+ "Expected exception message to contain 'expiration' but it didn't. Actual exception message: "
+ + exceptionMessage);
// Because the TestObject round-trips times through Epoch times, they are in UTC time.
// Adjust the target time to be in UTC rather than the current time zone, since we're checking to ensure
// that the time is reflected in the exception message.
OffsetDateTime expTime = timeNow.minusSeconds(30).withOffsetSameInstant(ZoneOffset.UTC);
- assertTrue(ex.getMessage().contains(String.format("%tc", timeNow)));
- assertTrue(ex.getMessage().contains(String.format("%tc", expTime)));
+ // Format of the exception message is "Current time: Expiration time: "
+ // Since the test could take a while and the current time is based on the time when the exception is thrown
+ // this can cause it to be different than 'timeNow' when the test started.
+ // To make sure this test isn't flaky capture the datetime string in the exception message, turn it into an
+ // OffsetDateTime and compare it to 'timeNow' allowing for some skew.
+ // Date format is 'Wed Sep 27 12:48:15 -04:00 2023'
+ DateTimeFormatter formatter = DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss XXX yyyy");
+
+ int currentTimeIndex = exceptionMessage.indexOf("Current time: ");
+ int expirationTimeIndex = exceptionMessage.indexOf("Expiration time: ");
+ String currentTimeInExceptionString = exceptionMessage.substring(currentTimeIndex + 14, expirationTimeIndex - 1);
+ OffsetDateTime currentTimeInException = OffsetDateTime.parse(currentTimeInExceptionString, formatter);
+ long skew = timeNow.until(currentTimeInException, ChronoUnit.SECONDS);
+ if (skew > 5 || skew < 0) {
+ fail(String.format("Expected exception message to contain 'Current Time' within 5 seconds, but not before, "
+ + "of %tc but it was greater. Actual exception message: %s", timeNow, exceptionMessage));
+ }
+
+ assertTrue(exceptionMessage.contains(String.format("%tc", expTime)), () -> String.format(
+ "Expected exception message to contain '%tc' but it didn't. Actual exception message: %s", expTime,
+ exceptionMessage));
}
@Test
diff --git a/sdk/communication/azure-communication-callautomation/CHANGELOG.md b/sdk/communication/azure-communication-callautomation/CHANGELOG.md
index 2f53818007df..9e5fc6faf43f 100644
--- a/sdk/communication/azure-communication-callautomation/CHANGELOG.md
+++ b/sdk/communication/azure-communication-callautomation/CHANGELOG.md
@@ -12,6 +12,15 @@
### Other Changes
+## 1.0.4 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.0.3 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-callautomation/pom.xml b/sdk/communication/azure-communication-callautomation/pom.xml
index 2082ed0fc3c8..853ed8cf20d5 100644
--- a/sdk/communication/azure-communication-callautomation/pom.xml
+++ b/sdk/communication/azure-communication-callautomation/pom.xml
@@ -60,18 +60,18 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
com.azure
azure-communication-identity
- 1.4.9
+ 1.4.10
test
com.azure
azure-messaging-servicebus
- 7.14.3
+ 7.14.4
test
@@ -137,7 +137,7 @@
com.azure
azure-communication-phonenumbers
- 1.1.5
+ 1.1.6
test
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java
index 38d0f35edc40..88e6490f7b8d 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallAutomationEventParser.java
@@ -3,6 +3,7 @@
package com.azure.communication.callautomation;
+import com.azure.communication.callautomation.models.events.AddParticipantCancelled;
import com.azure.communication.callautomation.models.events.AddParticipantFailed;
import com.azure.communication.callautomation.models.events.AddParticipantSucceeded;
import com.azure.communication.callautomation.models.events.CallAutomationEventBase;
@@ -10,6 +11,7 @@
import com.azure.communication.callautomation.models.events.CallDisconnected;
import com.azure.communication.callautomation.models.events.CallTransferAccepted;
import com.azure.communication.callautomation.models.events.CallTransferFailed;
+import com.azure.communication.callautomation.models.events.CancelAddParticipantFailed;
import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionStopped;
import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneFailed;
import com.azure.communication.callautomation.models.events.ContinuousDtmfRecognitionToneReceived;
@@ -130,6 +132,10 @@ private static CallAutomationEventBase parseSingleCloudEvent(String data, String
ret = mapper.convertValue(eventData, SendDtmfCompleted.class);
} else if (Objects.equals(eventType, "Microsoft.Communication.SendDtmfFailed")) {
ret = mapper.convertValue(eventData, SendDtmfFailed.class);
+ } else if (Objects.equals(eventType, "Microsoft.Communication.AddParticipantCancelled")) {
+ ret = mapper.convertValue(eventData, AddParticipantCancelled.class);
+ } else if (Objects.equals(eventType, "Microsoft.Communication.CancelAddParticipantFailed")) {
+ ret = mapper.convertValue(eventData, CancelAddParticipantFailed.class);
}
return ret;
} catch (RuntimeException e) {
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java
index d36138ab0e88..013d7d9a33b5 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnection.java
@@ -4,6 +4,8 @@
package com.azure.communication.callautomation;
import com.azure.communication.callautomation.models.CallParticipant;
+import com.azure.communication.callautomation.models.CancelAddParticipantOptions;
+import com.azure.communication.callautomation.models.CancelAddParticipantResult;
import com.azure.communication.callautomation.models.AddParticipantOptions;
import com.azure.communication.callautomation.models.AddParticipantResult;
import com.azure.communication.callautomation.models.CallConnectionProperties;
@@ -263,6 +265,33 @@ public Response unmuteParticipantsWithResponse(UnmuteP
return callConnectionAsync.unmuteParticipantWithResponseInternal(unmuteParticipantsOptions, context).block();
}
+ /**
+ * Cancel add participant request.
+ *
+ * @param invitationId invitation ID used to add participant.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return Result of cancelling add participant request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CancelAddParticipantResult cancelAddParticipant(String invitationId) {
+ return callConnectionAsync.cancelAddParticipant(invitationId).block();
+ }
+
+ /**
+ * Cancel add participant request.
+ *
+ * @param cancelAddParticipantOptions The options for cancelling add participant request.
+ * @param context A {@link Context} representing the request context.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return Response with result of cancelling add participant request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response cancelAddParticipantWithResponse(CancelAddParticipantOptions cancelAddParticipantOptions, Context context) {
+ return callConnectionAsync.cancelAddParticipantWithResponseInternal(cancelAddParticipantOptions, context).block();
+ }
+
//region Content management Actions
/***
* Returns an object of CallContent
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java
index a647ca70addd..b4504a00fc21 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallConnectionAsync.java
@@ -7,6 +7,7 @@
import com.azure.communication.callautomation.implementation.CallMediasImpl;
import com.azure.communication.callautomation.implementation.accesshelpers.AddParticipantResponseConstructorProxy;
import com.azure.communication.callautomation.implementation.accesshelpers.CallConnectionPropertiesConstructorProxy;
+import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy;
import com.azure.communication.callautomation.implementation.accesshelpers.MuteParticipantsResponseConstructorProxy;
import com.azure.communication.callautomation.implementation.accesshelpers.RemoveParticipantResponseConstructorProxy;
import com.azure.communication.callautomation.implementation.accesshelpers.TransferCallResponseConstructorProxy;
@@ -15,6 +16,7 @@
import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter;
import com.azure.communication.callautomation.implementation.converters.PhoneNumberIdentifierConverter;
import com.azure.communication.callautomation.implementation.models.AddParticipantRequestInternal;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantRequest;
import com.azure.communication.callautomation.implementation.models.CustomContext;
import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal;
import com.azure.communication.callautomation.implementation.models.RemoveParticipantRequestInternal;
@@ -22,6 +24,8 @@
import com.azure.communication.callautomation.implementation.models.UnmuteParticipantsRequestInternal;
import com.azure.communication.callautomation.models.AddParticipantResult;
import com.azure.communication.callautomation.models.CallParticipant;
+import com.azure.communication.callautomation.models.CancelAddParticipantOptions;
+import com.azure.communication.callautomation.models.CancelAddParticipantResult;
import com.azure.communication.callautomation.models.AddParticipantOptions;
import com.azure.communication.callautomation.models.CallConnectionProperties;
import com.azure.communication.callautomation.models.CallInvite;
@@ -488,6 +492,52 @@ Mono> unmuteParticipantWithResponseInternal(U
}
}
+ /**
+ * Cancel add participant request.
+ *
+ * @param invitationId invitation ID used to add participant.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return Result of cancelling add participant request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono cancelAddParticipant(String invitationId) {
+ return cancelAddParticipantWithResponse(new CancelAddParticipantOptions(invitationId)).flatMap(FluxUtil::toMono);
+ }
+
+ /**
+ * Cancel add participant request.
+ *
+ * @param cancelAddParticipantOptions Options bag for cancelAddParticipant.
+ * @throws HttpResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return Response with result of cancelling add participant request.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> cancelAddParticipantWithResponse(CancelAddParticipantOptions cancelAddParticipantOptions) {
+ return withContext(context -> cancelAddParticipantWithResponseInternal(cancelAddParticipantOptions, context));
+ }
+
+ Mono> cancelAddParticipantWithResponseInternal(CancelAddParticipantOptions cancelAddParticipantOptions, Context context) {
+ try {
+ context = context == null ? Context.NONE : context;
+
+ CancelAddParticipantRequest request = new CancelAddParticipantRequest()
+ .setInvitationId((cancelAddParticipantOptions.getInvitationId()))
+ .setOperationContext(cancelAddParticipantOptions.getOperationContext())
+ .setCallbackUri(cancelAddParticipantOptions.getCallbackUrl());
+
+ return callConnectionInternal.cancelAddParticipantWithResponseAsync(
+ callConnectionId,
+ request,
+ UUID.randomUUID(),
+ OffsetDateTime.now(),
+ context).map(response -> new SimpleResponse<>(response, CancelAddParticipantResponseConstructorProxy.create(response.getValue())));
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
//region Content management Actions
/***
* Returns an object of CallContentAsync
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java
index de6290608a08..162bdb1c4d8c 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMedia.java
@@ -8,6 +8,7 @@
import com.azure.communication.callautomation.models.PlayToAllOptions;
import com.azure.communication.callautomation.models.PlaySource;
import com.azure.communication.callautomation.models.CallMediaRecognizeOptions;
+import com.azure.communication.callautomation.models.StartHoldMusicOptions;
import com.azure.communication.common.CommunicationIdentifier;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceMethod;
@@ -217,4 +218,52 @@ public void stopContinuousDtmfRecognition(CommunicationIdentifier targetParticip
public Response stopContinuousDtmfRecognitionWithResponse(CommunicationIdentifier targetParticipant, String operationContext, String callbackUrl, Context context) {
return callMediaAsync.stopContinuousDtmfRecognitionWithResponseInternal(targetParticipant, operationContext, callbackUrl, context).block();
}
+
+ /**
+ * Holds participant in call.
+ * @param targetParticipant the target.
+ * @param playSourceInfo audio to play.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Void startHoldMusic(CommunicationIdentifier targetParticipant,
+ PlaySource playSourceInfo) {
+ return callMediaAsync.startHoldMusic(targetParticipant, playSourceInfo).block();
+ }
+
+ /**
+ * Holds participant in call.
+ * @param options - Different options to pass to the request.
+ * @param context Context
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startHoldMusicWithResponse(StartHoldMusicOptions options,
+ Context context) {
+ return callMediaAsync.startHoldMusicWithResponseInternal(options, context).block();
+ }
+
+ /**
+ * Removes hold from participant in call.
+ * @param targetParticipant the target.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Void stopHoldMusic(CommunicationIdentifier targetParticipant) {
+ return callMediaAsync.stopHoldMusicAsync(targetParticipant).block();
+ }
+
+ /**
+ * Removes hold from participant in call.
+ * @param targetParticipant the target.
+ * @param operationContext operational context.
+ * @param context Context.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response stopHoldMusicWithResponse(CommunicationIdentifier targetParticipant,
+ String operationContext,
+ Context context) {
+ return callMediaAsync.stopHoldMusicWithResponseInternal(targetParticipant, operationContext, context).block();
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java
index 4f2f708aca7f..e7cf5c239e15 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/CallMediaAsync.java
@@ -10,6 +10,8 @@
import com.azure.communication.callautomation.implementation.models.DtmfToneInternal;
import com.azure.communication.callautomation.implementation.models.FileSourceInternal;
import com.azure.communication.callautomation.implementation.models.GenderTypeInternal;
+import com.azure.communication.callautomation.implementation.models.StartHoldMusicRequestInternal;
+import com.azure.communication.callautomation.implementation.models.StopHoldMusicRequestInternal;
import com.azure.communication.callautomation.implementation.models.TextSourceInternal;
import com.azure.communication.callautomation.implementation.models.SsmlSourceInternal;
import com.azure.communication.callautomation.implementation.models.PlayOptionsInternal;
@@ -30,6 +32,7 @@
import com.azure.communication.callautomation.models.PlayOptions;
import com.azure.communication.callautomation.models.PlaySource;
import com.azure.communication.callautomation.models.RecognizeChoice;
+import com.azure.communication.callautomation.models.StartHoldMusicOptions;
import com.azure.communication.callautomation.models.TextSource;
import com.azure.communication.callautomation.models.SsmlSource;
import com.azure.communication.callautomation.models.CallMediaRecognizeOptions;
@@ -249,14 +252,7 @@ Mono> playToAllWithResponseInternal(PlayToAllOptions options, Con
}
PlayRequest getPlayRequest(PlayOptions options) {
- PlaySourceInternal playSourceInternal = new PlaySourceInternal();
- if (options.getPlaySource() instanceof FileSource) {
- playSourceInternal = getPlaySourceInternalFromFileSource((FileSource) options.getPlaySource());
- } else if (options.getPlaySource() instanceof TextSource) {
- playSourceInternal = getPlaySourceInternalFromTextSource((TextSource) options.getPlaySource());
- } else if (options.getPlaySource() instanceof SsmlSource) {
- playSourceInternal = getPlaySourceInternalFromSsmlSource((SsmlSource) options.getPlaySource());
- }
+ PlaySourceInternal playSourceInternal = convertPlaySourceToPlaySourceInternal(options.getPlaySource());
if (playSourceInternal.getSourceType() != null) {
PlayRequest request = new PlayRequest()
@@ -620,4 +616,83 @@ Mono> stopContinuousDtmfRecognitionWithResponseInternal(Communica
}
}
+ /**
+ * Holds participant in call.
+ * @param targetParticipant the target.
+ * @param playSourceInfo audio to play.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startHoldMusic(CommunicationIdentifier targetParticipant,
+ PlaySource playSourceInfo) {
+ return startHoldMusicWithResponseInternal(
+ new StartHoldMusicOptions(targetParticipant, playSourceInfo),
+ Context.NONE).then();
+ }
+
+ /**
+ * Holds participant in call.
+ * @param options - Different options to pass to the request.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> startHoldMusicWithResponse(StartHoldMusicOptions options) {
+ return withContext(context -> startHoldMusicWithResponseInternal(
+ options, context));
+ }
+
+ Mono> startHoldMusicWithResponseInternal(StartHoldMusicOptions options, Context context) {
+ try {
+ context = context == null ? Context.NONE : context;
+
+ StartHoldMusicRequestInternal request = new StartHoldMusicRequestInternal()
+ .setTargetParticipant(CommunicationIdentifierConverter.convert(options.getTargetParticipant()))
+ .setPlaySourceInfo(convertPlaySourceToPlaySourceInternal(options.getPlaySourceInfo()))
+ .setLoop(options.isLoop())
+ .setOperationContext(options.getOperationContext());
+
+ return contentsInternal
+ .startHoldMusicWithResponseAsync(callConnectionId, request, context);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
+
+ /**
+ * Removes hold from participant in call.
+ * @param targetParticipant the target.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopHoldMusicAsync(CommunicationIdentifier targetParticipant) {
+ return stopHoldMusicWithResponseAsync(targetParticipant, null).then();
+ }
+
+ /**
+ * Holds participant in call.
+ * @param targetParticipant the target.
+ * @param operationContext Operational context.
+ * @return Response for successful operation.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopHoldMusicWithResponseAsync(CommunicationIdentifier targetParticipant,
+ String operationContext) {
+ return withContext(context -> stopHoldMusicWithResponseInternal(targetParticipant, operationContext, context));
+ }
+
+ Mono> stopHoldMusicWithResponseInternal(CommunicationIdentifier targetParticipant,
+ String operationContext,
+ Context context) {
+ try {
+ context = context == null ? Context.NONE : context;
+ StopHoldMusicRequestInternal request = new StopHoldMusicRequestInternal()
+ .setTargetParticipant(CommunicationIdentifierConverter.convert(targetParticipant))
+ .setOperationContext(operationContext);
+
+ return contentsInternal
+ .stopHoldMusicWithResponseAsync(callConnectionId, request, context);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java
index 4690c7b02a5b..34e21ebfdefd 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallConnectionsImpl.java
@@ -8,6 +8,8 @@
import com.azure.communication.callautomation.implementation.models.AddParticipantResponseInternal;
import com.azure.communication.callautomation.implementation.models.CallConnectionPropertiesInternal;
import com.azure.communication.callautomation.implementation.models.CallParticipantInternal;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantRequest;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse;
import com.azure.communication.callautomation.implementation.models.CommunicationErrorResponseException;
import com.azure.communication.callautomation.implementation.models.GetParticipantsResponseInternal;
import com.azure.communication.callautomation.implementation.models.MuteParticipantsRequestInternal;
@@ -178,6 +180,19 @@ Mono> unmute(
@HeaderParam("Accept") String accept,
Context context);
+ @Post("/calling/callConnections/{callConnectionId}/participants:cancelAddParticipant")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> cancelAddParticipant(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @HeaderParam("Repeatability-Request-ID") UUID repeatabilityRequestID,
+ @HeaderParam("Repeatability-First-Sent") DateTimeRfc1123 repeatabilityFirstSent,
+ @BodyParam("application/json") CancelAddParticipantRequest cancelAddParticipantRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Get("/calling/callConnections/{callConnectionId}/participants/{participantRawId}")
@ExpectedResponses({200})
@UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
@@ -806,7 +821,7 @@ public Response transferToParticipantWithResponse(
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -837,7 +852,7 @@ public Mono> getParticipantsSinglePageAsy
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @param context The context to associate with this operation.
@@ -864,7 +879,7 @@ public Mono> getParticipantsSinglePageAsy
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -880,7 +895,7 @@ public PagedFlux getParticipantsAsync(String callConnec
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @param context The context to associate with this operation.
@@ -897,7 +912,7 @@ public PagedFlux getParticipantsAsync(String callConnec
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @throws IllegalArgumentException thrown if parameters fail the validation.
@@ -911,7 +926,7 @@ public PagedIterable getParticipants(String callConnect
}
/**
- * Get participants from a call.
+ * Get participants from a call. Recording and transcription bots are omitted from this list.
*
* @param callConnectionId The call connection Id.
* @param context The context to associate with this operation.
@@ -1811,6 +1826,228 @@ public Response unmuteWithResponse(
.block();
}
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> cancelAddParticipantWithResponseAsync(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent) {
+ final String accept = "application/json";
+ DateTimeRfc1123 repeatabilityFirstSentConverted =
+ repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent);
+ return FluxUtil.withContext(
+ context ->
+ service.cancelAddParticipant(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ repeatabilityRequestID,
+ repeatabilityFirstSentConverted,
+ cancelAddParticipantRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> cancelAddParticipantWithResponseAsync(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent,
+ Context context) {
+ final String accept = "application/json";
+ DateTimeRfc1123 repeatabilityFirstSentConverted =
+ repeatabilityFirstSent == null ? null : new DateTimeRfc1123(repeatabilityFirstSent);
+ return service.cancelAddParticipant(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ repeatabilityRequestID,
+ repeatabilityFirstSentConverted,
+ cancelAddParticipantRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono cancelAddParticipantAsync(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent) {
+ return cancelAddParticipantWithResponseAsync(
+ callConnectionId, cancelAddParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono cancelAddParticipantAsync(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent,
+ Context context) {
+ return cancelAddParticipantWithResponseAsync(
+ callConnectionId,
+ cancelAddParticipantRequest,
+ repeatabilityRequestID,
+ repeatabilityFirstSent,
+ context)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public CancelAddParticipantResponse cancelAddParticipant(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent) {
+ return cancelAddParticipantAsync(
+ callConnectionId, cancelAddParticipantRequest, repeatabilityRequestID, repeatabilityFirstSent)
+ .block();
+ }
+
+ /**
+ * Cancel add participant operation.
+ *
+ * @param callConnectionId The call connection Id.
+ * @param cancelAddParticipantRequest Cancellation request.
+ * @param repeatabilityRequestID If specified, the client directs that the request is repeatable; that is, that the
+ * client can make the request multiple times with the same Repeatability-Request-Id and get back an appropriate
+ * response without the server executing the request multiple times. The value of the Repeatability-Request-Id
+ * is an opaque string representing a client-generated unique identifier for the request. It is a version 4
+ * (random) UUID.
+ * @param repeatabilityFirstSent If Repeatability-Request-ID header is specified, then Repeatability-First-Sent
+ * header must also be specified. The value should be the date and time at which the request was first created,
+ * expressed using the IMF-fixdate form of HTTP-date. Example: Sun, 06 Nov 1994 08:49:37 GMT.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response cancelAddParticipantWithResponse(
+ String callConnectionId,
+ CancelAddParticipantRequest cancelAddParticipantRequest,
+ UUID repeatabilityRequestID,
+ OffsetDateTime repeatabilityFirstSent,
+ Context context) {
+ return cancelAddParticipantWithResponseAsync(
+ callConnectionId,
+ cancelAddParticipantRequest,
+ repeatabilityRequestID,
+ repeatabilityFirstSent,
+ context)
+ .block();
+ }
+
/**
* Get participant from a call.
*
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java
index ea118b000e62..388cc38ac951 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/CallMediasImpl.java
@@ -9,6 +9,11 @@
import com.azure.communication.callautomation.implementation.models.PlayRequest;
import com.azure.communication.callautomation.implementation.models.RecognizeRequest;
import com.azure.communication.callautomation.implementation.models.SendDtmfRequestInternal;
+import com.azure.communication.callautomation.implementation.models.StartHoldMusicRequestInternal;
+import com.azure.communication.callautomation.implementation.models.StartTranscriptionRequest;
+import com.azure.communication.callautomation.implementation.models.StopHoldMusicRequestInternal;
+import com.azure.communication.callautomation.implementation.models.StopTranscriptionRequest;
+import com.azure.communication.callautomation.implementation.models.UpdateTranscriptionDataRequest;
import com.azure.core.annotation.BodyParam;
import com.azure.core.annotation.ExpectedResponses;
import com.azure.core.annotation.HeaderParam;
@@ -64,6 +69,28 @@ Mono> play(
@HeaderParam("Accept") String accept,
Context context);
+ @Post("/calling/callConnections/{callConnectionId}:StartTranscription")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> startTranscription(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") StartTranscriptionRequest startTranscriptionRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Post("/calling/callConnections/{callConnectionId}:StopTranscripition")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> stopTranscription(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") StopTranscriptionRequest stopTranscriptionRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
@Post("/calling/callConnections/{callConnectionId}:cancelAllMediaOperations")
@ExpectedResponses({202})
@UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
@@ -119,6 +146,39 @@ Mono> sendDtmf(
@BodyParam("application/json") SendDtmfRequestInternal sendDtmfRequest,
@HeaderParam("Accept") String accept,
Context context);
+
+ @Post("/calling/callConnections/{callConnectionId}:updateTranscriptionData")
+ @ExpectedResponses({202})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> updateTranscriptionData(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") UpdateTranscriptionDataRequest updateTranscriptionDataRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Post("/calling/callConnections/{callConnectionId}:startHoldMusic")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> startHoldMusic(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") StartHoldMusicRequestInternal startHoldMusicRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
+
+ @Post("/calling/callConnections/{callConnectionId}:stopHoldMusic")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(CommunicationErrorResponseException.class)
+ Mono> stopHoldMusic(
+ @HostParam("endpoint") String endpoint,
+ @PathParam("callConnectionId") String callConnectionId,
+ @QueryParam("api-version") String apiVersion,
+ @BodyParam("application/json") StopHoldMusicRequestInternal stopHoldMusicRequest,
+ @HeaderParam("Accept") String accept,
+ Context context);
}
/**
@@ -226,6 +286,236 @@ public Response playWithResponse(String callConnectionId, PlayRequest play
return playWithResponseAsync(callConnectionId, playRequest, context).block();
}
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> startTranscriptionWithResponseAsync(
+ String callConnectionId, StartTranscriptionRequest startTranscriptionRequest) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.startTranscription(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ startTranscriptionRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> startTranscriptionWithResponseAsync(
+ String callConnectionId, StartTranscriptionRequest startTranscriptionRequest, Context context) {
+ final String accept = "application/json";
+ return service.startTranscription(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ startTranscriptionRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startTranscriptionAsync(
+ String callConnectionId, StartTranscriptionRequest startTranscriptionRequest) {
+ return startTranscriptionWithResponseAsync(callConnectionId, startTranscriptionRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startTranscriptionAsync(
+ String callConnectionId, StartTranscriptionRequest startTranscriptionRequest, Context context) {
+ return startTranscriptionWithResponseAsync(callConnectionId, startTranscriptionRequest, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void startTranscription(String callConnectionId, StartTranscriptionRequest startTranscriptionRequest) {
+ startTranscriptionAsync(callConnectionId, startTranscriptionRequest).block();
+ }
+
+ /**
+ * Starts transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startTranscriptionRequest The startTranscriptionRequest parameter.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startTranscriptionWithResponse(
+ String callConnectionId, StartTranscriptionRequest startTranscriptionRequest, Context context) {
+ return startTranscriptionWithResponseAsync(callConnectionId, startTranscriptionRequest, context).block();
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopTranscriptionWithResponseAsync(
+ String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.stopTranscription(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ stopTranscriptionRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopTranscriptionWithResponseAsync(
+ String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest, Context context) {
+ final String accept = "application/json";
+ return service.stopTranscription(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ stopTranscriptionRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopTranscriptionAsync(
+ String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest) {
+ return stopTranscriptionWithResponseAsync(callConnectionId, stopTranscriptionRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopTranscriptionAsync(
+ String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest, Context context) {
+ return stopTranscriptionWithResponseAsync(callConnectionId, stopTranscriptionRequest, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stopTranscription(String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest) {
+ stopTranscriptionAsync(callConnectionId, stopTranscriptionRequest).block();
+ }
+
+ /**
+ * Stops transcription in the call.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopTranscriptionRequest stop transcription request payload.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response stopTranscriptionWithResponse(
+ String callConnectionId, StopTranscriptionRequest stopTranscriptionRequest, Context context) {
+ return stopTranscriptionWithResponseAsync(callConnectionId, stopTranscriptionRequest, context).block();
+ }
+
/**
* Cancel all media operations in a call.
*
@@ -798,4 +1088,350 @@ public Response sendDtmfWithResponse(
String callConnectionId, SendDtmfRequestInternal sendDtmfRequest, Context context) {
return sendDtmfWithResponseAsync(callConnectionId, sendDtmfRequest, context).block();
}
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> updateTranscriptionDataWithResponseAsync(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.updateTranscriptionData(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ updateTranscriptionDataRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> updateTranscriptionDataWithResponseAsync(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest, Context context) {
+ final String accept = "application/json";
+ return service.updateTranscriptionData(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ updateTranscriptionDataRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateTranscriptionDataAsync(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest) {
+ return updateTranscriptionDataWithResponseAsync(callConnectionId, updateTranscriptionDataRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateTranscriptionDataAsync(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest, Context context) {
+ return updateTranscriptionDataWithResponseAsync(callConnectionId, updateTranscriptionDataRequest, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void updateTranscriptionData(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest) {
+ updateTranscriptionDataAsync(callConnectionId, updateTranscriptionDataRequest).block();
+ }
+
+ /**
+ * API to change transcription language.
+ *
+ * @param callConnectionId The call connection id.
+ * @param updateTranscriptionDataRequest The updateTranscriptionData request.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response updateTranscriptionDataWithResponse(
+ String callConnectionId, UpdateTranscriptionDataRequest updateTranscriptionDataRequest, Context context) {
+ return updateTranscriptionDataWithResponseAsync(callConnectionId, updateTranscriptionDataRequest, context)
+ .block();
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> startHoldMusicWithResponseAsync(
+ String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.startHoldMusic(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ startHoldMusicRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> startHoldMusicWithResponseAsync(
+ String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest, Context context) {
+ final String accept = "application/json";
+ return service.startHoldMusic(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ startHoldMusicRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startHoldMusicAsync(
+ String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest) {
+ return startHoldMusicWithResponseAsync(callConnectionId, startHoldMusicRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono startHoldMusicAsync(
+ String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest, Context context) {
+ return startHoldMusicWithResponseAsync(callConnectionId, startHoldMusicRequest, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void startHoldMusic(String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest) {
+ startHoldMusicAsync(callConnectionId, startHoldMusicRequest).block();
+ }
+
+ /**
+ * Hold participant from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param startHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response startHoldMusicWithResponse(
+ String callConnectionId, StartHoldMusicRequestInternal startHoldMusicRequest, Context context) {
+ return startHoldMusicWithResponseAsync(callConnectionId, startHoldMusicRequest, context).block();
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopHoldMusicWithResponseAsync(
+ String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest) {
+ final String accept = "application/json";
+ return FluxUtil.withContext(
+ context ->
+ service.stopHoldMusic(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ stopHoldMusicRequest,
+ accept,
+ context));
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> stopHoldMusicWithResponseAsync(
+ String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest, Context context) {
+ final String accept = "application/json";
+ return service.stopHoldMusic(
+ this.client.getEndpoint(),
+ callConnectionId,
+ this.client.getApiVersion(),
+ stopHoldMusicRequest,
+ accept,
+ context);
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopHoldMusicAsync(String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest) {
+ return stopHoldMusicWithResponseAsync(callConnectionId, stopHoldMusicRequest)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the completion.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono stopHoldMusicAsync(
+ String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest, Context context) {
+ return stopHoldMusicWithResponseAsync(callConnectionId, stopHoldMusicRequest, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public void stopHoldMusic(String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest) {
+ stopHoldMusicAsync(callConnectionId, stopHoldMusicRequest).block();
+ }
+
+ /**
+ * Unhold participants from the call using identifier.
+ *
+ * @param callConnectionId The call connection id.
+ * @param stopHoldMusicRequest The participants to be hold from the call.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws CommunicationErrorResponseException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Response stopHoldMusicWithResponse(
+ String callConnectionId, StopHoldMusicRequestInternal stopHoldMusicRequest, Context context) {
+ return stopHoldMusicWithResponseAsync(callConnectionId, stopHoldMusicRequest, context).block();
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/CancelAddParticipantResponseConstructorProxy.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/CancelAddParticipantResponseConstructorProxy.java
new file mode 100644
index 000000000000..a9cbc5bd06eb
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/accesshelpers/CancelAddParticipantResponseConstructorProxy.java
@@ -0,0 +1,59 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callautomation.implementation.accesshelpers;
+
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse;
+import com.azure.communication.callautomation.models.CancelAddParticipantResult;
+
+/**
+ * Helper class to access private values of {@link CancelAddParticipantResult} across package boundaries.
+ */
+public final class CancelAddParticipantResponseConstructorProxy {
+ private static CancelAddParticipantResponseConstructorAccessor accessor;
+
+ private CancelAddParticipantResponseConstructorProxy() { }
+
+ /**
+ * Type defining the methods to set the non-public properties of a {@link CancelAddParticipantResponseConstructorAccessor}
+ * instance.
+ */
+ public interface CancelAddParticipantResponseConstructorAccessor {
+ /**
+ * Creates a new instance of {@link CancelAddParticipantResult} backed by an internal instance of
+ * {@link CancelAddParticipantResult}.
+ *
+ * @param internalResponse The internal response.
+ * @return A new instance of {@link CancelAddParticipantResult}.
+ */
+ CancelAddParticipantResult create(CancelAddParticipantResponse internalResponse);
+ }
+
+ /**
+ * The method called from {@link CancelAddParticipantResult} to set it's accessor.
+ *
+ * @param accessor The accessor.
+ */
+ public static void setAccessor(final CancelAddParticipantResponseConstructorAccessor accessor) {
+ CancelAddParticipantResponseConstructorProxy.accessor = accessor;
+ }
+
+ /**
+ * Creates a new instance of {@link CancelAddParticipantResult} backed by an internal instance of
+ * {@link CancelAddParticipantResult}.
+ *
+ * @param internalResponse The internal response.
+ * @return A new instance of {@link CancelAddParticipantResult}.
+ */
+ public static CancelAddParticipantResult create(CancelAddParticipantResponse internalResponse) {
+ // This looks odd but is necessary, it is possible to engage the access helper before anywhere else in the
+ // application accesses BlobDownloadHeaders which triggers the accessor to be configured. So, if the accessor
+ // is null this effectively pokes the class to set up the accessor.
+ if (accessor == null) {
+ new CancelAddParticipantResult();
+ }
+
+ assert accessor != null;
+ return accessor.create(internalResponse);
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantCancelled.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantCancelled.java
new file mode 100644
index 000000000000..9a5aeba6318a
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantCancelled.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Successful cancel add participant event. */
+@Fluent
+public final class AddParticipantCancelled {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId")
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /*
+ * Participant that has been cancelled.
+ */
+ @JsonProperty(value = "participant")
+ private CommunicationIdentifierModel participant;
+
+ /*
+ * Invitation ID used to cancel the request.
+ */
+ @JsonProperty(value = "invitationId")
+ private String invitationId;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Set the callConnectionId property: Call connection ID.
+ *
+ * @param callConnectionId the callConnectionId value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setCallConnectionId(String callConnectionId) {
+ this.callConnectionId = callConnectionId;
+ return this;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+
+ /**
+ * Get the participant property: Participant that has been cancelled.
+ *
+ * @return the participant value.
+ */
+ public CommunicationIdentifierModel getParticipant() {
+ return this.participant;
+ }
+
+ /**
+ * Set the participant property: Participant that has been cancelled.
+ *
+ * @param participant the participant value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setParticipant(CommunicationIdentifierModel participant) {
+ this.participant = participant;
+ return this;
+ }
+
+ /**
+ * Get the invitationId property: Invitation ID used to cancel the request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return this.invitationId;
+ }
+
+ /**
+ * Set the invitationId property: Invitation ID used to cancel the request.
+ *
+ * @param invitationId the invitationId value to set.
+ * @return the AddParticipantCancelled object itself.
+ */
+ public AddParticipantCancelled setInvitationId(String invitationId) {
+ this.invitationId = invitationId;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantResponseInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantResponseInternal.java
index 681b6d100791..8f07f98fa8cc 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantResponseInternal.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AddParticipantResponseInternal.java
@@ -22,6 +22,12 @@ public final class AddParticipantResponseInternal {
@JsonProperty(value = "operationContext")
private String operationContext;
+ /*
+ * Invitation ID used to add a participant.
+ */
+ @JsonProperty(value = "invitationId")
+ private String invitationId;
+
/**
* Get the participant property: List of current participants in the call.
*
@@ -61,4 +67,24 @@ public AddParticipantResponseInternal setOperationContext(String operationContex
this.operationContext = operationContext;
return this;
}
+
+ /**
+ * Get the invitationId property: Invitation ID used to add a participant.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return this.invitationId;
+ }
+
+ /**
+ * Set the invitationId property: Invitation ID used to add a participant.
+ *
+ * @param invitationId the invitationId value to set.
+ * @return the AddParticipantResponseInternal object itself.
+ */
+ public AddParticipantResponseInternal setInvitationId(String invitationId) {
+ this.invitationId = invitationId;
+ return this;
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java
index a012cbe48168..36b08abbcc90 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/AnswerCallRequestInternal.java
@@ -34,6 +34,12 @@ public final class AnswerCallRequestInternal {
@JsonProperty(value = "mediaStreamingConfiguration")
private MediaStreamingConfigurationInternal mediaStreamingConfiguration;
+ /*
+ * Live Transcription Configuration.
+ */
+ @JsonProperty(value = "transcriptionConfiguration")
+ private TranscriptionConfiguration transcriptionConfiguration;
+
/*
* The endpoint URL of the Azure Cognitive Services resource attached
*/
@@ -127,6 +133,27 @@ public AnswerCallRequestInternal setMediaStreamingConfiguration(
return this;
}
+ /**
+ * Get the transcriptionConfiguration property: Live Transcription Configuration.
+ *
+ * @return the transcriptionConfiguration value.
+ */
+ public TranscriptionConfiguration getTranscriptionConfiguration() {
+ return this.transcriptionConfiguration;
+ }
+
+ /**
+ * Set the transcriptionConfiguration property: Live Transcription Configuration.
+ *
+ * @param transcriptionConfiguration the transcriptionConfiguration value to set.
+ * @return the AnswerCallRequestInternal object itself.
+ */
+ public AnswerCallRequestInternal setTranscriptionConfiguration(
+ TranscriptionConfiguration transcriptionConfiguration) {
+ this.transcriptionConfiguration = transcriptionConfiguration;
+ return this;
+ }
+
/**
* Get the azureCognitiveServicesEndpointUrl property: The endpoint URL of the Azure Cognitive Services resource
* attached.
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java
index 4681d0338283..e35f46b13e1d 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CallConnectionPropertiesInternal.java
@@ -47,6 +47,12 @@ public final class CallConnectionPropertiesInternal {
@JsonProperty(value = "mediaSubscriptionId")
private String mediaSubscriptionId;
+ /*
+ * SubscriptionId for transcription
+ */
+ @JsonProperty(value = "dataSubscriptionId")
+ private String dataSubscriptionId;
+
/*
* The source caller Id, a phone number, that's shown to the PSTN
* participant being invited.
@@ -201,6 +207,26 @@ public CallConnectionPropertiesInternal setMediaSubscriptionId(String mediaSubsc
return this;
}
+ /**
+ * Get the dataSubscriptionId property: SubscriptionId for transcription.
+ *
+ * @return the dataSubscriptionId value.
+ */
+ public String getDataSubscriptionId() {
+ return this.dataSubscriptionId;
+ }
+
+ /**
+ * Set the dataSubscriptionId property: SubscriptionId for transcription.
+ *
+ * @param dataSubscriptionId the dataSubscriptionId value to set.
+ * @return the CallConnectionPropertiesInternal object itself.
+ */
+ public CallConnectionPropertiesInternal setDataSubscriptionId(String dataSubscriptionId) {
+ this.dataSubscriptionId = dataSubscriptionId;
+ return this;
+ }
+
/**
* Get the sourceCallerIdNumber property: The source caller Id, a phone number, that's shown to the PSTN participant
* being invited. Required only when calling a PSTN callee.
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantFailed.java
new file mode 100644
index 000000000000..60d5f6ea3b88
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantFailed.java
@@ -0,0 +1,174 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Failed cancel add participant event. */
+@Fluent
+public final class CancelAddParticipantFailed {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId")
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /*
+ * Contains the resulting SIP code/sub-code and message from NGC services.
+ */
+ @JsonProperty(value = "resultInformation")
+ private ResultInformation resultInformation;
+
+ /*
+ * Invitation ID used to cancel the request.
+ */
+ @JsonProperty(value = "invitationId")
+ private String invitationId;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Set the callConnectionId property: Call connection ID.
+ *
+ * @param callConnectionId the callConnectionId value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setCallConnectionId(String callConnectionId) {
+ this.callConnectionId = callConnectionId;
+ return this;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return this.resultInformation;
+ }
+
+ /**
+ * Set the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @param resultInformation the resultInformation value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setResultInformation(ResultInformation resultInformation) {
+ this.resultInformation = resultInformation;
+ return this;
+ }
+
+ /**
+ * Get the invitationId property: Invitation ID used to cancel the request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return this.invitationId;
+ }
+
+ /**
+ * Set the invitationId property: Invitation ID used to cancel the request.
+ *
+ * @param invitationId the invitationId value to set.
+ * @return the CancelAddParticipantFailed object itself.
+ */
+ public CancelAddParticipantFailed setInvitationId(String invitationId) {
+ this.invitationId = invitationId;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantRequest.java
new file mode 100644
index 000000000000..f8369b2a0ad8
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantRequest.java
@@ -0,0 +1,93 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CancelAddParticipantRequest model. */
+@Fluent
+public final class CancelAddParticipantRequest {
+ /*
+ * Invitation ID used to add a participant.
+ */
+ @JsonProperty(value = "invitationId", required = true)
+ private String invitationId;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /*
+ * The callback URI to override the main callback URI.
+ */
+ @JsonProperty(value = "callbackUri")
+ private String callbackUri;
+
+ /**
+ * Get the invitationId property: Invitation ID used to add a participant.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return this.invitationId;
+ }
+
+ /**
+ * Set the invitationId property: Invitation ID used to add a participant.
+ *
+ * @param invitationId the invitationId value to set.
+ * @return the CancelAddParticipantRequest object itself.
+ */
+ public CancelAddParticipantRequest setInvitationId(String invitationId) {
+ this.invitationId = invitationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the CancelAddParticipantRequest object itself.
+ */
+ public CancelAddParticipantRequest setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+
+ /**
+ * Get the callbackUri property: The callback URI to override the main callback URI.
+ *
+ * @return the callbackUri value.
+ */
+ public String getCallbackUri() {
+ return this.callbackUri;
+ }
+
+ /**
+ * Set the callbackUri property: The callback URI to override the main callback URI.
+ *
+ * @param callbackUri the callbackUri value to set.
+ * @return the CancelAddParticipantRequest object itself.
+ */
+ public CancelAddParticipantRequest setCallbackUri(String callbackUri) {
+ this.callbackUri = callbackUri;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantResponse.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantResponse.java
new file mode 100644
index 000000000000..b8ab3772975e
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CancelAddParticipantResponse.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CancelAddParticipantResponse model. */
+@Fluent
+public final class CancelAddParticipantResponse {
+ /*
+ * Invitation ID used to cancel the add participant action.
+ */
+ @JsonProperty(value = "invitationId")
+ private String invitationId;
+
+ /*
+ * The operation context provided by client.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the invitationId property: Invitation ID used to cancel the add participant action.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return this.invitationId;
+ }
+
+ /**
+ * Set the invitationId property: Invitation ID used to cancel the add participant action.
+ *
+ * @param invitationId the invitationId value to set.
+ * @return the CancelAddParticipantResponse object itself.
+ */
+ public CancelAddParticipantResponse setInvitationId(String invitationId) {
+ this.invitationId = invitationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: The operation context provided by client.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: The operation context provided by client.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the CancelAddParticipantResponse object itself.
+ */
+ public CancelAddParticipantResponse setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java
index b1d4dde123c6..f02b7180ef96 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/CreateCallRequestInternal.java
@@ -55,6 +55,12 @@ public final class CreateCallRequestInternal {
@JsonProperty(value = "mediaStreamingConfiguration")
private MediaStreamingConfigurationInternal mediaStreamingConfiguration;
+ /*
+ * Live Transcription Configuration.
+ */
+ @JsonProperty(value = "transcriptionConfiguration")
+ private TranscriptionConfiguration transcriptionConfiguration;
+
/*
* The identifier of the Cognitive Service resource assigned to this call.
*/
@@ -210,6 +216,27 @@ public CreateCallRequestInternal setMediaStreamingConfiguration(
return this;
}
+ /**
+ * Get the transcriptionConfiguration property: Live Transcription Configuration.
+ *
+ * @return the transcriptionConfiguration value.
+ */
+ public TranscriptionConfiguration getTranscriptionConfiguration() {
+ return this.transcriptionConfiguration;
+ }
+
+ /**
+ * Set the transcriptionConfiguration property: Live Transcription Configuration.
+ *
+ * @param transcriptionConfiguration the transcriptionConfiguration value to set.
+ * @return the CreateCallRequestInternal object itself.
+ */
+ public CreateCallRequestInternal setTranscriptionConfiguration(
+ TranscriptionConfiguration transcriptionConfiguration) {
+ this.transcriptionConfiguration = transcriptionConfiguration;
+ return this;
+ }
+
/**
* Get the azureCognitiveServicesEndpointUrl property: The identifier of the Cognitive Service resource assigned to
* this call.
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java
index 7e3c908a8833..d97b6fe7408b 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogInputType.java
@@ -13,6 +13,9 @@ public final class DialogInputType extends ExpandableStringEnum
/** Static value powerVirtualAgents for DialogInputType. */
public static final DialogInputType POWER_VIRTUAL_AGENTS = fromString("powerVirtualAgents");
+ /** Static value azureOpenAI for DialogInputType. */
+ public static final DialogInputType AZURE_OPEN_AI = fromString("azureOpenAI");
+
/**
* Creates or finds a DialogInputType from its string representation.
*
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java
index 10aec7131ed9..72212d5c1f32 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/DialogOptions.java
@@ -14,7 +14,7 @@ public final class DialogOptions {
/*
* Bot identifier.
*/
- @JsonProperty(value = "botAppId", required = true)
+ @JsonProperty(value = "botAppId")
private String botAppId;
/*
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantRequestInternal.java
new file mode 100644
index 000000000000..bcb1df7180a2
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantRequestInternal.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The request payload for holding participant from the call. */
+@Fluent
+public final class HoldParticipantRequestInternal {
+ /*
+ * Participant to be held from the call.
+ */
+ @JsonProperty(value = "participantToHold", required = true)
+ private CommunicationIdentifierModel participantToHold;
+
+ /*
+ * Prompt to play while in hold.
+ */
+ @JsonProperty(value = "playSourceInfo", required = true)
+ private PlaySourceInternal playSourceInfo;
+
+ /*
+ * If the prompt will be looped or not.
+ */
+ @JsonProperty(value = "loop")
+ private Boolean loop;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the participantToHold property: Participant to be held from the call.
+ *
+ * @return the participantToHold value.
+ */
+ public CommunicationIdentifierModel getParticipantToHold() {
+ return this.participantToHold;
+ }
+
+ /**
+ * Set the participantToHold property: Participant to be held from the call.
+ *
+ * @param participantToHold the participantToHold value to set.
+ * @return the HoldParticipantRequestInternal object itself.
+ */
+ public HoldParticipantRequestInternal setParticipantToHold(CommunicationIdentifierModel participantToHold) {
+ this.participantToHold = participantToHold;
+ return this;
+ }
+
+ /**
+ * Get the playSourceInfo property: Prompt to play while in hold.
+ *
+ * @return the playSourceInfo value.
+ */
+ public PlaySourceInternal getPlaySourceInfo() {
+ return this.playSourceInfo;
+ }
+
+ /**
+ * Set the playSourceInfo property: Prompt to play while in hold.
+ *
+ * @param playSourceInfo the playSourceInfo value to set.
+ * @return the HoldParticipantRequestInternal object itself.
+ */
+ public HoldParticipantRequestInternal setPlaySourceInfo(PlaySourceInternal playSourceInfo) {
+ this.playSourceInfo = playSourceInfo;
+ return this;
+ }
+
+ /**
+ * Get the loop property: If the prompt will be looped or not.
+ *
+ * @return the loop value.
+ */
+ public Boolean isLoop() {
+ return this.loop;
+ }
+
+ /**
+ * Set the loop property: If the prompt will be looped or not.
+ *
+ * @param loop the loop value to set.
+ * @return the HoldParticipantRequestInternal object itself.
+ */
+ public HoldParticipantRequestInternal setLoop(Boolean loop) {
+ this.loop = loop;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the HoldParticipantRequestInternal object itself.
+ */
+ public HoldParticipantRequestInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantResponseInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantResponseInternal.java
new file mode 100644
index 000000000000..936a81a62ffd
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/HoldParticipantResponseInternal.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The response payload for unmuting participants from the call. */
+@Fluent
+public final class HoldParticipantResponseInternal {
+ /*
+ * The operation context provided by client.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the operationContext property: The operation context provided by client.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: The operation context provided by client.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the HoldParticipantResponseInternal object itself.
+ */
+ public HoldParticipantResponseInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStateResponseInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStateResponseInternal.java
index 8553b6ccba2b..5aa4c7cc30a5 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStateResponseInternal.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingStateResponseInternal.java
@@ -22,6 +22,12 @@ public final class RecordingStateResponseInternal {
@JsonProperty(value = "recordingState")
private RecordingStateInternal recordingState;
+ /*
+ * The recordingType property.
+ */
+ @JsonProperty(value = "recordingType")
+ private RecordingType recordingType;
+
/**
* Get the recordingId property: The recordingId property.
*
@@ -61,4 +67,24 @@ public RecordingStateResponseInternal setRecordingState(RecordingStateInternal r
this.recordingState = recordingState;
return this;
}
+
+ /**
+ * Get the recordingType property: The recordingType property.
+ *
+ * @return the recordingType value.
+ */
+ public RecordingType getRecordingType() {
+ return this.recordingType;
+ }
+
+ /**
+ * Set the recordingType property: The recordingType property.
+ *
+ * @param recordingType the recordingType value to set.
+ * @return the RecordingStateResponseInternal object itself.
+ */
+ public RecordingStateResponseInternal setRecordingType(RecordingType recordingType) {
+ this.recordingType = recordingType;
+ return this;
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingType.java
new file mode 100644
index 000000000000..b57759603d3b
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/RecordingType.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingType. */
+public final class RecordingType extends ExpandableStringEnum {
+ /** Static value acs for RecordingType. */
+ public static final RecordingType ACS = fromString("acs");
+
+ /** Static value teams for RecordingType. */
+ public static final RecordingType TEAMS = fromString("teams");
+
+ /**
+ * Creates or finds a RecordingType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingType.
+ */
+ @JsonCreator
+ public static RecordingType fromString(String name) {
+ return fromString(name, RecordingType.class);
+ }
+
+ /** @return known RecordingType values. */
+ public static Collection values() {
+ return values(RecordingType.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartHoldMusicRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartHoldMusicRequestInternal.java
new file mode 100644
index 000000000000..68374f5dc75e
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartHoldMusicRequestInternal.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The request payload for holding participant from the call. */
+@Fluent
+public final class StartHoldMusicRequestInternal {
+ /*
+ * Participant to be held from the call.
+ */
+ @JsonProperty(value = "targetParticipant", required = true)
+ private CommunicationIdentifierModel targetParticipant;
+
+ /*
+ * Prompt to play while in hold.
+ */
+ @JsonProperty(value = "playSourceInfo", required = true)
+ private PlaySourceInternal playSourceInfo;
+
+ /*
+ * If the prompt will be looped or not.
+ */
+ @JsonProperty(value = "loop")
+ private Boolean loop;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the targetParticipant property: Participant to be held from the call.
+ *
+ * @return the targetParticipant value.
+ */
+ public CommunicationIdentifierModel getTargetParticipant() {
+ return this.targetParticipant;
+ }
+
+ /**
+ * Set the targetParticipant property: Participant to be held from the call.
+ *
+ * @param targetParticipant the targetParticipant value to set.
+ * @return the StartHoldMusicRequestInternal object itself.
+ */
+ public StartHoldMusicRequestInternal setTargetParticipant(CommunicationIdentifierModel targetParticipant) {
+ this.targetParticipant = targetParticipant;
+ return this;
+ }
+
+ /**
+ * Get the playSourceInfo property: Prompt to play while in hold.
+ *
+ * @return the playSourceInfo value.
+ */
+ public PlaySourceInternal getPlaySourceInfo() {
+ return this.playSourceInfo;
+ }
+
+ /**
+ * Set the playSourceInfo property: Prompt to play while in hold.
+ *
+ * @param playSourceInfo the playSourceInfo value to set.
+ * @return the StartHoldMusicRequestInternal object itself.
+ */
+ public StartHoldMusicRequestInternal setPlaySourceInfo(PlaySourceInternal playSourceInfo) {
+ this.playSourceInfo = playSourceInfo;
+ return this;
+ }
+
+ /**
+ * Get the loop property: If the prompt will be looped or not.
+ *
+ * @return the loop value.
+ */
+ public Boolean isLoop() {
+ return this.loop;
+ }
+
+ /**
+ * Set the loop property: If the prompt will be looped or not.
+ *
+ * @param loop the loop value to set.
+ * @return the StartHoldMusicRequestInternal object itself.
+ */
+ public StartHoldMusicRequestInternal setLoop(Boolean loop) {
+ this.loop = loop;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the StartHoldMusicRequestInternal object itself.
+ */
+ public StartHoldMusicRequestInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequest.java
new file mode 100644
index 000000000000..e7bf37ee69d4
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StartTranscriptionRequest.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The StartTranscriptionRequest model. */
+@Fluent
+public final class StartTranscriptionRequest {
+ /*
+ * Defines Locale for the transcription e,g en-US
+ */
+ @JsonProperty(value = "locale")
+ private String locale;
+
+ /*
+ * The value to identify context of the operation.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the locale property: Defines Locale for the transcription e,g en-US.
+ *
+ * @return the locale value.
+ */
+ public String getLocale() {
+ return this.locale;
+ }
+
+ /**
+ * Set the locale property: Defines Locale for the transcription e,g en-US.
+ *
+ * @param locale the locale value to set.
+ * @return the StartTranscriptionRequest object itself.
+ */
+ public StartTranscriptionRequest setLocale(String locale) {
+ this.locale = locale;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: The value to identify context of the operation.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: The value to identify context of the operation.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the StartTranscriptionRequest object itself.
+ */
+ public StartTranscriptionRequest setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopHoldMusicRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopHoldMusicRequestInternal.java
new file mode 100644
index 000000000000..8e610bfedb83
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopHoldMusicRequestInternal.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The request payload for holding participant from the call. */
+@Fluent
+public final class StopHoldMusicRequestInternal {
+ /*
+ * Participants to be hold from the call.
+ * Only ACS Users are supported.
+ */
+ @JsonProperty(value = "targetParticipant", required = true)
+ private CommunicationIdentifierModel targetParticipant;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the targetParticipant property: Participants to be hold from the call. Only ACS Users are supported.
+ *
+ * @return the targetParticipant value.
+ */
+ public CommunicationIdentifierModel getTargetParticipant() {
+ return this.targetParticipant;
+ }
+
+ /**
+ * Set the targetParticipant property: Participants to be hold from the call. Only ACS Users are supported.
+ *
+ * @param targetParticipant the targetParticipant value to set.
+ * @return the StopHoldMusicRequestInternal object itself.
+ */
+ public StopHoldMusicRequestInternal setTargetParticipant(CommunicationIdentifierModel targetParticipant) {
+ this.targetParticipant = targetParticipant;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the StopHoldMusicRequestInternal object itself.
+ */
+ public StopHoldMusicRequestInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopTranscriptionRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopTranscriptionRequest.java
new file mode 100644
index 000000000000..7b59cd0c318d
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/StopTranscriptionRequest.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The StopTranscriptionRequest model. */
+@Fluent
+public final class StopTranscriptionRequest {
+ /*
+ * The value to identify context of the operation.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the operationContext property: The value to identify context of the operation.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: The value to identify context of the operation.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the StopTranscriptionRequest object itself.
+ */
+ public StopTranscriptionRequest setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionConfiguration.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionConfiguration.java
new file mode 100644
index 000000000000..4a2c174d4528
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionConfiguration.java
@@ -0,0 +1,119 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Configuration of live transcription. */
+@Fluent
+public final class TranscriptionConfiguration {
+ /*
+ * Transport URL for live transcription
+ */
+ @JsonProperty(value = "transportUrl", required = true)
+ private String transportUrl;
+
+ /*
+ * The type of transport to be used for live transcription, eg. Websocket
+ */
+ @JsonProperty(value = "transportType", required = true)
+ private TranscriptionTransportType transportType;
+
+ /*
+ * Defines the locale for the data e.g en-CA, en-AU
+ */
+ @JsonProperty(value = "locale", required = true)
+ private String locale;
+
+ /*
+ * Determines if the transcription should be started immediately after call
+ * is answered or not.
+ */
+ @JsonProperty(value = "startTranscription", required = true)
+ private boolean startTranscription;
+
+ /**
+ * Get the transportUrl property: Transport URL for live transcription.
+ *
+ * @return the transportUrl value.
+ */
+ public String getTransportUrl() {
+ return this.transportUrl;
+ }
+
+ /**
+ * Set the transportUrl property: Transport URL for live transcription.
+ *
+ * @param transportUrl the transportUrl value to set.
+ * @return the TranscriptionConfiguration object itself.
+ */
+ public TranscriptionConfiguration setTransportUrl(String transportUrl) {
+ this.transportUrl = transportUrl;
+ return this;
+ }
+
+ /**
+ * Get the transportType property: The type of transport to be used for live transcription, eg. Websocket.
+ *
+ * @return the transportType value.
+ */
+ public TranscriptionTransportType getTransportType() {
+ return this.transportType;
+ }
+
+ /**
+ * Set the transportType property: The type of transport to be used for live transcription, eg. Websocket.
+ *
+ * @param transportType the transportType value to set.
+ * @return the TranscriptionConfiguration object itself.
+ */
+ public TranscriptionConfiguration setTransportType(TranscriptionTransportType transportType) {
+ this.transportType = transportType;
+ return this;
+ }
+
+ /**
+ * Get the locale property: Defines the locale for the data e.g en-CA, en-AU.
+ *
+ * @return the locale value.
+ */
+ public String getLocale() {
+ return this.locale;
+ }
+
+ /**
+ * Set the locale property: Defines the locale for the data e.g en-CA, en-AU.
+ *
+ * @param locale the locale value to set.
+ * @return the TranscriptionConfiguration object itself.
+ */
+ public TranscriptionConfiguration setLocale(String locale) {
+ this.locale = locale;
+ return this;
+ }
+
+ /**
+ * Get the startTranscription property: Determines if the transcription should be started immediately after call is
+ * answered or not.
+ *
+ * @return the startTranscription value.
+ */
+ public boolean isStartTranscription() {
+ return this.startTranscription;
+ }
+
+ /**
+ * Set the startTranscription property: Determines if the transcription should be started immediately after call is
+ * answered or not.
+ *
+ * @param startTranscription the startTranscription value to set.
+ * @return the TranscriptionConfiguration object itself.
+ */
+ public TranscriptionConfiguration setStartTranscription(boolean startTranscription) {
+ this.startTranscription = startTranscription;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionFailed.java
new file mode 100644
index 000000000000..5b04d62dd070
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionFailed.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The TranscriptionFailed model. */
+@Fluent
+public final class TranscriptionFailed {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling answerCall action to correlate the
+ * request to the response event.
+ */
+ @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY)
+ private String operationContext;
+
+ /*
+ * Contains the resulting SIP code/sub-code and message from NGC services.
+ */
+ @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ResultInformation resultInformation;
+
+ /*
+ * Defines the result for TranscriptionUpdate with the current status and
+ * the details about the status
+ */
+ @JsonProperty(value = "transcriptionUpdateResult", access = JsonProperty.Access.WRITE_ONLY)
+ private TranscriptionUpdate transcriptionUpdateResult;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the TranscriptionFailed object itself.
+ */
+ public TranscriptionFailed setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the TranscriptionFailed object itself.
+ */
+ public TranscriptionFailed setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return this.resultInformation;
+ }
+
+ /**
+ * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status
+ * and the details about the status.
+ *
+ * @return the transcriptionUpdateResult value.
+ */
+ public TranscriptionUpdate getTranscriptionUpdateResult() {
+ return this.transcriptionUpdateResult;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionResumed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionResumed.java
new file mode 100644
index 000000000000..31f0d0ce0490
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionResumed.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The TranscriptionResumed model. */
+@Fluent
+public final class TranscriptionResumed {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling answerCall action to correlate the
+ * request to the response event.
+ */
+ @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY)
+ private String operationContext;
+
+ /*
+ * Contains the resulting SIP code/sub-code and message from NGC services.
+ */
+ @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ResultInformation resultInformation;
+
+ /*
+ * Defines the result for TranscriptionUpdate with the current status and
+ * the details about the status
+ */
+ @JsonProperty(value = "transcriptionUpdateResult", access = JsonProperty.Access.WRITE_ONLY)
+ private TranscriptionUpdate transcriptionUpdateResult;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the TranscriptionResumed object itself.
+ */
+ public TranscriptionResumed setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the TranscriptionResumed object itself.
+ */
+ public TranscriptionResumed setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return this.resultInformation;
+ }
+
+ /**
+ * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status
+ * and the details about the status.
+ *
+ * @return the transcriptionUpdateResult value.
+ */
+ public TranscriptionUpdate getTranscriptionUpdateResult() {
+ return this.transcriptionUpdateResult;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStarted.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStarted.java
new file mode 100644
index 000000000000..88ed3753de15
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStarted.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The TranscriptionStarted model. */
+@Fluent
+public final class TranscriptionStarted {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling answerCall action to correlate the
+ * request to the response event.
+ */
+ @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY)
+ private String operationContext;
+
+ /*
+ * Contains the resulting SIP code/sub-code and message from NGC services.
+ */
+ @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ResultInformation resultInformation;
+
+ /*
+ * Defines the result for TranscriptionUpdate with the current status and
+ * the details about the status
+ */
+ @JsonProperty(value = "transcriptionUpdateResult", access = JsonProperty.Access.WRITE_ONLY)
+ private TranscriptionUpdate transcriptionUpdateResult;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the TranscriptionStarted object itself.
+ */
+ public TranscriptionStarted setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the TranscriptionStarted object itself.
+ */
+ public TranscriptionStarted setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return this.resultInformation;
+ }
+
+ /**
+ * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status
+ * and the details about the status.
+ *
+ * @return the transcriptionUpdateResult value.
+ */
+ public TranscriptionUpdate getTranscriptionUpdateResult() {
+ return this.transcriptionUpdateResult;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStopped.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStopped.java
new file mode 100644
index 000000000000..dd27b183ce2e
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionStopped.java
@@ -0,0 +1,131 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The TranscriptionStopped model. */
+@Fluent
+public final class TranscriptionStopped {
+ /*
+ * Call connection ID.
+ */
+ @JsonProperty(value = "callConnectionId", access = JsonProperty.Access.WRITE_ONLY)
+ private String callConnectionId;
+
+ /*
+ * Server call ID.
+ */
+ @JsonProperty(value = "serverCallId")
+ private String serverCallId;
+
+ /*
+ * Correlation ID for event to call correlation. Also called ChainId for
+ * skype chain ID.
+ */
+ @JsonProperty(value = "correlationId")
+ private String correlationId;
+
+ /*
+ * Used by customers when calling answerCall action to correlate the
+ * request to the response event.
+ */
+ @JsonProperty(value = "operationContext", access = JsonProperty.Access.WRITE_ONLY)
+ private String operationContext;
+
+ /*
+ * Contains the resulting SIP code/sub-code and message from NGC services.
+ */
+ @JsonProperty(value = "resultInformation", access = JsonProperty.Access.WRITE_ONLY)
+ private ResultInformation resultInformation;
+
+ /*
+ * Defines the result for TranscriptionUpdate with the current status and
+ * the details about the status
+ */
+ @JsonProperty(value = "transcriptionUpdateResult", access = JsonProperty.Access.WRITE_ONLY)
+ private TranscriptionUpdate transcriptionUpdateResult;
+
+ /**
+ * Get the callConnectionId property: Call connection ID.
+ *
+ * @return the callConnectionId value.
+ */
+ public String getCallConnectionId() {
+ return this.callConnectionId;
+ }
+
+ /**
+ * Get the serverCallId property: Server call ID.
+ *
+ * @return the serverCallId value.
+ */
+ public String getServerCallId() {
+ return this.serverCallId;
+ }
+
+ /**
+ * Set the serverCallId property: Server call ID.
+ *
+ * @param serverCallId the serverCallId value to set.
+ * @return the TranscriptionStopped object itself.
+ */
+ public TranscriptionStopped setServerCallId(String serverCallId) {
+ this.serverCallId = serverCallId;
+ return this;
+ }
+
+ /**
+ * Get the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @return the correlationId value.
+ */
+ public String getCorrelationId() {
+ return this.correlationId;
+ }
+
+ /**
+ * Set the correlationId property: Correlation ID for event to call correlation. Also called ChainId for skype chain
+ * ID.
+ *
+ * @param correlationId the correlationId value to set.
+ * @return the TranscriptionStopped object itself.
+ */
+ public TranscriptionStopped setCorrelationId(String correlationId) {
+ this.correlationId = correlationId;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling answerCall action to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code/sub-code and message from NGC services.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return this.resultInformation;
+ }
+
+ /**
+ * Get the transcriptionUpdateResult property: Defines the result for TranscriptionUpdate with the current status
+ * and the details about the status.
+ *
+ * @return the transcriptionUpdateResult value.
+ */
+ public TranscriptionUpdate getTranscriptionUpdateResult() {
+ return this.transcriptionUpdateResult;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportType.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportType.java
new file mode 100644
index 000000000000..780908171932
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionTransportType.java
@@ -0,0 +1,31 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for TranscriptionTransportType. */
+public final class TranscriptionTransportType extends ExpandableStringEnum {
+ /** Static value websocket for TranscriptionTransportType. */
+ public static final TranscriptionTransportType WEBSOCKET = fromString("websocket");
+
+ /**
+ * Creates or finds a TranscriptionTransportType from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding TranscriptionTransportType.
+ */
+ @JsonCreator
+ public static TranscriptionTransportType fromString(String name) {
+ return fromString(name, TranscriptionTransportType.class);
+ }
+
+ /** @return known TranscriptionTransportType values. */
+ public static Collection values() {
+ return values(TranscriptionTransportType.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionUpdate.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionUpdate.java
new file mode 100644
index 000000000000..751a3a12c437
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/TranscriptionUpdate.java
@@ -0,0 +1,64 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The TranscriptionUpdate model. */
+@Fluent
+public final class TranscriptionUpdate {
+ /*
+ * The transcriptionStatus property.
+ */
+ @JsonProperty(value = "transcriptionStatus")
+ private String transcriptionStatus;
+
+ /*
+ * The transcriptionStatusDetails property.
+ */
+ @JsonProperty(value = "transcriptionStatusDetails")
+ private String transcriptionStatusDetails;
+
+ /**
+ * Get the transcriptionStatus property: The transcriptionStatus property.
+ *
+ * @return the transcriptionStatus value.
+ */
+ public String getTranscriptionStatus() {
+ return this.transcriptionStatus;
+ }
+
+ /**
+ * Set the transcriptionStatus property: The transcriptionStatus property.
+ *
+ * @param transcriptionStatus the transcriptionStatus value to set.
+ * @return the TranscriptionUpdate object itself.
+ */
+ public TranscriptionUpdate setTranscriptionStatus(String transcriptionStatus) {
+ this.transcriptionStatus = transcriptionStatus;
+ return this;
+ }
+
+ /**
+ * Get the transcriptionStatusDetails property: The transcriptionStatusDetails property.
+ *
+ * @return the transcriptionStatusDetails value.
+ */
+ public String getTranscriptionStatusDetails() {
+ return this.transcriptionStatusDetails;
+ }
+
+ /**
+ * Set the transcriptionStatusDetails property: The transcriptionStatusDetails property.
+ *
+ * @param transcriptionStatusDetails the transcriptionStatusDetails value to set.
+ * @return the TranscriptionUpdate object itself.
+ */
+ public TranscriptionUpdate setTranscriptionStatusDetails(String transcriptionStatusDetails) {
+ this.transcriptionStatusDetails = transcriptionStatusDetails;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantRequestInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantRequestInternal.java
new file mode 100644
index 000000000000..e7d7d054fa83
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantRequestInternal.java
@@ -0,0 +1,68 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The request payload for holding participant from the call. */
+@Fluent
+public final class UnholdParticipantRequestInternal {
+ /*
+ * Participants to be hold from the call.
+ * Only ACS Users are supported.
+ */
+ @JsonProperty(value = "participantToUnhold", required = true)
+ private CommunicationIdentifierModel participantToUnhold;
+
+ /*
+ * Used by customers when calling mid-call actions to correlate the request
+ * to the response event.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the participantToUnhold property: Participants to be hold from the call. Only ACS Users are supported.
+ *
+ * @return the participantToUnhold value.
+ */
+ public CommunicationIdentifierModel getParticipantToUnhold() {
+ return this.participantToUnhold;
+ }
+
+ /**
+ * Set the participantToUnhold property: Participants to be hold from the call. Only ACS Users are supported.
+ *
+ * @param participantToUnhold the participantToUnhold value to set.
+ * @return the UnholdParticipantRequestInternal object itself.
+ */
+ public UnholdParticipantRequestInternal setParticipantToUnhold(CommunicationIdentifierModel participantToUnhold) {
+ this.participantToUnhold = participantToUnhold;
+ return this;
+ }
+
+ /**
+ * Get the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: Used by customers when calling mid-call actions to correlate the request to
+ * the response event.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the UnholdParticipantRequestInternal object itself.
+ */
+ public UnholdParticipantRequestInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantResponseInternal.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantResponseInternal.java
new file mode 100644
index 000000000000..69520eb15f22
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UnholdParticipantResponseInternal.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The response payload for unmuting participants from the call. */
+@Fluent
+public final class UnholdParticipantResponseInternal {
+ /*
+ * The operation context provided by client.
+ */
+ @JsonProperty(value = "operationContext")
+ private String operationContext;
+
+ /**
+ * Get the operationContext property: The operation context provided by client.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return this.operationContext;
+ }
+
+ /**
+ * Set the operationContext property: The operation context provided by client.
+ *
+ * @param operationContext the operationContext value to set.
+ * @return the UnholdParticipantResponseInternal object itself.
+ */
+ public UnholdParticipantResponseInternal setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionDataRequest.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionDataRequest.java
new file mode 100644
index 000000000000..2b525886399f
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/implementation/models/UpdateTranscriptionDataRequest.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.implementation.models;
+
+import com.azure.core.annotation.Fluent;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The UpdateTranscriptionDataRequest model. */
+@Fluent
+public final class UpdateTranscriptionDataRequest {
+ /*
+ * Defines new locale for transcription.
+ */
+ @JsonProperty(value = "locale", required = true)
+ private String locale;
+
+ /**
+ * Get the locale property: Defines new locale for transcription.
+ *
+ * @return the locale value.
+ */
+ public String getLocale() {
+ return this.locale;
+ }
+
+ /**
+ * Set the locale property: Defines new locale for transcription.
+ *
+ * @param locale the locale value to set.
+ * @return the UpdateTranscriptionDataRequest object itself.
+ */
+ public UpdateTranscriptionDataRequest setLocale(String locale) {
+ this.locale = locale;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java
index 948882c41e25..d59bcdf74c9e 100644
--- a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/AddParticipantResult.java
@@ -23,6 +23,11 @@ public final class AddParticipantResult {
*/
private final String operationContext;
+ /*
+ * The invitation ID used to send out add participant request.
+ */
+ private final String invitationId;
+
static {
AddParticipantResponseConstructorProxy.setAccessor(
new AddParticipantResponseConstructorProxy.AddParticipantResponseConstructorAccessor() {
@@ -40,6 +45,7 @@ public AddParticipantResult create(AddParticipantResponseInternal internalHeader
public AddParticipantResult() {
this.participant = null;
this.operationContext = null;
+ this.invitationId = null;
}
/**
@@ -52,6 +58,7 @@ public AddParticipantResult() {
this.participant = CallParticipantConverter.convert(addParticipantResponseInternal.getParticipant());
this.operationContext = addParticipantResponseInternal.getOperationContext();
+ this.invitationId = addParticipantResponseInternal.getInvitationId();
}
/**
@@ -71,4 +78,14 @@ public CallParticipant getParticipant() {
public String getOperationContext() {
return this.operationContext;
}
+
+ /**
+ * Get the invitationId property: The invitation ID used to send out add
+ * participant request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return invitationId;
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOptions.java
new file mode 100644
index 000000000000..98a89a12325a
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantOptions.java
@@ -0,0 +1,85 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callautomation.models;
+
+import com.azure.core.annotation.Fluent;
+
+/**
+ * The options for cancelling add participant.
+ */
+@Fluent
+public final class CancelAddParticipantOptions {
+ /**
+ * The inviation ID used to cancel the add participant request.
+ */
+ private final String invitationId;
+
+ /**
+ * The operational context
+ */
+ private String operationContext;
+
+ /**
+ * Callback URI override
+ */
+ private String callbackUrl;
+
+ /**
+ * Constructor
+ *
+ * @param invitationId The inviation ID used to cancel the add participant request.
+ */
+ public CancelAddParticipantOptions(String invitationId) {
+ this.invitationId = invitationId;
+ }
+
+ /**
+ * Get the invitationId.
+ *
+ * @return invitationId
+ */
+ public String getInvitationId() {
+ return invitationId;
+ }
+
+ /**
+ * Get the operationContext.
+ *
+ * @return the operationContext
+ */
+ public String getOperationContext() {
+ return operationContext;
+ }
+
+ /**
+ * Get the callback URI override.
+ *
+ * @return the callbackUriOverride
+ */
+ public String getCallbackUrl() {
+ return callbackUrl;
+ }
+
+ /**
+ * Set the operationContext.
+ *
+ * @param operationContext the operationContext to set
+ * @return the CancelAddParticipantOptions object itself.
+ */
+ public CancelAddParticipantOptions setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+
+ /**
+ * Set the callbackUriOverride.
+ *
+ * @param callbackUrl the callbackUriOverride to set
+ * @return the CancelAddParticipantOptions object itself.
+ */
+ public CancelAddParticipantOptions setCallbackUrl(String callbackUrl) {
+ this.callbackUrl = callbackUrl;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantResult.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantResult.java
new file mode 100644
index 000000000000..ace335f408c2
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/CancelAddParticipantResult.java
@@ -0,0 +1,76 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callautomation.models;
+
+import java.util.Objects;
+
+import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy;
+import com.azure.communication.callautomation.implementation.accesshelpers.CancelAddParticipantResponseConstructorProxy.CancelAddParticipantResponseConstructorAccessor;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse;
+import com.azure.core.annotation.Immutable;
+
+/** The CancelAddParticipantResult model. */
+@Immutable
+public final class CancelAddParticipantResult {
+
+ /**
+ * The invitation ID used to cancel the add participant request.
+ */
+ private final String invitationId;
+
+ /**
+ * The operation context provided by client.
+ */
+ private final String operationContext;
+
+ static {
+ CancelAddParticipantResponseConstructorProxy.setAccessor(
+ new CancelAddParticipantResponseConstructorAccessor() {
+ @Override
+ public CancelAddParticipantResult create(CancelAddParticipantResponse internalHeaders) {
+ return new CancelAddParticipantResult(internalHeaders);
+ }
+ });
+ }
+
+ /**
+ * Public constructor.
+ */
+ public CancelAddParticipantResult() {
+ invitationId = null;
+ operationContext = null;
+ }
+
+ /**
+ * Package-private constructor of the class, used internally only.
+ *
+ * @param cancelAddParticipantResponseInternal The response from the service.
+ */
+ CancelAddParticipantResult(CancelAddParticipantResponse cancelAddParticipantResponseInternal) {
+ Objects.requireNonNull(cancelAddParticipantResponseInternal,
+ "cancelAddParticipantResponseInternal must not be null");
+
+ invitationId = cancelAddParticipantResponseInternal.getInvitationId();
+ operationContext = cancelAddParticipantResponseInternal.getOperationContext();
+ }
+
+ /**
+ * Get the invitationId property: The invitation ID used to cancel the add
+ * participant request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return invitationId;
+ }
+
+ /**
+ * Get the operationContext property: The operation context provided by client.
+ *
+ * @return the operationContext value.
+ */
+ public String getOperationContext() {
+ return operationContext;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java
new file mode 100644
index 000000000000..1ef9f5dc1364
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/StartHoldMusicOptions.java
@@ -0,0 +1,95 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callautomation.models;
+
+import com.azure.communication.common.CommunicationIdentifier;
+
+/**
+ * Options for the Start Hold Music operation.
+ */
+public class StartHoldMusicOptions {
+
+ /**
+ * Participant to put on hold.
+ */
+ private final CommunicationIdentifier targetParticipant;
+
+ /**
+ * Audio to play while on hold.
+ */
+ private final PlaySource playSourceInfo;
+
+ /**
+ * If Audio will loop. Default is true.
+ */
+ private boolean loop;
+
+ /**
+ * Operation context.
+ */
+ private String operationContext;
+
+ /**
+ * Create a new StartHoldMusicOptions object.
+ * @param targetParticipant Participant to be put on hold.
+ * @param playSourceInfo Audio to be played while on hold.
+ */
+ public StartHoldMusicOptions(CommunicationIdentifier targetParticipant, PlaySource playSourceInfo) {
+ this.targetParticipant = targetParticipant;
+ this.playSourceInfo = playSourceInfo;
+ loop = true;
+ }
+
+ /**
+ * Get Participant to be put on hold.
+ * @return participant.
+ */
+ public CommunicationIdentifier getTargetParticipant() {
+ return targetParticipant;
+ }
+
+ /**
+ * Get PlaySourceInfo
+ * @return the playSourceInfo.
+ */
+ public PlaySource getPlaySourceInfo() {
+ return playSourceInfo;
+ }
+
+ /**
+ * Get if the music is in loop.
+ * @return true for loop, false for play once.
+ */
+ public boolean isLoop() {
+ return loop;
+ }
+
+ /**
+ * Set the value for loop.
+ * @param loop - boolean.
+ * @return The StartHoldMusicOptions object.
+ */
+ public StartHoldMusicOptions setLoop(boolean loop) {
+ this.loop = loop;
+ return this;
+ }
+
+ /**
+ * Get the operation context.
+ * @return operation context.
+ */
+ public String getOperationContext() {
+ return operationContext;
+ }
+
+ /**
+ * Sets the operation context.
+ * @param operationContext Operation Context
+ * @return The StartHoldMusicOptions object.
+ */
+ public StartHoldMusicOptions setOperationContext(String operationContext) {
+ this.operationContext = operationContext;
+ return this;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/AddParticipantCancelled.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/AddParticipantCancelled.java
new file mode 100644
index 000000000000..97d31467ba7d
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/AddParticipantCancelled.java
@@ -0,0 +1,61 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.models.events;
+
+import java.util.Map;
+
+import com.azure.communication.callautomation.implementation.converters.CommunicationIdentifierConverter;
+import com.azure.communication.callautomation.implementation.models.CommunicationIdentifierModel;
+import com.azure.communication.common.CommunicationIdentifier;
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonIgnore;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+
+/** The AddParticipantCancelled model. */
+@Immutable
+public final class AddParticipantCancelled extends CallAutomationEventBase {
+ /*
+ * The invitation ID used to cancel the add participant request.
+ */
+ @JsonProperty(value = "invitationId")
+ private final String invitationId;
+
+ /*
+ * Participant who's invitation was cancelled
+ */
+ @JsonIgnore
+ private final CommunicationIdentifier participant;
+
+ @JsonCreator
+ private AddParticipantCancelled(@JsonProperty("participant") Map participant) {
+ invitationId = null;
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ this.participant = CommunicationIdentifierConverter
+ .convert(mapper.convertValue(participant, CommunicationIdentifierModel.class));
+ }
+
+ /**
+ * Get the participant property: Participant who's invitation was cancelled.
+ *
+ * @return the participant value.
+ */
+ public CommunicationIdentifier getParticipant() {
+ return this.participant;
+ }
+
+ /**
+ * Get the invitationId property: The invitation ID used to cancel the add
+ * participant request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return invitationId;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/CancelAddParticipantFailed.java b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/CancelAddParticipantFailed.java
new file mode 100644
index 000000000000..50e3b36a90d9
--- /dev/null
+++ b/sdk/communication/azure-communication-callautomation/src/main/java/com/azure/communication/callautomation/models/events/CancelAddParticipantFailed.java
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callautomation.models.events;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** The CancelAddParticipantFailed model. */
+@Immutable
+public final class CancelAddParticipantFailed extends CallAutomationEventBase {
+ /*
+ * The invitation ID used to cancel the add participant request.
+ */
+ @JsonProperty(value = "invitationId")
+ private final String invitationId;
+
+ /*
+ * Contains the resulting SIP code, sub-code and message.
+ */
+ @JsonProperty(value = "resultInformation")
+ private final ResultInformation resultInformation;
+
+ private CancelAddParticipantFailed() {
+ invitationId = null;
+ resultInformation = null;
+ }
+
+ /**
+ * Get the invitationId property: The invitation ID used to cancel the add participant request.
+ *
+ * @return the invitationId value.
+ */
+ public String getInvitationId() {
+ return invitationId;
+ }
+
+ /**
+ * Get the resultInformation property: Contains the resulting SIP code, sub-code
+ * and message.
+ *
+ * @return the resultInformation value.
+ */
+ public ResultInformation getResultInformation() {
+ return resultInformation;
+ }
+}
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserUnitTests.java
index fdeee37ea326..a6e1c6b27385 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallAutomationEventParserUnitTests.java
@@ -602,4 +602,71 @@ public void parseTransferAccptedEvent() {
assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2f-2234-655d-573a0d00443e", event.getTransferTarget().getRawId());
assertEquals("8:acs:3afbe310-c6d9-4b6f-a11e-c2aeb352f207_0000001a-0f2e-e2b4-655d-573a0d004434", event.getTransferee().getRawId());
}
+
+ @Test
+ public void parseAddParticipantCancelledEvent() {
+ String receivedEvent = "[{\n"
+ + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n"
+ + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n"
+ + "\"type\": \"Microsoft.Communication.AddParticipantCancelled\",\n"
+ + "\"data\": {\n"
+ + "\"operationContext\": \"context\",\n"
+ + "\"participant\": {\n"
+ + "\"rawId\": \"rawId\",\n"
+ + "\"phoneNumber\": {\n"
+ + "\"value\": \"value\"\n"
+ + "}\n"
+ + "},\n"
+ + "\"callConnectionId\": \"callConnectionId\",\n"
+ + "\"serverCallId\": \"serverCallId\",\n"
+ + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n"
+ + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n"
+ + "},\n"
+ + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n"
+ + "\"specversion\": \"1.0\",\n"
+ + "\"datacontenttype\": \"application/json\",\n"
+ + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n"
+ + "}]";
+
+ CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0);
+ assertNotNull(event);
+
+ AddParticipantCancelled addParticipantCancelled = (AddParticipantCancelled) event;
+
+ assertNotNull(addParticipantCancelled);
+ assertEquals("serverCallId", addParticipantCancelled.getServerCallId());
+ assertEquals("callConnectionId", addParticipantCancelled.getCallConnectionId());
+ assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", addParticipantCancelled.getInvitationId());
+ }
+
+ @Test
+ public void parseCancelAddParticipantFailedEvent() {
+ String receivedEvent = "[{\n"
+ + "\"id\": \"c3220fa3-79bd-473e-96a2-3ecb5be7d71f\",\n"
+ + "\"source\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\",\n"
+ + "\"type\": \"Microsoft.Communication.CancelAddParticipantFailed\",\n"
+ + "\"data\": {\n"
+ + "\"operationContext\": \"context\",\n"
+ + "\"callConnectionId\": \"callConnectionId\",\n"
+ + "\"serverCallId\": \"serverCallId\",\n"
+ + "\"invitationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\",\n"
+ + "\"correlationId\": \"b880bd5a-1916-470a-b43d-aabf3caff91c\"\n"
+ + "},\n"
+ + "\"time\": \"2023-03-22T16:57:09.287755+00:00\",\n"
+ + "\"specversion\": \"1.0\",\n"
+ + "\"datacontenttype\": \"application/json\",\n"
+ + "\"subject\": \"calling/callConnections/421f3500-f5de-4c12-bf61-9e2641433687\"\n"
+ + "}]";
+
+ CallAutomationEventBase event = CallAutomationEventParser.parseEvents(receivedEvent).get(0);
+
+ assertNotNull(event);
+
+ CancelAddParticipantFailed cancelAddParticipantFailed = (CancelAddParticipantFailed) event;
+
+ assertNotNull(cancelAddParticipantFailed);
+ assertEquals("serverCallId", cancelAddParticipantFailed.getServerCallId());
+ assertEquals("callConnectionId", cancelAddParticipantFailed.getCallConnectionId());
+ assertEquals("b880bd5a-1916-470a-b43d-aabf3caff91c", cancelAddParticipantFailed.getInvitationId());
+ }
}
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 bc4941205f1b..7cd5df839e85 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
@@ -3,6 +3,7 @@
package com.azure.communication.callautomation;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse;
import com.azure.communication.callautomation.implementation.models.MuteParticipantsResponseInternal;
import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal;
import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal;
@@ -12,6 +13,8 @@
import com.azure.communication.callautomation.models.CallConnectionProperties;
import com.azure.communication.callautomation.models.CallInvite;
import com.azure.communication.callautomation.models.CallParticipant;
+import com.azure.communication.callautomation.models.CancelAddParticipantOptions;
+import com.azure.communication.callautomation.models.CancelAddParticipantResult;
import com.azure.communication.callautomation.models.MuteParticipantsOptions;
import com.azure.communication.callautomation.models.MuteParticipantsResult;
import com.azure.communication.callautomation.models.RemoveParticipantOptions;
@@ -433,4 +436,46 @@ public void unmuteMoreThanOneParticipantWithResponse() {
assertThrows(HttpResponseException.class,
() -> callConnectionAsync.unmuteParticipantsWithResponse(muteParticipantOptions).block());
}
+
+ @Test
+ public void cancelAddParticipant() {
+ String invitationId = "invitationId";
+
+ CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient(new ArrayList<>(
+ Collections.singletonList(
+ new SimpleEntry<>(serializeObject(new CancelAddParticipantResponse()
+ .setInvitationId(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT)), 202)
+ )))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ CancelAddParticipantResult result = callConnectionAsync.cancelAddParticipant(invitationId).block();
+
+ assertNotNull(result);
+ assertEquals(CALL_OPERATION_CONTEXT, result.getOperationContext());
+ assertEquals(invitationId, result.getInvitationId());
+ }
+
+ @Test
+ public void cancelAddParticipantWithResponse() {
+ String invitationId = "invitationId";
+
+ CallConnectionAsync callConnectionAsync = getCallAutomationAsyncClient(new ArrayList<>(
+ Collections.singletonList(
+ new SimpleEntry<>(serializeObject(new CancelAddParticipantResponse()
+ .setInvitationId(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT)), 202)
+ )))
+ .getCallConnectionAsync(CALL_CONNECTION_ID);
+
+ CancelAddParticipantOptions options = new CancelAddParticipantOptions(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT);
+ Response response = callConnectionAsync.cancelAddParticipantWithResponse(
+ options).block();
+
+
+ assertNotNull(response);
+ assertEquals(202, response.getStatusCode());
+ assertNotNull(response.getValue());
+ }
}
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 d8a907c25a9c..a57a4c028ff3 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
@@ -3,6 +3,7 @@
package com.azure.communication.callautomation;
+import com.azure.communication.callautomation.implementation.models.CancelAddParticipantResponse;
import com.azure.communication.callautomation.implementation.models.MuteParticipantsResponseInternal;
import com.azure.communication.callautomation.implementation.models.RemoveParticipantResponseInternal;
import com.azure.communication.callautomation.implementation.models.TransferCallResponseInternal;
@@ -12,6 +13,8 @@
import com.azure.communication.callautomation.models.CallConnectionProperties;
import com.azure.communication.callautomation.models.CallInvite;
import com.azure.communication.callautomation.models.CallParticipant;
+import com.azure.communication.callautomation.models.CancelAddParticipantOptions;
+import com.azure.communication.callautomation.models.CancelAddParticipantResult;
import com.azure.communication.callautomation.models.MuteParticipantsOptions;
import com.azure.communication.callautomation.models.MuteParticipantsResult;
import com.azure.communication.callautomation.models.RemoveParticipantOptions;
@@ -326,4 +329,46 @@ public void unmuteParticipantWithResponse() {
assertEquals(202, unmuteParticipantsResultResponse.getStatusCode());
assertNotNull(unmuteParticipantsResultResponse.getValue());
}
+
+ @Test
+ public void cancelAddParticipant() {
+ String invitationId = "invitationId";
+
+ CallConnection callConnection = getCallAutomationClient(new ArrayList<>(
+ Collections.singletonList(
+ new SimpleEntry<>(serializeObject(new CancelAddParticipantResponse()
+ .setInvitationId(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT)), 202)
+ )))
+ .getCallConnection(CALL_CONNECTION_ID);
+
+ CancelAddParticipantResult result = callConnection.cancelAddParticipant(invitationId);
+
+ assertNotNull(result);
+ assertEquals(CALL_OPERATION_CONTEXT, result.getOperationContext());
+ assertEquals(invitationId, result.getInvitationId());
+ }
+
+ @Test
+ public void cancelAddParticipantWithResponse() {
+ String invitationId = "invitationId";
+
+ CallConnection callConnection = getCallAutomationClient(new ArrayList<>(
+ Collections.singletonList(
+ new SimpleEntry<>(serializeObject(new CancelAddParticipantResponse()
+ .setInvitationId(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT)), 202)
+ )))
+ .getCallConnection(CALL_CONNECTION_ID);
+
+ CancelAddParticipantOptions options = new CancelAddParticipantOptions(invitationId)
+ .setOperationContext(CALL_OPERATION_CONTEXT);
+ Response response = callConnection.cancelAddParticipantWithResponse(
+ options, Context.NONE);
+
+
+ assertNotNull(response);
+ assertEquals(202, response.getStatusCode());
+ assertNotNull(response.getValue());
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java
index 017e40407327..ea959cd80ea8 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaAsyncUnitTests.java
@@ -12,6 +12,7 @@
import com.azure.communication.callautomation.models.DtmfTone;
import com.azure.communication.callautomation.models.FileSource;
import com.azure.communication.callautomation.models.GenderType;
+import com.azure.communication.callautomation.models.StartHoldMusicOptions;
import com.azure.communication.callautomation.models.TextSource;
import com.azure.communication.callautomation.models.SsmlSource;
import com.azure.communication.callautomation.models.PlayOptions;
@@ -43,11 +44,7 @@ public class CallMediaAsyncUnitTests {
@BeforeEach
public void setup() {
- CallConnectionAsync callConnection =
- CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>(
- Collections.singletonList(new AbstractMap.SimpleEntry<>("", 202)))
- );
- callMedia = callConnection.getCallMediaAsync();
+ callMedia = getMockCallMedia(202);
playFileSource = new FileSource();
playFileSource.setPlaySourceId("playFileSourceId");
@@ -176,11 +173,7 @@ public void recognizeWithResponseWithFileSourceDtmfOptions() {
@Test
public void startContinuousDtmfRecognitionWithResponse() {
// override callMedia to mock 200 response code
- CallConnectionAsync callConnection =
- CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>(
- Collections.singletonList(new AbstractMap.SimpleEntry<>("", 200)))
- );
- callMedia = callConnection.getCallMediaAsync();
+ callMedia = getMockCallMedia(200);
StepVerifier.create(
callMedia.startContinuousDtmfRecognitionWithResponse(new CommunicationUserIdentifier("id"),
"operationContext")
@@ -192,11 +185,7 @@ public void startContinuousDtmfRecognitionWithResponse() {
@Test
public void stopContinuousDtmfRecognitionWithResponse() {
// override callMedia to mock 200 response code
- CallConnectionAsync callConnection =
- CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>(
- Collections.singletonList(new AbstractMap.SimpleEntry<>("", 200)))
- );
- callMedia = callConnection.getCallMediaAsync();
+ callMedia = getMockCallMedia(200);
StepVerifier.create(
callMedia.stopContinuousDtmfRecognitionWithResponse(new CommunicationUserIdentifier("id"),
"operationContext", null)
@@ -337,4 +326,38 @@ public void recognizeWithResponseTextSpeechOrDtmfOptions() {
.consumeNextWith(response -> assertEquals(202, response.getStatusCode()))
.verifyComplete();
}
+
+ @Test
+ public void startHoldMusicWithResponseTest() {
+
+ callMedia = getMockCallMedia(200);
+ StartHoldMusicOptions options = new StartHoldMusicOptions(
+ new CommunicationUserIdentifier("id"),
+ new TextSource().setText("audio to play"));
+ StepVerifier.create(
+ callMedia.startHoldMusicWithResponse(options))
+ .consumeNextWith(response -> assertEquals(200, response.getStatusCode()))
+ .verifyComplete();
+ }
+
+ @Test
+ public void stopHoldMusicWithResponseTest() {
+
+ callMedia = getMockCallMedia(200);
+ StepVerifier.create(
+ callMedia.stopHoldMusicWithResponseAsync(
+ new CommunicationUserIdentifier("id"),
+ "operationalContext"
+ ))
+ .consumeNextWith(response -> assertEquals(200, response.getStatusCode()))
+ .verifyComplete();
+ }
+
+ private CallMediaAsync getMockCallMedia(int expectedStatusCode) {
+ CallConnectionAsync callConnection =
+ CallAutomationUnitTestBase.getCallConnectionAsync(new ArrayList<>(
+ Collections.singletonList(new AbstractMap.SimpleEntry<>("", expectedStatusCode)))
+ );
+ return callConnection.getCallMediaAsync();
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java
index a238fa7d0ded..5ca2c44dc991 100644
--- a/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java
+++ b/sdk/communication/azure-communication-callautomation/src/test/java/com/azure/communication/callautomation/CallMediaUnitTests.java
@@ -148,4 +148,30 @@ public void sendDtmfWithResponseTest() {
assertEquals(response.getStatusCode(), 202);
}
+ @Test
+ public void startHoldMusicWithResponseTest() {
+ CallConnection callConnection =
+ CallAutomationUnitTestBase.getCallConnection(new ArrayList<>(
+ Collections.singletonList(new AbstractMap.SimpleEntry<>("", 200)))
+ );
+ callMedia = callConnection.getCallMedia();
+ StartHoldMusicOptions options = new StartHoldMusicOptions(
+ new CommunicationUserIdentifier("id"),
+ new TextSource().setText("audio to play"));
+ Response response = callMedia.startHoldMusicWithResponse(options, null);
+ assertEquals(response.getStatusCode(), 200);
+ }
+
+ @Test
+ public void stopHoldMusicWithResponseTest() {
+ CallConnection callConnection =
+ CallAutomationUnitTestBase.getCallConnection(new ArrayList<>(
+ Collections.singletonList(new AbstractMap.SimpleEntry<>("", 200)))
+ );
+ callMedia = callConnection.getCallMedia();
+
+ Response response = callMedia.stopHoldMusicWithResponse(new CommunicationUserIdentifier("id"),
+ "operationalContext", Context.NONE);
+ assertEquals(response.getStatusCode(), 200);
+ }
}
diff --git a/sdk/communication/azure-communication-callautomation/swagger/README.md b/sdk/communication/azure-communication-callautomation/swagger/README.md
index 70c08934b55a..ff22a3619bd9 100644
--- a/sdk/communication/azure-communication-callautomation/swagger/README.md
+++ b/sdk/communication/azure-communication-callautomation/swagger/README.md
@@ -28,7 +28,7 @@ autorest README.md --java --v4 --use=@autorest/java@4.0.20 --use=@autorest/model
``` yaml
tag: package-2023-01-15-preview
require:
- - https://github.com/williamzhao87/azure-rest-api-specs/blob/18fef29e753a6637d5639874ab20825003ae2077/specification/communication/data-plane/CallAutomation/readme.md
+ - https://github.com/williamzhao87/azure-rest-api-specs/blob/8f5bd72f81f7fa9020f6834f06f3db54a475ee68/specification/communication/data-plane/CallAutomation/readme.md
java: true
output-folder: ../
license-header: MICROSOFT_MIT_SMALL
@@ -166,6 +166,12 @@ directive:
- rename-model:
from: UnmuteParticipantsResponse
to: UnmuteParticipantsResponseInternal
+- rename-model:
+ from: StartHoldMusicRequest
+ to: StartHoldMusicRequestInternal
+- rename-model:
+ from: StopHoldMusicRequest
+ to: StopHoldMusicRequestInternal
- rename-model:
from: CollectTonesResult
to: CollectTonesResultInternal
@@ -210,6 +216,8 @@ directive:
- remove-model: ContinuousDtmfRecognitionStopped
- remove-model: SendDtmfCompleted
- remove-model: SendDtmfFailed
+- remove-model: AddParticipantCancelled
+- remove-model: CancelAddParticipantFailed
```
### Rename RecordingChannelType to RecordingChannelInternal
diff --git a/sdk/communication/azure-communication-callingserver/pom.xml b/sdk/communication/azure-communication-callingserver/pom.xml
index f17fa8a6a615..beda36e82fe2 100644
--- a/sdk/communication/azure-communication-callingserver/pom.xml
+++ b/sdk/communication/azure-communication-callingserver/pom.xml
@@ -59,12 +59,12 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
com.azure
azure-communication-identity
- 1.4.9
+ 1.4.10
test
diff --git a/sdk/communication/azure-communication-chat/CHANGELOG.md b/sdk/communication/azure-communication-chat/CHANGELOG.md
index c3fc16648319..eeb7263c5cc7 100644
--- a/sdk/communication/azure-communication-chat/CHANGELOG.md
+++ b/sdk/communication/azure-communication-chat/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.3.12 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.3.11 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml
index ebbcd96e2b7f..f5d02ba25bdd 100644
--- a/sdk/communication/azure-communication-chat/pom.xml
+++ b/sdk/communication/azure-communication-chat/pom.xml
@@ -55,12 +55,12 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
com.azure
azure-communication-identity
- 1.4.9
+ 1.4.10
test
diff --git a/sdk/communication/azure-communication-common/CHANGELOG.md b/sdk/communication/azure-communication-common/CHANGELOG.md
index 449d3747a71b..daebd6080697 100644
--- a/sdk/communication/azure-communication-common/CHANGELOG.md
+++ b/sdk/communication/azure-communication-common/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 1.2.12 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-core-http-netty` from `1.13.6` to version `1.13.7`.
+
## 1.2.11 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-email/CHANGELOG.md b/sdk/communication/azure-communication-email/CHANGELOG.md
index 44f123036214..f15974821554 100644
--- a/sdk/communication/azure-communication-email/CHANGELOG.md
+++ b/sdk/communication/azure-communication-email/CHANGELOG.md
@@ -10,6 +10,16 @@
### Other Changes
+## 1.0.6 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-core-http-netty` from `1.13.6` to version `1.13.7`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.0.5 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-email/pom.xml b/sdk/communication/azure-communication-email/pom.xml
index c3b6e121b528..b8b92774a28b 100644
--- a/sdk/communication/azure-communication-email/pom.xml
+++ b/sdk/communication/azure-communication-email/pom.xml
@@ -65,7 +65,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
diff --git a/sdk/communication/azure-communication-identity/CHANGELOG.md b/sdk/communication/azure-communication-identity/CHANGELOG.md
index 6fd90ab28dd5..9eb8792ad6fe 100644
--- a/sdk/communication/azure-communication-identity/CHANGELOG.md
+++ b/sdk/communication/azure-communication-identity/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.4.10 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.4.9 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml
index f9bfcea3d6b4..5bf01e2521b5 100644
--- a/sdk/communication/azure-communication-identity/pom.xml
+++ b/sdk/communication/azure-communication-identity/pom.xml
@@ -68,7 +68,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
org.junit.jupiter
diff --git a/sdk/communication/azure-communication-jobrouter/pom.xml b/sdk/communication/azure-communication-jobrouter/pom.xml
index d159661e17af..7e314dd360f1 100644
--- a/sdk/communication/azure-communication-jobrouter/pom.xml
+++ b/sdk/communication/azure-communication-jobrouter/pom.xml
@@ -57,7 +57,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
io.projectreactor
diff --git a/sdk/communication/azure-communication-networktraversal/pom.xml b/sdk/communication/azure-communication-networktraversal/pom.xml
index 7538626edf93..0a8fac524ec0 100644
--- a/sdk/communication/azure-communication-networktraversal/pom.xml
+++ b/sdk/communication/azure-communication-networktraversal/pom.xml
@@ -66,7 +66,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
org.junit.jupiter
@@ -119,7 +119,7 @@
com.azure
azure-communication-identity
- 1.4.9
+ 1.4.10
test
diff --git a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
index 5f97d4971f54..5ed2fc13492c 100644
--- a/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
+++ b/sdk/communication/azure-communication-phonenumbers/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.1.6 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.1.5 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml
index eee9ef1296cb..ec01431650b6 100644
--- a/sdk/communication/azure-communication-phonenumbers/pom.xml
+++ b/sdk/communication/azure-communication-phonenumbers/pom.xml
@@ -68,7 +68,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
org.junit.jupiter
diff --git a/sdk/communication/azure-communication-rooms/CHANGELOG.md b/sdk/communication/azure-communication-rooms/CHANGELOG.md
index 1c26d49fe131..6b22a6e8c9fe 100644
--- a/sdk/communication/azure-communication-rooms/CHANGELOG.md
+++ b/sdk/communication/azure-communication-rooms/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.0.4 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.0.3 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-rooms/pom.xml b/sdk/communication/azure-communication-rooms/pom.xml
index 42d951b58bde..8239fabce04d 100644
--- a/sdk/communication/azure-communication-rooms/pom.xml
+++ b/sdk/communication/azure-communication-rooms/pom.xml
@@ -64,12 +64,12 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
com.azure
azure-communication-identity
- 1.4.9
+ 1.4.10
test
diff --git a/sdk/communication/azure-communication-rooms/src/test/java/com/azure/communication/rooms/RoomsAsyncClientTests.java b/sdk/communication/azure-communication-rooms/src/test/java/com/azure/communication/rooms/RoomsAsyncClientTests.java
index e7448303d492..ad1ab67b793c 100644
--- a/sdk/communication/azure-communication-rooms/src/test/java/com/azure/communication/rooms/RoomsAsyncClientTests.java
+++ b/sdk/communication/azure-communication-rooms/src/test/java/com/azure/communication/rooms/RoomsAsyncClientTests.java
@@ -131,7 +131,7 @@ public void createRoomFullCycleWithOutResponseStep(HttpClient httpClient) {
StepVerifier.create(response3)
.assertNext(result3 -> {
- assertEquals(true, result3.getValidUntil().toEpochSecond() > VALID_FROM.toEpochSecond());
+ assertEquals(true, result3.getValidUntil().toEpochSecond() > result3.getValidFrom().toEpochSecond());
}).verifyComplete();
Mono response4 = roomsAsyncClient.getRoom(roomId);
diff --git a/sdk/communication/azure-communication-sms/CHANGELOG.md b/sdk/communication/azure-communication-sms/CHANGELOG.md
index 59606b74ab23..a2a7eb88bedb 100644
--- a/sdk/communication/azure-communication-sms/CHANGELOG.md
+++ b/sdk/communication/azure-communication-sms/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.1.17 (2023-09-22)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.42.0` to version `1.43.0`.
+- Upgraded `azure-communication-common` from `1.2.11` to version `1.2.12`.
+
## 1.1.16 (2023-08-18)
### Other Changes
diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml
index 612cac00a97b..6238383a2c34 100644
--- a/sdk/communication/azure-communication-sms/pom.xml
+++ b/sdk/communication/azure-communication-sms/pom.xml
@@ -59,7 +59,7 @@
com.azure
azure-communication-common
- 1.2.11
+ 1.2.12
com.azure
diff --git a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
index 570f6db94a48..560d1aa4f071 100644
--- a/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
+++ b/sdk/communication/azure-resourcemanager-communication/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 2.1.0-beta.1 (Unreleased)
+## 2.1.0-beta.2 (Unreleased)
### Features Added
@@ -10,6 +10,35 @@
### Other Changes
+## 2.1.0-beta.1 (2023-09-18)
+
+- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+
+### Features Added
+
+* `models.ManagedServiceIdentityType` was added
+
+* `models.ManagedServiceIdentity` was added
+
+* `models.UserAssignedIdentity` was added
+
+#### `models.CommunicationServiceResource$Update` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.CommunicationServiceResource$Definition` was modified
+
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.CommunicationServiceResourceUpdate` was modified
+
+* `identity()` was added
+* `withIdentity(models.ManagedServiceIdentity)` was added
+
+#### `models.CommunicationServiceResource` was modified
+
+* `identity()` was added
+
## 2.0.0 (2023-04-03)
- Azure Resource Manager Communication client library for Java. This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
diff --git a/sdk/communication/azure-resourcemanager-communication/README.md b/sdk/communication/azure-resourcemanager-communication/README.md
index 4537b54f2822..21a361580f7e 100644
--- a/sdk/communication/azure-resourcemanager-communication/README.md
+++ b/sdk/communication/azure-resourcemanager-communication/README.md
@@ -2,7 +2,7 @@
Azure Resource Manager Communication client library for Java.
-This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-2023-03. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
+This package contains Microsoft Azure SDK for Communication Management SDK. REST API for Azure Communication Services. Package tag package-preview-2023-04. For documentation on how to use this package, please see [Azure Management Libraries for Java](https://aka.ms/azsdk/java/mgmt).
## We'd love to hear your feedback
@@ -32,7 +32,7 @@ Various documentation is available to help you get started
com.azure.resourcemanager
azure-resourcemanager-communication
- 2.0.0
+ 2.1.0-beta.1
```
[//]: # ({x-version-update-end})
@@ -103,3 +103,5 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[cg]: https://github.com/Azure/azure-sdk-for-java/blob/main/CONTRIBUTING.md
[coc]: https://opensource.microsoft.com/codeofconduct/
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
+
+
diff --git a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
index bd3b4e56097e..9917653680fd 100644
--- a/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
+++ b/sdk/communication/azure-resourcemanager-communication/SAMPLE.md
@@ -52,7 +52,7 @@ import com.azure.resourcemanager.communication.models.NameAvailabilityParameters
/** Samples for CommunicationServices CheckNameAvailability. */
public final class CommunicationServicesCheckNameAvailabilitySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityAvailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityAvailable.json
*/
/**
* Sample code: Check name availability available.
@@ -71,7 +71,7 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
}
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/checkNameAvailabilityUnavailable.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/checkNameAvailabilityUnavailable.json
*/
/**
* Sample code: Check name availability unavailable.
@@ -94,10 +94,13 @@ public final class CommunicationServicesCheckNameAvailabilitySamples {
### CommunicationServices_CreateOrUpdate
```java
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+
/** Samples for CommunicationServices CreateOrUpdate. */
public final class CommunicationServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdate.json
*/
/**
* Sample code: Create or update resource.
@@ -113,6 +116,26 @@ public final class CommunicationServicesCreateOrUpdateSamples {
.withDataLocation("United States")
.create();
}
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/createOrUpdateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Create or update resource with managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void createOrUpdateResourceWithManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ manager
+ .communicationServices()
+ .define("MyCommunicationResource")
+ .withRegion("Global")
+ .withExistingResourceGroup("MyResourceGroup")
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .withDataLocation("United States")
+ .create();
+ }
}
```
@@ -122,7 +145,7 @@ public final class CommunicationServicesCreateOrUpdateSamples {
/** Samples for CommunicationServices Delete. */
public final class CommunicationServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/delete.json
*/
/**
* Sample code: Delete resource.
@@ -143,7 +166,7 @@ public final class CommunicationServicesDeleteSamples {
/** Samples for CommunicationServices GetByResourceGroup. */
public final class CommunicationServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/get.json
*/
/**
* Sample code: Get resource.
@@ -167,7 +190,7 @@ import com.azure.resourcemanager.communication.models.LinkNotificationHubParamet
/** Samples for CommunicationServices LinkNotificationHub. */
public final class CommunicationServicesLinkNotificationHubSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/linkNotificationHub.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/linkNotificationHub.json
*/
/**
* Sample code: Link notification hub.
@@ -195,7 +218,7 @@ public final class CommunicationServicesLinkNotificationHubSamples {
/** Samples for CommunicationServices List. */
public final class CommunicationServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listBySubscription.json
*/
/**
* Sample code: List by subscription.
@@ -214,7 +237,7 @@ public final class CommunicationServicesListSamples {
/** Samples for CommunicationServices ListByResourceGroup. */
public final class CommunicationServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listByResourceGroup.json
*/
/**
* Sample code: List by resource group.
@@ -233,7 +256,7 @@ public final class CommunicationServicesListByResourceGroupSamples {
/** Samples for CommunicationServices ListKeys. */
public final class CommunicationServicesListKeysSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/listKeys.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/listKeys.json
*/
/**
* Sample code: List keys.
@@ -257,7 +280,7 @@ import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
/** Samples for CommunicationServices RegenerateKey. */
public final class CommunicationServicesRegenerateKeySamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/regenerateKey.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/regenerateKey.json
*/
/**
* Sample code: Regenerate key.
@@ -280,13 +303,16 @@ public final class CommunicationServicesRegenerateKeySamples {
```java
import com.azure.resourcemanager.communication.models.CommunicationServiceResource;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentityType;
+import com.azure.resourcemanager.communication.models.UserAssignedIdentity;
import java.util.HashMap;
import java.util.Map;
/** Samples for CommunicationServices Update. */
public final class CommunicationServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/update.json
*/
/**
* Sample code: Update resource.
@@ -303,6 +329,105 @@ public final class CommunicationServicesUpdateSamples {
resource.update().withTags(mapOf("newTag", "newVal")).apply();
}
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithUserAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a User Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddAUserAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAssignedIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add a System Assigned managed identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddASystemAssignedManagedIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateRemoveSystemIdentity.json
+ */
+ /**
+ * Sample code: Update resource to remove identity.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToRemoveIdentity(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(new ManagedServiceIdentity().withType(ManagedServiceIdentityType.NONE))
+ .apply();
+ }
+
+ /*
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/updateWithSystemAndUserIdentity.json
+ */
+ /**
+ * Sample code: Update resource to add System and User managed identities.
+ *
+ * @param manager Entry point to CommunicationManager.
+ */
+ public static void updateResourceToAddSystemAndUserManagedIdentities(
+ com.azure.resourcemanager.communication.CommunicationManager manager) {
+ CommunicationServiceResource resource =
+ manager
+ .communicationServices()
+ .getByResourceGroupWithResponse(
+ "MyResourceGroup", "MyCommunicationResource", com.azure.core.util.Context.NONE)
+ .getValue();
+ resource
+ .update()
+ .withTags(mapOf("newTag", "newVal"))
+ .withIdentity(
+ new ManagedServiceIdentity()
+ .withType(ManagedServiceIdentityType.SYSTEM_ASSIGNED_USER_ASSIGNED)
+ .withUserAssignedIdentities(mapOf("/user/assigned/resource/id", new UserAssignedIdentity())))
+ .apply();
+ }
+
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
@@ -325,7 +450,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains CancelVerification. */
public final class DomainsCancelVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/cancelVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/cancelVerification.json
*/
/**
* Sample code: Cancel verification.
@@ -353,7 +478,7 @@ import com.azure.resourcemanager.communication.models.DomainManagement;
/** Samples for Domains CreateOrUpdate. */
public final class DomainsCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/createOrUpdate.json
*/
/**
* Sample code: Create or update Domains resource.
@@ -379,7 +504,7 @@ public final class DomainsCreateOrUpdateSamples {
/** Samples for Domains Delete. */
public final class DomainsDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/delete.json
*/
/**
* Sample code: Delete Domains resource.
@@ -400,7 +525,7 @@ public final class DomainsDeleteSamples {
/** Samples for Domains Get. */
public final class DomainsGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/get.json
*/
/**
* Sample code: Get Domains resource.
@@ -425,7 +550,7 @@ import com.azure.resourcemanager.communication.models.VerificationType;
/** Samples for Domains InitiateVerification. */
public final class DomainsInitiateVerificationSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/initiateVerification.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/initiateVerification.json
*/
/**
* Sample code: Initiate verification.
@@ -451,7 +576,7 @@ public final class DomainsInitiateVerificationSamples {
/** Samples for Domains ListByEmailServiceResource. */
public final class DomainsListByEmailServiceResourceSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/listByEmailService.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/listByEmailService.json
*/
/**
* Sample code: List Domains resources by EmailServiceName.
@@ -476,7 +601,7 @@ import com.azure.resourcemanager.communication.models.UserEngagementTracking;
/** Samples for Domains Update. */
public final class DomainsUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/domains/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/domains/update.json
*/
/**
* Sample code: Update Domains resource.
@@ -501,7 +626,7 @@ public final class DomainsUpdateSamples {
/** Samples for EmailServices CreateOrUpdate. */
public final class EmailServicesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/createOrUpdate.json
*/
/**
* Sample code: Create or update EmailService resource.
@@ -527,7 +652,7 @@ public final class EmailServicesCreateOrUpdateSamples {
/** Samples for EmailServices Delete. */
public final class EmailServicesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/delete.json
*/
/**
* Sample code: Delete EmailService resource.
@@ -547,7 +672,7 @@ public final class EmailServicesDeleteSamples {
/** Samples for EmailServices GetByResourceGroup. */
public final class EmailServicesGetByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/get.json
*/
/**
* Sample code: Get EmailService resource.
@@ -569,7 +694,7 @@ public final class EmailServicesGetByResourceGroupSamples {
/** Samples for EmailServices List. */
public final class EmailServicesListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listBySubscription.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listBySubscription.json
*/
/**
* Sample code: List EmailService resources by subscription.
@@ -589,7 +714,7 @@ public final class EmailServicesListSamples {
/** Samples for EmailServices ListByResourceGroup. */
public final class EmailServicesListByResourceGroupSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/listByResourceGroup.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/listByResourceGroup.json
*/
/**
* Sample code: List EmailService resources by resource group.
@@ -609,7 +734,7 @@ public final class EmailServicesListByResourceGroupSamples {
/** Samples for EmailServices ListVerifiedExchangeOnlineDomains. */
public final class EmailServicesListVerifiedExchangeOnlineDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/getVerifiedExchangeOnlineDomains.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/getVerifiedExchangeOnlineDomains.json
*/
/**
* Sample code: Get verified Exchange Online domains.
@@ -633,7 +758,7 @@ import java.util.Map;
/** Samples for EmailServices Update. */
public final class EmailServicesUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/emailServices/update.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/emailServices/update.json
*/
/**
* Sample code: Update EmailService resource.
@@ -651,6 +776,7 @@ public final class EmailServicesUpdateSamples {
resource.update().withTags(mapOf("newTag", "newVal")).apply();
}
+ // Use "Map.of" if available
@SuppressWarnings("unchecked")
private static Map mapOf(Object... inputs) {
Map map = new HashMap<>();
@@ -670,7 +796,7 @@ public final class EmailServicesUpdateSamples {
/** Samples for Operations List. */
public final class OperationsListSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/communicationServices/operationsList.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/communicationServices/operationsList.json
*/
/**
* Sample code: Operations_List.
@@ -689,7 +815,7 @@ public final class OperationsListSamples {
/** Samples for SenderUsernames CreateOrUpdate. */
public final class SenderUsernamesCreateOrUpdateSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/createOrUpdate.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/createOrUpdate.json
*/
/**
* Sample code: Create or update SenderUsernames resource.
@@ -715,7 +841,7 @@ public final class SenderUsernamesCreateOrUpdateSamples {
/** Samples for SenderUsernames Delete. */
public final class SenderUsernamesDeleteSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/delete.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/delete.json
*/
/**
* Sample code: Delete SenderUsernames resource.
@@ -742,7 +868,7 @@ public final class SenderUsernamesDeleteSamples {
/** Samples for SenderUsernames Get. */
public final class SenderUsernamesGetSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/get.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/get.json
*/
/**
* Sample code: Get SenderUsernames resource.
@@ -769,7 +895,7 @@ public final class SenderUsernamesGetSamples {
/** Samples for SenderUsernames ListByDomains. */
public final class SenderUsernamesListByDomainsSamples {
/*
- * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/stable/2023-03-31/examples/senderUsernames/listByDomain.json
+ * x-ms-original-file: specification/communication/resource-manager/Microsoft.Communication/preview/2023-04-01-preview/examples/senderUsernames/listByDomain.json
*/
/**
* Sample code: Get SenderUsernames resource.
diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml
index a25ff39a67e2..4ad93306775d 100644
--- a/sdk/communication/azure-resourcemanager-communication/pom.xml
+++ b/sdk/communication/azure-resourcemanager-communication/pom.xml
@@ -14,11 +14,11 @@
com.azure.resourcemanager
azure-resourcemanager-communication
- 2.1.0-beta.1
+ 2.1.0-beta.2
jar
Microsoft Azure SDK for Communication Management
- This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-2023-03.
+ This package contains Microsoft Azure SDK for Communication Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. REST API for Azure Communication Services. Package tag package-preview-2023-04.
https://github.com/Azure/azure-sdk-for-java
@@ -45,6 +45,7 @@
UTF-8
0
0
+ true
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
index 4d58952e1db4..fe96d60bc73f 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/CommunicationManager.java
@@ -219,7 +219,7 @@ public CommunicationManager authenticate(TokenCredential credential, AzureProfil
.append("-")
.append("com.azure.resourcemanager.communication")
.append("/")
- .append("2.0.0");
+ .append("2.1.0-beta.1");
if (!Configuration.getGlobalConfiguration().get("AZURE_TELEMETRY_DISABLED", false)) {
userAgentBuilder
.append(" (")
@@ -337,8 +337,10 @@ public SenderUsernames senderUsernames() {
}
/**
- * @return Wrapped service client CommunicationServiceManagementClient providing direct access to the underlying
- * auto-generated API implementation, based on Azure REST API.
+ * Gets wrapped service client CommunicationServiceManagementClient providing direct access to the underlying
+ * auto-generated API implementation, based on Azure REST API.
+ *
+ * @return Wrapped service client CommunicationServiceManagementClient.
*/
public CommunicationServiceManagementClient serviceClient() {
return this.clientObject;
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
index f303a26c9ddb..14ffe2908d60 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/fluent/models/CommunicationServiceResourceInner.java
@@ -8,6 +8,7 @@
import com.azure.core.management.Resource;
import com.azure.core.management.SystemData;
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
@@ -21,6 +22,12 @@ public final class CommunicationServiceResourceInner extends Resource {
@JsonProperty(value = "properties")
private CommunicationServiceProperties innerProperties;
+ /*
+ * Managed service identity (system assigned and/or user assigned identities)
+ */
+ @JsonProperty(value = "identity")
+ private ManagedServiceIdentity identity;
+
/*
* Azure Resource Manager metadata containing createdBy and modifiedBy information.
*/
@@ -40,6 +47,26 @@ private CommunicationServiceProperties innerProperties() {
return this.innerProperties;
}
+ /**
+ * Get the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ public ManagedServiceIdentity identity() {
+ return this.identity;
+ }
+
+ /**
+ * Set the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @param identity the identity value to set.
+ * @return the CommunicationServiceResourceInner object itself.
+ */
+ public CommunicationServiceResourceInner withIdentity(ManagedServiceIdentity identity) {
+ this.identity = identity;
+ return this;
+ }
+
/**
* Get the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -164,5 +191,8 @@ public void validate() {
if (innerProperties() != null) {
innerProperties().validate();
}
+ if (identity() != null) {
+ identity().validate();
+ }
}
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientBuilder.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientBuilder.java
index 2e621875f8cf..97e0aaf0fd96 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientBuilder.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientBuilder.java
@@ -137,7 +137,7 @@ public CommunicationServiceManagementClientImpl buildClient() {
localSerializerAdapter,
localDefaultPollInterval,
localEnvironment,
- subscriptionId,
+ this.subscriptionId,
localEndpoint);
return client;
}
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
index d327e7da8011..57298f86a783 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceManagementClientImpl.java
@@ -194,7 +194,7 @@ public SenderUsernamesClient getSenderUsernames() {
this.defaultPollInterval = defaultPollInterval;
this.subscriptionId = subscriptionId;
this.endpoint = endpoint;
- this.apiVersion = "2023-03-31";
+ this.apiVersion = "2023-04-01-preview";
this.operations = new OperationsClientImpl(this);
this.communicationServices = new CommunicationServicesClientImpl(this);
this.domains = new DomainsClientImpl(this);
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
index 393671ddd6a5..f59b6a0091b9 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/implementation/CommunicationServiceResourceImpl.java
@@ -15,6 +15,7 @@
import com.azure.resourcemanager.communication.models.CommunicationServicesProvisioningState;
import com.azure.resourcemanager.communication.models.LinkNotificationHubParameters;
import com.azure.resourcemanager.communication.models.LinkedNotificationHub;
+import com.azure.resourcemanager.communication.models.ManagedServiceIdentity;
import com.azure.resourcemanager.communication.models.RegenerateKeyParameters;
import java.util.Collections;
import java.util.List;
@@ -53,6 +54,10 @@ public Map tags() {
}
}
+ public ManagedServiceIdentity identity() {
+ return this.innerModel().identity();
+ }
+
public SystemData systemData() {
return this.innerModel().systemData();
}
@@ -255,6 +260,16 @@ public CommunicationServiceResourceImpl withTags(Map tags) {
}
}
+ public CommunicationServiceResourceImpl withIdentity(ManagedServiceIdentity identity) {
+ if (isInCreateMode()) {
+ this.innerModel().withIdentity(identity);
+ return this;
+ } else {
+ this.updateParameters.withIdentity(identity);
+ return this;
+ }
+ }
+
public CommunicationServiceResourceImpl withDataLocation(String dataLocation) {
this.innerModel().withDataLocation(dataLocation);
return this;
diff --git a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
index 7cc8668c737e..b83abee9a041 100644
--- a/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
+++ b/sdk/communication/azure-resourcemanager-communication/src/main/java/com/azure/resourcemanager/communication/models/CommunicationServiceResource.java
@@ -49,6 +49,13 @@ public interface CommunicationServiceResource {
*/
Map tags();
+ /**
+ * Gets the identity property: Managed service identity (system assigned and/or user assigned identities).
+ *
+ * @return the identity value.
+ */
+ ManagedServiceIdentity identity();
+
/**
* Gets the systemData property: Azure Resource Manager metadata containing createdBy and modifiedBy information.
*
@@ -141,11 +148,13 @@ interface Definition
DefinitionStages.WithResourceGroup,
DefinitionStages.WithCreate {
}
+
/** The CommunicationServiceResource definition stages. */
interface DefinitionStages {
/** The first stage of the CommunicationServiceResource definition. */
interface Blank extends WithLocation {
}
+
/** The stage of the CommunicationServiceResource definition allowing to specify location. */
interface WithLocation {
/**
@@ -164,6 +173,7 @@ interface WithLocation {
*/
WithResourceGroup withRegion(String location);
}
+
/** The stage of the CommunicationServiceResource definition allowing to specify parent resource. */
interface WithResourceGroup {
/**
@@ -174,12 +184,16 @@ interface WithResourceGroup {
*/
WithCreate withExistingResourceGroup(String resourceGroupName);
}
+
/**
* The stage of the CommunicationServiceResource definition which contains all the minimum required properties
* for the resource to be created, but also allows for any other optional properties to be specified.
*/
interface WithCreate
- extends DefinitionStages.WithTags, DefinitionStages.WithDataLocation, DefinitionStages.WithLinkedDomains {
+ extends DefinitionStages.WithTags,
+ DefinitionStages.WithIdentity,
+ DefinitionStages.WithDataLocation,
+ DefinitionStages.WithLinkedDomains {
/**
* Executes the create request.
*
@@ -195,6 +209,7 @@ interface WithCreate
*/
CommunicationServiceResource create(Context context);
}
+
/** The stage of the CommunicationServiceResource definition allowing to specify tags. */
interface WithTags {
/**
@@ -205,6 +220,19 @@ interface WithTags {
*/
WithCreate withTags(Map tags);
}
+
+ /** The stage of the CommunicationServiceResource definition allowing to specify identity. */
+ interface WithIdentity {
+ /**
+ * Specifies the identity property: Managed service identity (system assigned and/or user assigned
+ * identities).
+ *
+ * @param identity Managed service identity (system assigned and/or user assigned identities).
+ * @return the next definition stage.
+ */
+ WithCreate withIdentity(ManagedServiceIdentity identity);
+ }
+
/** The stage of the CommunicationServiceResource definition allowing to specify dataLocation. */
interface WithDataLocation {
/**
@@ -216,6 +244,7 @@ interface WithDataLocation {
*/
WithCreate withDataLocation(String dataLocation);
}
+
/** The stage of the CommunicationServiceResource definition allowing to specify linkedDomains. */
interface WithLinkedDomains {
/**
@@ -227,6 +256,7 @@ interface WithLinkedDomains {
WithCreate withLinkedDomains(List