diff --git a/.gitignore b/.gitignore
index 946f4e315f83..b95a70475b31 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,6 +6,8 @@ dist/
#javadoc overview files generated from README.md
readme_overview.html
+**/javadocTemp/**
+**/sourceTemp/**
#External libs
extlib/
diff --git a/eng/.docsettings.yml b/eng/.docsettings.yml
index 7b3aa2d288ac..39d41544901f 100644
--- a/eng/.docsettings.yml
+++ b/eng/.docsettings.yml
@@ -144,8 +144,9 @@ known_content_issues:
- ['sdk/storage/azure-storage-blob-nio/README.md', '#3113']
- ['sdk/storage/azure-storage-internal-avro/README.md', '#3113']
- ['sdk/storage/README.md', '#3113']
- - ['sdk/textanalytics/azure-ai-textanalytics/swagger/README.md', '#3113']
+ - ['sdk/tables/azure-data-tables/swagger/README.md', '#3113']
- ['sdk/template/azure-sdk-template/README.md','has other required sections']
+ - ['sdk/textanalytics/azure-ai-textanalytics/swagger/README.md', '#3113']
package_indexing_exclusion_list:
- azure-loganalytics-sample
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 fe0c5ad5ce1f..f27bb862c85d 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
@@ -239,6 +239,7 @@
+
@@ -261,10 +262,6 @@
-
-
-
@@ -361,9 +358,25 @@
+ files=".*[/\\]search[/\\]documents[/\\]implementation[/\\]models[/\\]"/>
+
+ files=".*[/\\]search[/\\]documents[/\\]implementation[/\\]converters[/\\]"/>
+
+
+
+
+
+
+
+
+
+
+
+ files="com.azure.core.management.implementation.polling.PollOperation.java"/>
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 aaaa870a8764..f7ded73aaae6 100755
--- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
+++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
@@ -711,26 +711,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -825,7 +805,7 @@
-
+
@@ -904,40 +884,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -957,7 +903,7 @@
Issue: https://github.com/Azure/azure-sdk-for-java/issues/9054
-->
-
+
@@ -1208,35 +1154,35 @@
-
+
-
+
-
-
+
+
-
+
-
+
@@ -1608,13 +1554,6 @@
-
-
-
-
-
-
-
@@ -1897,6 +1836,14 @@
+
+
+
+
+
+
+
@@ -2028,6 +1975,10 @@
+
+
+
+
diff --git a/eng/common/TestResources/remove-test-resources.yml b/eng/common/TestResources/remove-test-resources.yml
index e66933b60cc6..1565e7d4bd0f 100644
--- a/eng/common/TestResources/remove-test-resources.yml
+++ b/eng/common/TestResources/remove-test-resources.yml
@@ -32,4 +32,5 @@ steps:
-Force `
-Verbose
displayName: Remove test resources
+ condition: and(ne(variables['AZURE_RESOURCEGROUP_NAME'], ''), succeededOrFailed())
continueOnError: true
diff --git a/eng/common/pipelines/templates/steps/docs-metadata-release.yml b/eng/common/pipelines/templates/steps/docs-metadata-release.yml
index 3ffdd5ec60a6..89d12d4ac1d1 100644
--- a/eng/common/pipelines/templates/steps/docs-metadata-release.yml
+++ b/eng/common/pipelines/templates/steps/docs-metadata-release.yml
@@ -56,6 +56,3 @@ steps:
BaseBranchName: smoke-test
WorkingDirectory: ${{parameters.WorkingDirectory}}/repo
ScriptDirectory: ${{parameters.WorkingDirectory}}/${{parameters.ScriptDirectory}}
-
-
-
diff --git a/eng/common/scripts/artifact-metadata-parsing.ps1 b/eng/common/scripts/artifact-metadata-parsing.ps1
index 51ee8eb56b84..2d2362f0d0d9 100644
--- a/eng/common/scripts/artifact-metadata-parsing.ps1
+++ b/eng/common/scripts/artifact-metadata-parsing.ps1
@@ -86,16 +86,21 @@ function ParseMavenPackage($pkg, $workingDirectory) {
$pkgId = $contentXML.project.artifactId
$pkgVersion = $contentXML.project.version
$groupId = if ($contentXML.project.groupId -eq $null) { $contentXML.project.parent.groupId } else { $contentXML.project.groupId }
+ $releaseNotes = ""
+ $readmeContent = ""
# if it's a snapshot. return $null (as we don't want to create tags for this, but we also don't want to fail)
if ($pkgVersion.Contains("SNAPSHOT")) {
return $null
}
- $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-changelog.md")[0]
+ $changeLogLoc = @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-changelog.md")[0]
+ if ($changeLogLoc) {
+ $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc
+ }
$readmeContentLoc = @(Get-ChildItem -Path $pkg.DirectoryName -Recurse -Include "$($pkg.Basename)-readme.md")[0]
- if (Test-Path -Path $readmeContentLoc) {
+ if ($readmeContentLoc) {
$readmeContent = Get-Content -Raw $readmeContentLoc
}
@@ -155,15 +160,23 @@ function ResolvePkgJson($workFolder) {
function ParseNPMPackage($pkg, $workingDirectory) {
$workFolder = "$workingDirectory$($pkg.Basename)"
$origFolder = Get-Location
+ $releaseNotes = ""
+ $readmeContent = ""
+
New-Item -ItemType Directory -Force -Path $workFolder
cd $workFolder
tar -xzf $pkg
$packageJSON = ResolvePkgJson -workFolder $workFolder | Get-Content | ConvertFrom-Json
- $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+
+ $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+ if ($changeLogLoc) {
+ $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc
+ }
+
$readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0]
- if (Test-Path -Path $readmeContentLoc) {
+ if ($readmeContentLoc) {
$readmeContent = Get-Content -Raw $readmeContentLoc
}
@@ -208,15 +221,22 @@ function ParseNugetPackage($pkg, $workingDirectory) {
$workFolder = "$workingDirectory$($pkg.Basename)"
$origFolder = Get-Location
$zipFileLocation = "$workFolder/$($pkg.Basename).zip"
+ $releaseNotes = ""
+ $readmeContent = ""
+
New-Item -ItemType Directory -Force -Path $workFolder
Copy-Item -Path $pkg -Destination $zipFileLocation
Expand-Archive -Path $zipFileLocation -DestinationPath $workFolder
[xml] $packageXML = Get-ChildItem -Path "$workFolder/*.nuspec" | Get-Content
- $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+
+ $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+ if ($changeLogLoc) {
+ $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc
+ }
$readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0]
- if (Test-Path -Path $readmeContentLoc) {
+ if ($readmeContentLoc) {
$readmeContent = Get-Content -Raw $readmeContentLoc
}
@@ -269,12 +289,19 @@ function ParsePyPIPackage($pkg, $workingDirectory) {
$workFolder = "$workingDirectory$($pkg.Basename)"
$origFolder = Get-Location
- New-Item -ItemType Directory -Force -Path $workFolder
+ $releaseNotes = ""
+ $readmeContent = ""
+ New-Item -ItemType Directory -Force -Path $workFolder
Expand-Archive -Path $pkg -DestinationPath $workFolder
- $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+
+ $changeLogLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "CHANGELOG.md")[0]
+ if ($changeLogLoc) {
+ $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc
+ }
+
$readmeContentLoc = @(Get-ChildItem -Path $workFolder -Recurse -Include "README.md")[0]
- if (Test-Path -Path $readmeContentLoc) {
+ if ($readmeContentLoc) {
$readmeContent = Get-Content -Raw $readmeContentLoc
}
Remove-Item $workFolder -Force -Recurse -ErrorAction SilentlyContinue
@@ -291,23 +318,28 @@ function ParsePyPIPackage($pkg, $workingDirectory) {
function ParseCArtifact($pkg, $workingDirectory) {
$packageInfo = Get-Content -Raw -Path $pkg | ConvertFrom-JSON
$packageArtifactLocation = (Get-ItemProperty $pkg).Directory.FullName
+ $releaseNotes = ""
+ $readmeContent = ""
- $releaseNotes = ExtractReleaseNotes -changeLogLocation @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "CHANGELOG.md")[0]
-
+ $changeLogLoc = @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "CHANGELOG.md")[0]
+ if ($changeLogLoc)
+ {
+ $releaseNotes = &"${PSScriptRoot}/../Extract-ReleaseNotes.ps1" -ChangeLogLocation $changeLogLoc
+ }
+
$readmeContentLoc = @(Get-ChildItem -Path $packageArtifactLocation -Recurse -Include "README.md")[0]
- if (Test-Path -Path $readmeContentLoc) {
+ if ($readmeContentLoc) {
$readmeContent = Get-Content -Raw $readmeContentLoc
}
return New-Object PSObject -Property @{
- PackageId = $packageInfo.name
+ PackageId = ''
PackageVersion = $packageInfo.version
# Artifact info is always considered deployable for C becasue it is not
# deployed anywhere. Dealing with duplicate tags happens downstream in
# CheckArtifactShaAgainstTagsList
Deployable = $true
ReleaseNotes = $releaseNotes
- ReadmeContent = $readmeContent
}
}
@@ -358,7 +390,7 @@ function GetExistingTags($apiUrl) {
}
# Walk across all build artifacts, check them against the appropriate repository, return a list of tags/releases
-function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $exitOnError = $True) {
+function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $apiUrl, $releaseSha, $continueOnError = $false) {
$pkgList = [array]@()
$ParsePkgInfoFn = ""
$packagePattern = ""
@@ -404,16 +436,22 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
continue
}
- if ($parsedPackage.Deployable -ne $True -and $exitOnError) {
+ if ($parsedPackage.Deployable -ne $True -and !$continueOnError) {
Write-Host "Package $($parsedPackage.PackageId) is marked with version $($parsedPackage.PackageVersion), the version $($parsedPackage.PackageVersion) has already been deployed to the target repository."
Write-Host "Maybe a pkg version wasn't updated properly?"
exit(1)
}
+ $tag = if ($parsedPackage.packageId) {
+ "$($parsedPackage.packageId)_$($parsedPackage.PackageVersion)"
+ } else {
+ $parsedPackage.PackageVersion
+ }
+
$pkgList += New-Object PSObject -Property @{
PackageId = $parsedPackage.PackageId
PackageVersion = $parsedPackage.PackageVersion
- Tag = ($parsedPackage.PackageId + "_" + $parsedPackage.PackageVersion)
+ Tag = $tag
ReleaseNotes = $parsedPackage.ReleaseNotes
ReadmeContent = $parsedPackage.ReadmeContent
}
@@ -430,8 +468,8 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
$intersect = $results | % { $_.Tag } | ? { $existingTags -contains $_ }
- if ($intersect.Length -gt 0 -and $exitOnError) {
- CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -exitOnError $exitOnError
+ if ($intersect.Length -gt 0 -and !$continueOnError) {
+ CheckArtifactShaAgainstTagsList -priorExistingTagList $intersect -releaseSha $releaseSha -apiUrl $apiUrl -continueOnError $continueOnError
# all the tags are clean. remove them from the list of releases we will publish.
$results = $results | ? { -not ($intersect -contains $_.Tag ) }
@@ -443,7 +481,7 @@ function VerifyPackages($pkgRepository, $artifactLocation, $workingDirectory, $a
# given a set of tags that we want to release, we need to ensure that if they already DO exist.
# if they DO exist, quietly exit if the commit sha of the artifact matches that of the tag
# if the commit sha does not match, exit with error and report both problem shas
-function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $exitOnError) {
+function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $apiUrl, $continueOnError) {
$headers = @{
"Content-Type" = "application/json"
"Authorization" = "token $($env:GH_TOKEN)"
@@ -465,7 +503,7 @@ function CheckArtifactShaAgainstTagsList($priorExistingTagList, $releaseSha, $ap
}
}
- if ($unmatchedTags.Length -gt 0 -and $exitOnError) {
+ if ($unmatchedTags.Length -gt 0 -and !$continueOnError) {
Write-Host "Tags already existing with different SHA versions. Exiting."
exit(1)
}
diff --git a/eng/common/scripts/copy-docs-to-blobstorage.ps1 b/eng/common/scripts/copy-docs-to-blobstorage.ps1
index 3d097abab8b2..03e508c17cb5 100644
--- a/eng/common/scripts/copy-docs-to-blobstorage.ps1
+++ b/eng/common/scripts/copy-docs-to-blobstorage.ps1
@@ -304,6 +304,17 @@ if ($Language -eq "java")
jar -xf "$($Item.FullName)"
Set-Location $CurrentLocation
+ # If javadocs are produced for a library with source, there will always be an
+ # index.html. If this file doesn't exist in the UnjarredDocumentationPath then
+ # this is a sourceless library which means there are no javadocs and nothing
+ # should be uploaded to blob storage.
+ $IndexHtml = Join-Path -Path $UnjarredDocumentationPath -ChildPath "index.html"
+ if (!(Test-Path -path $IndexHtml))
+ {
+ Write-Host "$($PkgName) does not have an index.html file, skippping."
+ continue
+ }
+
# Get the POM file for the artifact we're processing
$PomFile = $Item.FullName.Substring(0,$Item.FullName.LastIndexOf(("-javadoc.jar"))) + ".pom"
Write-Host "PomFile $($PomFile)"
@@ -334,14 +345,11 @@ if ($Language -eq "java")
if ($Language -eq "c")
{
# The documentation publishing process for C differs from the other
- # langauges in this file because this script is invoked once per library
+ # langauges in this file because this script is invoked for the whole SDK
# publishing. It is not, for example, invoked once per service publishing.
- # This is also the case for other langauge publishing steps above... Those
- # loops are left over from previous versions of this script which were used
- # to publish multiple docs packages in a single invocation.
+ # There is a similar situation for other langauge publishing steps above...
+ # Those loops are left over from previous versions of this script which were
+ # used to publish multiple docs packages in a single invocation.
$pkgInfo = Get-Content $DocLocation/package-info.json | ConvertFrom-Json
- $pkgName = $pkgInfo.name
- $pkgVersion = $pkgInfo.version
-
- Upload-Blobs -DocDir $DocLocation -PkgName $pkgName -DocVersion $pkgVersion
+ Upload-Blobs -DocDir $DocLocation -PkgName 'docs' -DocVersion $pkgInfo.version
}
\ No newline at end of file
diff --git a/eng/common/scripts/create-tags-and-git-release.ps1 b/eng/common/scripts/create-tags-and-git-release.ps1
index 56e3f22a4274..f87c90997839 100644
--- a/eng/common/scripts/create-tags-and-git-release.ps1
+++ b/eng/common/scripts/create-tags-and-git-release.ps1
@@ -15,7 +15,7 @@ param (
$repoOwner = "", # the owning organization of the repository. EG "Azure"
$repoName = "", # the name of the repository. EG "azure-sdk-for-java"
$repoId = "$repoOwner/$repoName", # full repo id. EG azure/azure-sdk-for-net DevOps: $(Build.Repository.Id),
- [switch]$forceCreate = $false
+ [switch]$continueOnError = $false
)
Write-Host "> $PSCommandPath $args"
@@ -26,7 +26,7 @@ $apiUrl = "https://api.github.com/repos/$repoId"
Write-Host "Using API URL $apiUrl"
# VERIFY PACKAGES
-$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha
+$pkgList = VerifyPackages -pkgRepository $packageRepository -artifactLocation $artifactLocation -workingDirectory $workingDirectory -apiUrl $apiUrl -releaseSha $releaseSha -continueOnError $continueOnError
if ($pkgList) {
Write-Host "Given the visible artifacts, github releases will be created for the following:"
diff --git a/eng/common/scripts/git-branch-push.ps1 b/eng/common/scripts/git-branch-push.ps1
index b5a7ec8ba221..9ff45f87ad67 100644
--- a/eng/common/scripts/git-branch-push.ps1
+++ b/eng/common/scripts/git-branch-push.ps1
@@ -121,8 +121,16 @@ do
continue
}
- Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -am `"$($CommitMsg)`""
- git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -am "$($CommitMsg)"
+ Write-Host "git add -A"
+ git add -A
+ if ($LASTEXITCODE -ne 0)
+ {
+ Write-Error "Unable to git add LASTEXITCODE=$($LASTEXITCODE), see command output above."
+ continue
+ }
+
+ Write-Host "git -c user.name=`"azure-sdk`" -c user.email=`"azuresdk@microsoft.com`" commit -m `"$($CommitMsg)`""
+ git -c user.name="azure-sdk" -c user.email="azuresdk@microsoft.com" commit -m "$($CommitMsg)"
if ($LASTEXITCODE -ne 0)
{
Write-Error "Unable to commit LASTEXITCODE=$($LASTEXITCODE), see command output above."
diff --git a/eng/common/scripts/modules/Package-Properties.psm1 b/eng/common/scripts/modules/Package-Properties.psm1
new file mode 100644
index 000000000000..294f6609dab8
--- /dev/null
+++ b/eng/common/scripts/modules/Package-Properties.psm1
@@ -0,0 +1,252 @@
+# Helper functions for retireving useful information from azure-sdk-for-* repo
+# Example Use : Import-Module .\eng\common\scripts\modules
+class PackageProps
+{
+ [string]$pkgName
+ [AzureEngSemanticVersion]$pkgVersion
+ [string]$pkgDirectoryPath
+ [string]$pkgServiceName
+ [string]$pkgReadMePath
+ [string]$pkgChangeLogPath
+
+ PackageProps(
+ [string]$pkgName,
+ [string]$pkgVersion,
+ [string]$pkgDirectoryPath,
+ [string]$pkgServiceName
+ )
+ {
+ $this.pkgName = $pkgName
+ $this.pkgVersion = [AzureEngSemanticVersion]::ParseVersionString($pkgVersion)
+ if ($this.pkgVersion -eq $null)
+ {
+ Write-Error "Invalid version in $pkgDirectoryPath"
+ }
+ $this.pkgDirectoryPath = $pkgDirectoryPath
+ $this.pkgServiceName = $pkgServiceName
+
+ if (Test-Path (Join-Path $pkgDirectoryPath "README.md"))
+ {
+ $this.pkgReadMePath = Join-Path $pkgDirectoryPath "README.md"
+ }
+ else
+ {
+ $this.pkgReadMePath = $null
+ }
+
+ if (Test-Path (Join-Path $pkgDirectoryPath "CHANGELOG.md"))
+ {
+ $this.pkgChangeLogPath = Join-Path $pkgDirectoryPath "CHANGELOG.md"
+ }
+ else
+ {
+ $this.pkgChangeLogPath = $null
+ }
+ }
+}
+
+Install-Module -Name powershell-yaml -RequiredVersion 0.4.1 -Force -Scope CurrentUser
+
+function Extract-PkgProps ($pkgPath, $serviceName, $pkgName, $lang)
+{
+ if ($lang -eq "net")
+ {
+ return Extract-DotNetPkgProps -pkgPath $pkgPath -serviceName $serviceName -pkgName $pkgName
+ }
+ if ($lang -eq "java")
+ {
+ return Extract-JavaPkgProps -pkgPath $pkgPath -serviceName $serviceName -pkgName $pkgName
+ }
+ if ($lang -eq "js")
+ {
+ return Extract-JsPkgProps -pkgPath $pkgPath -serviceName $serviceName -pkgName $pkgName
+ }
+ if ($lang -eq "python")
+ {
+ return Extract-PythonPkgProps -pkgPath $pkgPath -serviceName $serviceName -pkgName $pkgName
+ }
+}
+
+function Extract-DotNetPkgProps ($pkgPath, $serviceName, $pkgName)
+{
+ $projectPath = Join-Path $pkgPath "src" "$pkgName.csproj"
+ if (Test-Path $projectPath)
+ {
+ $projectData = New-Object -TypeName XML
+ $projectData.load($projectPath)
+ $pkgVersion = Select-XML -Xml $projectData -XPath '/Project/PropertyGroup/Version'
+ return [PackageProps]::new($pkgName, $pkgVersion, $pkgPath, $serviceName)
+ }
+ else
+ {
+ return $null
+ }
+}
+
+function Extract-JsPkgProps ($pkgPath, $serviceName, $pkgName)
+{
+ $projectPath = Join-Path $pkgPath "package.json"
+ if (Test-Path $projectPath)
+ {
+ $projectJson = Get-Content $projectPath | ConvertFrom-Json
+ $jsStylePkgName = $pkgName.replace("azure-", "@azure/")
+ if ($projectJson.name -eq "$jsStylePkgName")
+ {
+ return [PackageProps]::new($projectJson.name, $projectJson.version, $pkgPath, $serviceName)
+ }
+ }
+ return $null
+}
+
+function Extract-PythonPkgProps ($pkgPath, $serviceName, $pkgName)
+{
+ $pkgName = $pkgName.Replace('_', '-')
+
+ if (Test-Path (Join-Path $pkgPath "setup.py"))
+ {
+ $setupLocation = $pkgPath.Replace('\','/')
+ pushd $RepoRoot
+ $setupProps = (python -c "import scripts.devops_tasks.common_tasks; obj=scripts.devops_tasks.common_tasks.parse_setup('$setupLocation'); print('{0},{1}'.format(obj[0], obj[1]));") -split ","
+ popd
+ if (($setupProps -ne $null) -and ($setupProps[0] -eq $pkgName))
+ {
+ return [PackageProps]::new($setupProps[0], $setupProps[1], $pkgPath, $serviceName)
+ }
+ }
+ return $null
+}
+
+function Extract-JavaPkgProps ($pkgPath, $serviceName, $pkgName)
+{
+ $projectPath = Join-Path $pkgPath "pom.xml"
+
+ if (Test-Path $projectPath)
+ {
+ $projectData = New-Object -TypeName XML
+ $projectData.load($projectPath)
+ $projectPkgName = $projectData.project.artifactId
+ $pkgVersion = $projectData.project.version
+
+ if ($projectPkgName -eq $pkgName)
+ {
+ return [PackageProps]::new($pkgName, $pkgVersion.ToString(), $pkgPath, $serviceName)
+ }
+ }
+ return $null
+}
+
+# Takes package name and service Name
+# Returns important properties of the package as related to the language repo
+# Returns a PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath }
+# Note: python is required for parsing python package properties.
+function Get-PkgProperties
+{
+ Param
+ (
+ [Parameter(Mandatory=$true)]
+ [string]$PackageName,
+ [Parameter(Mandatory=$true)]
+ [string]$ServiceName,
+ [Parameter(Mandatory=$true)]
+ [ValidateSet("net","java","js","python")]
+ [string]$Language,
+ [string]$RepoRoot="${PSScriptRoot}/../../../.."
+ )
+
+ $pkgDirectoryName = $null
+ $pkgDirectoryPath = $null
+ $serviceDirectoryPath = Join-Path $RepoRoot "sdk" $ServiceName
+ if (!(Test-Path $serviceDirectoryPath))
+ {
+ Write-Error "Service Directory $ServiceName does not exist"
+ exit 1
+ }
+
+ $directoriesPresent = Get-ChildItem $serviceDirectoryPath -Directory
+
+ foreach ($directory in $directoriesPresent)
+ {
+ $pkgDirectoryPath = Join-Path $serviceDirectoryPath $directory.Name
+ $pkgProps = Extract-PkgProps -pkgPath $pkgDirectoryPath -serviceName $ServiceName -pkgName $PackageName -lang $Language
+ if ($pkgProps -ne $null)
+ {
+ return $pkgProps
+ }
+ }
+ Write-Error "Failed to retrive Properties for $PackageName"
+}
+
+# Takes ServiceName, Language, and Repo Root Directory
+# Returns important properties for each package in the specified service, or entire repo if the serviceName is not specified
+# Returns an Table of service key to array values of PS Object with properties @ { pkgName, pkgVersion, pkgDirectoryPath, pkgReadMePath, pkgChangeLogPath }
+function Get-AllPkgProperties
+{
+ Param
+ (
+ [Parameter(Mandatory=$true)]
+ [ValidateSet("net","java","js","python")]
+ [string]$Language,
+ [string]$RepoRoot="${PSScriptRoot}/../../../..",
+ [string]$ServiceName=$null
+ )
+
+ $pkgPropsResult = @()
+
+ if ([string]::IsNullOrEmpty($ServiceName))
+ {
+ $searchDir = Join-Path $RepoRoot "sdk"
+ foreach ($dir in (Get-ChildItem $searchDir -Directory))
+ {
+ $serviceDir = Join-Path $searchDir $dir.Name
+
+ if (Test-Path (Join-Path $serviceDir "ci.yml"))
+ {
+ $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml")
+ if ($activePkgList -ne $null)
+ {
+ $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $dir.Name -language $Language -repoRoot $RepoRoot -pkgPropsResult $pkgPropsResult
+ }
+ }
+ }
+ }
+ else
+ {
+ $serviceDir = Join-Path $RepoRoot "sdk" $ServiceName
+ if (Test-Path (Join-Path $serviceDir "ci.yml"))
+ {
+ $activePkgList = Get-PkgListFromYml -ciYmlPath (Join-Path $serviceDir "ci.yml")
+ if ($activePkgList -ne $null)
+ {
+ $pkgPropsResult = Operate-OnPackages -activePkgList $activePkgList -serviceName $ServiceName -language $Language -repoRoot $RepoRoot -pkgPropsResult $pkgPropsResult
+ }
+ }
+ }
+
+ return $pkgPropsResult
+}
+
+function Operate-OnPackages ($activePkgList, $serviceName, $language, $repoRoot, [Array]$pkgPropsResult)
+{
+ foreach ($pkg in $activePkgList)
+ {
+ $pkgProps = Get-PkgProperties -PackageName $pkg["name"] -ServiceName $serviceName -Language $language -RepoRoot $repoRoot
+ $pkgPropsResult += $pkgProps
+ }
+ return $pkgPropsResult
+}
+
+function Get-PkgListFromYml ($ciYmlPath)
+{
+ $ciYmlContent = Get-Content $ciYmlPath -Raw
+ $ciYmlObj = ConvertFrom-Yaml $ciYmlContent -Ordered
+ $artifactsInCI = $ciYmlObj["stages"][0]["parameters"]["Artifacts"]
+
+ if ($artifactsInCI -eq $null)
+ {
+ Write-Error "Failed to retrive package names in ci $ciYmlPath"
+ }
+ return $artifactsInCI
+}
+
+Export-ModuleMember -Function 'Get-PkgProperties'
+Export-ModuleMember -Function 'Get-AllPkgProperties'
\ No newline at end of file
diff --git a/eng/common/scripts/modules/common-manifest.psd1 b/eng/common/scripts/modules/common-manifest.psd1
new file mode 100644
index 000000000000..419f046e6f67
--- /dev/null
+++ b/eng/common/scripts/modules/common-manifest.psd1
@@ -0,0 +1,123 @@
+#
+# Module manifest for module 'Common Modules'
+#
+# Generated by: azure-sdk
+#
+# Generated on: 5/19/2020
+#
+
+@{
+
+# Script module or binary module file associated with this manifest.
+# RootModule = ''
+
+# Version number of this module.
+ModuleVersion = '1.0'
+
+# Supported PSEditions
+# CompatiblePSEditions = @()
+
+# ID used to uniquely identify this module
+GUID = '552cdcff-1f53-4f68-87a6-54490af6e94a'
+
+# Author of this module
+Author = 'azure-sdk'
+
+# Company or vendor of this module
+CompanyName = 'Unknown'
+
+# Copyright statement for this module
+Copyright = '(c) azure-sdk. All rights reserved.'
+
+# Description of the functionality provided by this module
+# Description = ''
+
+# Minimum version of the PowerShell engine required by this module
+# PowerShellVersion = ''
+
+# Name of the PowerShell host required by this module
+# PowerShellHostName = ''
+
+# Minimum version of the PowerShell host required by this module
+# PowerShellHostVersion = ''
+
+# Minimum version of Microsoft .NET Framework required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# DotNetFrameworkVersion = ''
+
+# Minimum version of the common language runtime (CLR) required by this module. This prerequisite is valid for the PowerShell Desktop edition only.
+# CLRVersion = ''
+
+# Processor architecture (None, X86, Amd64) required by this module
+# ProcessorArchitecture = ''
+
+# Modules that must be imported into the global environment prior to importing this module
+# RequiredModules = @()
+
+# Assemblies that must be loaded prior to importing this module
+RequiredAssemblies = @()
+
+# Script files (.ps1) that are run in the caller's environment prior to importing this module.
+ScriptsToProcess = @("${PSScriptRoot}\..\SemVer.ps1")
+
+# Type files (.ps1xml) to be loaded when importing this module
+# TypesToProcess = @()
+
+# Format files (.ps1xml) to be loaded when importing this module
+# FormatsToProcess = @()
+
+# Modules to import as nested modules of the module specified in RootModule/ModuleToProcess
+NestedModules = @("${PSScriptRoot}\Package-Properties.psm1")
+
+# Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export.
+# FunctionsToExport = @()
+
+# Cmdlets to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no cmdlets to export.
+CmdletsToExport = @()
+
+# Variables to export from this module
+VariablesToExport = '*'
+
+# Aliases to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no aliases to export.
+AliasesToExport = @()
+
+# DSC resources to export from this module
+# DscResourcesToExport = @()
+
+# List of all modules packaged with this module
+# ModuleList = @()
+
+# List of all files packaged with this module
+# FileList = @()
+
+# Private data to pass to the module specified in RootModule/ModuleToProcess. This may also contain a PSData hashtable with additional module metadata used by PowerShell.
+PrivateData = @{
+
+ PSData = @{
+
+ # Tags applied to this module. These help with module discovery in online galleries.
+ # Tags = @()
+
+ # A URL to the license for this module.
+ # LicenseUri = ''
+
+ # A URL to the main website for this project.
+ # ProjectUri = ''
+
+ # A URL to an icon representing this module.
+ # IconUri = ''
+
+ # ReleaseNotes of this module
+ # ReleaseNotes = ''
+
+ } # End of PSData hashtable
+
+} # End of PrivateData hashtable
+
+# HelpInfo URI of this module
+# HelpInfoURI = ''
+
+# Default prefix for commands exported from this module. Override the default prefix using Import-Module -Prefix.
+# DefaultCommandPrefix = ''
+
+}
+
diff --git a/eng/common/scripts/update-docs-metadata.ps1 b/eng/common/scripts/update-docs-metadata.ps1
index a162cbf8514e..f88717c4f714 100644
--- a/eng/common/scripts/update-docs-metadata.ps1
+++ b/eng/common/scripts/update-docs-metadata.ps1
@@ -24,19 +24,19 @@ Write-Host "> $PSCommandPath $args"
function GetMetaData($lang){
switch ($lang) {
"java" {
- $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/java-packages.csv"
+ $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/java-packages.csv"
break
}
".net" {
- $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/dotnet-packages.csv"
+ $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/dotnet-packages.csv"
break
}
"python" {
- $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/python-packages.csv"
+ $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/python-packages.csv"
break
}
"javascript" {
- $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/releases/latest/js-packages.csv"
+ $metadataUri = "https://raw.githubusercontent.com/Azure/azure-sdk/master/_data/allpackages/js-packages.csv"
break
}
default {
@@ -46,6 +46,8 @@ function GetMetaData($lang){
}
$metadataResponse = Invoke-WebRequest-WithHandling -url $metadataUri -method "GET" | ConvertFrom-Csv
+
+ return $metadataResponse
}
function GetAdjustedReadmeContent($pkgInfo, $lang){
@@ -57,10 +59,11 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){
try {
$metadata = GetMetaData -lang $lang
+
$service = $metadata | ? { $_.Package -eq $pkgId }
if ($service) {
- $service = "$service,"
+ $service = "$($service.Service)"
}
}
catch {
@@ -68,12 +71,18 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){
Write-Host "Unable to retrieve service metadata for packageId $($pkgInfo.PackageId)"
}
- $headerContentMatch = (Select-String -InputObject $pkgInfo.ReadmeContent -Pattern 'Azure .+? (client|plugin|shared) library for (JavaScript|Java|Python|\.NET|C)').Matches[0]
+ $fileContent = $pkgInfo.ReadmeContent
+
+ # only replace the version if the formatted header can be found
+ $headerContentMatches = (Select-String -InputObject $pkgInfo.ReadmeContent -Pattern 'Azure .+? (client|plugin|shared) library for (JavaScript|Java|Python|\.NET|C)')
+ if ($headerContentMatches) {
+ $headerContentMatch = $headerContentMatches.Matches[0]
+ $header = "---`ntitle: $headerContentMatch`nkeywords: Azure, $lang, SDK, API, $($pkgInfo.PackageId), $service`nauthor: maggiepint`nms.author: magpint`nms.date: $date`nms.topic: article`nms.prod: azure`nms.technology: azure`nms.devlang: $lang`nms.service: $service`n---`n"
+ $fileContent = $pkgInfo.ReadmeContent -replace $headerContentMatch, "$headerContentMatch - Version $($pkgInfo.PackageVersion) `n"
+ }
- if ($headerContentMatch){
- $header = "---`r`ntitle: $headerContentMatch`r`nkeywords: Azure, $lang, SDK, API, $service $($pkgInfo.PackageId)`r`nauthor: maggiepint`r`nms.author: magpint`r`nms.date: $date`r`nms.topic: article`r`nms.prod: azure`r`nms.technology: azure`r`nms.devlang: $lang`r`nms.service: $service`r`n---`r`n"
- $fileContent = $pkgInfo.ReadmeContent -replace $headerContentMatch, "$headerContentMatch - Version $($pkgInfo.PackageVersion) `r`n"
- return "$header $fileContent"
+ if ($fileContent) {
+ return "$header`n$fileContent"
}
else {
return ""
@@ -86,7 +95,7 @@ $pkgs = VerifyPackages -pkgRepository $Repository `
-workingDirectory $WorkDirectory `
-apiUrl $apiUrl `
-releaseSha $ReleaseSHA `
- -exitOnError $False
+ -continueOnError $True
if ($pkgs) {
Write-Host "Given the visible artifacts, readmes will be copied for the following packages"
@@ -102,7 +111,10 @@ if ($pkgs) {
$readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme$rdSuffix.md"
$readmeLocation = Join-Path $DocRepoLocation $DocRepoContentLocation $readmeName
- $adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo -lang $Language
+
+ if ($packageInfo.ReadmeContent) {
+ $adjustedContent = GetAdjustedReadmeContent -pkgInfo $packageInfo -lang $Language
+ }
if ($adjustedContent) {
try {
diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
index 5482c4129048..5665a230ff80 100644
--- a/eng/jacoco-test-coverage/pom.xml
+++ b/eng/jacoco-test-coverage/pom.xml
@@ -44,7 +44,7 @@
com.azure
azure-ai-textanalytics
- 1.0.0-beta.5
+ 1.0.0-beta.6
com.azure
@@ -91,6 +91,11 @@
azure-core-tracing-opentelemetry
1.0.0-beta.5
+
+ com.azure
+ azure-cosmos
+ 4.0.1-beta.5
+
com.azure
azure-data-appconfiguration
@@ -98,23 +103,23 @@
com.azure
- azure-identity
- 1.1.0-beta.5
+ azure-data-schemaregistry
+ 1.0.0-beta.1
com.azure
- azure-security-keyvault-certificates
- 4.1.0-beta.3
+ azure-data-schemaregistry-avro
+ 1.0.0-beta.1
com.azure
- azure-security-keyvault-keys
- 4.2.0-beta.4
+ azure-data-tables
+ 1.0.0-beta.1
com.azure
- azure-security-keyvault-secrets
- 4.2.0-beta.3
+ azure-identity
+ 1.1.0-beta.5
com.azure
@@ -131,6 +136,26 @@
azure-messaging-servicebus
7.0.0-beta.3
+
+ com.azure
+ azure-search-documents
+ 1.0.0-beta.4
+
+
+ com.azure
+ azure-security-keyvault-certificates
+ 4.1.0-beta.3
+
+
+ com.azure
+ azure-security-keyvault-keys
+ 4.2.0-beta.4
+
+
+ com.azure
+ azure-security-keyvault-secrets
+ 4.2.0-beta.3
+
com.azure
azure-storage-common
@@ -179,21 +204,56 @@
com.azure
- azure-search-documents
- 1.0.0-beta.4
+ azure-sdk-template
+ 1.0.4-beta.20
+
- com.azure
- azure-cosmos
- 4.0.1-beta.4
+ com.microsoft.azure
+ azure-spring-boot
+ 2.2.5-beta.1
- com.azure
- azure-sdk-template
- 1.0.4-beta.13
+ com.microsoft.azure
+ azure-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-active-directory-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-keyvault-secrets-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-spring-boot-metrics-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-servicebus-jms-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-active-directory-b2c-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-cosmosdb-spring-boot-starter
+ 2.2.5-beta.1
+
+
+ com.microsoft.azure
+ azure-data-gremlin-spring-boot-starter
+ 2.2.5-beta.1
-
@@ -218,6 +278,26 @@
+
+
+
+ org.apache.maven.plugins
+ maven-enforcer-plugin
+ 3.0.0-M3
+
+
+
+
+ com.azure:*
+ com.microsoft.azure:*
+
+
+
+
+
diff --git a/eng/mgmt/gulpfile.js b/eng/mgmt/gulpfile.js
index 273cb544497d..1e3025edadd3 100644
--- a/eng/mgmt/gulpfile.js
+++ b/eng/mgmt/gulpfile.js
@@ -105,7 +105,7 @@ var handleInput = function(projects, cb) {
}
}
-var codegen = function(project, cb) {
+var codegen = async function(project, cb) {
if (!args['preserve']) {
deleteMgmtFolders(project);
}
@@ -157,7 +157,10 @@ var codegen = function(project, cb) {
}
console.log('Command: ' + cmd);
- return execa(cmd, [], { shell: true, stdio: "inherit" });
+ await execa(cmd, [], { shell: true, stdio: "inherit" });
+ if (cmd.includes('--multiapi')) {
+ changePom(project);
+ }
};
var deleteMgmtFolders = function(project) {
@@ -202,6 +205,54 @@ var deleteFolderRecursive = function(folder) {
}
};
+var changePom = function(project) {
+ var modules = []
+
+ project = project.split('/')[0]
+ var projectRoot = path.join(sdkRoot, 'sdk', project);
+ var projectPom = path.join(projectRoot, mgmtPomFilename);
+
+ // search modules
+ fs.readdirSync(projectRoot).forEach(function(folder, index) {
+ if (fs.lstatSync(path.join(projectRoot, folder)).isDirectory()) {
+ if (folder.startsWith('mgmt-')) {
+ modules.push(folder);
+ }
+ }
+ })
+
+ pomHeader =
+`
+`;
+ pomVersion = '1.0.0 '
+
+ // add all modules to pom
+ if(fs.existsSync(projectPom)) {
+ var xmlContent = fs.readFileSync(projectPom, {encoding: 'utf-8'});
+ var xml = xmlparser.parse(xmlContent);
+ xml.project.modules.module = modules;
+ xmlContent = new xmlparser.j2xParser({format: true, indentBy: " "}).parse(xml);
+ xmlContent = xmlContent.replace('', pomHeader);
+ xmlContent = xmlContent.replace('1.0.0', pomVersion);
+
+ fs.writeFileSync(projectPom, xmlContent, {encoding: 'utf-8'})
+ }
+
+ // change all module pom.xml
+ modules.forEach(function(mod, index) {
+ var modulePom = path.join(projectRoot, mod, 'pom.xml');
+ if (fs.existsSync(modulePom)) {
+ var pomContent = fs.readFileSync(modulePom, {encoding: 'utf-8'});
+ pomContent = pomContent.replace('1.1.0', '1.3.1');
+ pomContent = pomContent.replace('../../../pom.management.xml', '../../parents/azure-arm-parent/pom.xml');
+ fs.writeFileSync(modulePom, pomContent, {encoding: 'utf-8'});
+ }
+ });
+}
+
gulp.task('java:build', shell.task('mvn package javadoc:aggregate -DskipTests=true -q'));
gulp.task('java:stage', ['java:build'], function(){
return gulp.src('./target/site/apidocs/**/*').pipe(gulp.dest('./dist'));
diff --git a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml
index e12e4720d58a..a7d5e27b2458 100644
--- a/eng/pipelines/templates/jobs/archetype-sdk-tests.yml
+++ b/eng/pipelines/templates/jobs/archetype-sdk-tests.yml
@@ -61,6 +61,10 @@ jobs:
variables:
- template: ../variables/globals.yml
+ # Default $(SubscriptionConfiguration) if the matrix does not specify a $(SubscriptionConfiguration)
+ - name: SubscriptionConfiguration
+ value: $(sub-config-azure-cloud-test-resources)
+
strategy:
matrix: ${{ parameters.Matrix }}
maxParallel: ${{ parameters.MaxParallel }}
diff --git a/eng/pipelines/templates/stages/archetype-java-release.yml b/eng/pipelines/templates/stages/archetype-java-release.yml
index 27b631ee72e8..89d60e0168a5 100644
--- a/eng/pipelines/templates/stages/archetype-java-release.yml
+++ b/eng/pipelines/templates/stages/archetype-java-release.yml
@@ -1,6 +1,9 @@
parameters:
Artifacts: []
ArtifactName: 'not-specified'
+ TargetDocRepoOwner: ''
+ TargetDocRepoName: ''
+ EnableIntegrationStage: true
stages:
# The signing stage is responsible for submitting binaries to ESRP for our official signing
@@ -13,9 +16,10 @@ stages:
- deployment: SignPackage
environment: esrp
timeoutInMinutes: 20
+ variables:
+ - template: ../variables/globals.yml
pool:
vmImage: ubuntu-18.04
-
strategy:
runOnce:
deploy:
@@ -51,6 +55,8 @@ stages:
- job: VerifyReleaseVersion
displayName: "Verify release version"
condition: ne(variables['Skip.VersionVerification'], 'true')
+ variables:
+ - template: ../variables/globals.yml
pool:
vmImage: ubuntu-18.04
@@ -76,23 +82,20 @@ stages:
environment: github
timeoutInMinutes: 5
dependsOn: VerifyReleaseVersion
-
+ variables:
+ - template: ../variables/globals.yml
pool:
vmImage: vs2017-win2016
-
strategy:
runOnce:
deploy:
steps:
- checkout: self
- - pwsh: |
- Get-ChildItem $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
- New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
- Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed/${{artifact.name}}-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
- Get-ChildItem $(Pipeline.Workspace)/${{artifact.safeName}}
- workingDirectory: $(Pipeline.Workspace)
- displayName: Stage artifacts
- timeoutInMinutes: 5
+ - template: /eng/pipelines/templates/steps/stage-artifacts.yml
+ parameters:
+ SourceFolder: ${{parameters.ArtifactName}}-signed
+ TargetFolder: ${{artifact.safeName}}
+ PackageName: ${{artifact.name}}
- template: /eng/common/pipelines/templates/steps/create-tags-and-git-release.yml
parameters:
ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
@@ -106,10 +109,10 @@ stages:
condition: and(succeeded(), ne(variables['Skip.PublishPackage'], 'true'))
environment: maven
dependsOn: TagRepository
-
+ variables:
+ - template: ../variables/globals.yml
pool:
- vmImage: windows-2019
-
+ vmImage: vs2017-win2016
strategy:
runOnce:
deploy:
@@ -139,28 +142,61 @@ stages:
BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
+ - ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
+ - deployment: PublicDocsMs
+ displayName: "Publish Updates for Docs.MS"
+ condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
+ environment: github
+ timeoutInMinutes: 5
+ dependsOn: PublishPackage
+ variables:
+ - template: ../variables/globals.yml
+ pool:
+ vmImage: vs2017-win2016
+ strategy:
+ runOnce:
+ deploy:
+ steps:
+ - checkout: self
+ - template: /eng/pipelines/templates/steps/stage-artifacts.yml
+ parameters:
+ SourceFolder: ${{parameters.ArtifactName}}-signed
+ TargetFolder: ${{artifact.safeName}}
+ PackageName: ${{artifact.name}}
+ - template: /eng/common/pipelines/templates/steps/docs-metadata-release.yml
+ parameters:
+ ArtifactLocation: $(Pipeline.Workspace)/${{artifact.safeName}}
+ PackageRepository: Maven
+ ReleaseSha: $(Build.SourceVersion)
+ RepoId: Azure/azure-sdk-for-java
+ WorkingDirectory: $(System.DefaultWorkingDirectory)
+ TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
+ TargetDocRepoName: ${{parameters.TargetDocRepoName}}
+ PRBranchName: 'smoke-test-rdme'
+ ArtifactName: ${{parameters.ArtifactName}}
+ Language: 'java'
+ DocRepoDestinationPath: 'docs-ref-services/'
+
- ${{if ne(artifact.options.skipPublishDocs, 'true')}}:
- deployment: PublishDocs
displayName: Publish Docs to GitHubIO Blob Storage
condition: and(succeeded(), ne(variables['Skip.PublishDocs'], 'true'))
environment: githubio
dependsOn: PublishPackage
-
-
+ variables:
+ - template: ../variables/globals.yml
pool:
vmImage: windows-2019
-
strategy:
runOnce:
deploy:
steps:
- checkout: self
- - pwsh: |
- Get-ChildItem -Recurse $(Pipeline.Workspace)
- New-Item -Type Directory -Name ${{artifact.safeName}} -Path $(Pipeline.Workspace)
- Copy-Item $(Pipeline.Workspace)/${{parameters.ArtifactName}}/${{artifact.name}}-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{artifact.safeName}}
- workingDirectory: $(Pipeline.Workspace)
- displayName: Stage artifacts
+ - template: /eng/pipelines/templates/steps/stage-artifacts.yml
+ parameters:
+ SourceFolder: ${{parameters.ArtifactName}}-signed
+ TargetFolder: ${{artifact.safeName}}
+ PackageName: ${{artifact.name}}
- pwsh: |
Get-ChildItem -Recurse $(Pipeline.Workspace)/${{artifact.safeName}}
workingDirectory: $(Pipeline.Workspace)
@@ -181,11 +217,10 @@ stages:
condition: and(succeeded(), ne(variables['Skip.UpdatePackageVersion'], 'true'))
environment: github
dependsOn: PublishPackage
-
-
+ variables:
+ - template: ../variables/globals.yml
pool:
vmImage: windows-2019
-
strategy:
runOnce:
deploy:
@@ -214,34 +249,35 @@ stages:
CommitMsg: "Increment package version after release of ${{ artifact.groupId }} ${{ artifact.name }}"
PRTitle: "Increment version for ${{ parameters.ServiceDirectory }} releases"
- - stage: Integration
- dependsOn: Signing
- jobs:
- - job: PublishPackages
- condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))
- displayName: Publish package to daily feed
- pool:
- vmImage: windows-2019
- variables:
- skipComponentGovernanceDetection: true
- steps:
- - checkout: self
- path: azure-sdk-for-java
- - checkout: azure-sdk-build-tools
- path: azure-sdk-build-tools
-
- - download: current
- artifact: ${{parameters.ArtifactName}}-signed
- timeoutInMinutes: 5
-
- - template: tools/gpg/gpg.yml@azure-sdk-build-tools
-
- - ${{ each artifact in parameters.Artifacts }}:
- - template: /eng/pipelines/templates/steps/java-publishing.yml
- parameters:
- ArtifactID: ${{artifact.name}}
- GroupID: ${{artifact.groupId}}
- ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
- Target: JavaDevFeed
- BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
- JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
\ No newline at end of file
+ - ${{if ne(parameters.EnableIntegrationStage, false)}}:
+ - stage: Integration
+ dependsOn: Signing
+ jobs:
+ - job: PublishPackages
+ condition: or(eq(variables['SetDevVersion'], 'true'), and(eq(variables['Build.Reason'],'Schedule'), eq(variables['System.TeamProject'], 'internal')))
+ displayName: Publish package to daily feed
+ variables:
+ - template: ../variables/globals.yml
+ pool:
+ vmImage: vs2017-win2016
+ steps:
+ - checkout: self
+ path: azure-sdk-for-java
+ - checkout: azure-sdk-build-tools
+ path: azure-sdk-build-tools
+
+ - download: current
+ artifact: ${{parameters.ArtifactName}}-signed
+ timeoutInMinutes: 5
+
+ - template: tools/gpg/gpg.yml@azure-sdk-build-tools
+
+ - ${{ each artifact in parameters.Artifacts }}:
+ - template: /eng/pipelines/templates/steps/java-publishing.yml
+ parameters:
+ ArtifactID: ${{artifact.name}}
+ GroupID: ${{artifact.groupId}}
+ ArtifactDirectory: $(Pipeline.Workspace)/${{parameters.ArtifactName}}-signed
+ Target: JavaDevFeed
+ BuildToolsPath: $(Pipeline.Workspace)/azure-sdk-build-tools
+ JavaRepoRoot: $(Pipeline.Workspace)/azure-sdk-for-java
\ No newline at end of file
diff --git a/eng/pipelines/templates/stages/archetype-sdk-client.yml b/eng/pipelines/templates/stages/archetype-sdk-client.yml
index 563e9dd9b8df..7bcc43d42192 100644
--- a/eng/pipelines/templates/stages/archetype-sdk-client.yml
+++ b/eng/pipelines/templates/stages/archetype-sdk-client.yml
@@ -3,6 +3,9 @@ parameters:
AdditionalModules: []
SDKType: client
ServiceDirectory: not-specified
+ TargetDocRepoOwner: 'Azure'
+ TargetDocRepoName: 'azure-docs-sdk-java'
+
stages:
- stage: Build
@@ -23,3 +26,6 @@ stages:
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ArtifactName: packages
+ TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
+ TargetDocRepoName: ${{parameters.TargetDocRepoName}}
+
diff --git a/eng/pipelines/templates/stages/archetype-sdk-data.yml b/eng/pipelines/templates/stages/archetype-sdk-data.yml
index a5a7c5bd474d..80d91880e239 100644
--- a/eng/pipelines/templates/stages/archetype-sdk-data.yml
+++ b/eng/pipelines/templates/stages/archetype-sdk-data.yml
@@ -3,6 +3,9 @@ parameters:
AdditionalModules: []
SDKType: data
ServiceDirectory: not-specified
+ TargetDocRepoOwner: 'Azure'
+ TargetDocRepoName: 'azure-docs-sdk-java'
+
stages:
- stage: Build
@@ -16,10 +19,12 @@ stages:
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- - template: pipelines/stages/archetype-java-release.yml@azure-sdk-build-tools
+ - template: archetype-java-release.yml
parameters:
DependsOn: Build
ServiceDirectory: ${{parameters.ServiceDirectory}}
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ArtifactName: packages
+ TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
+ TargetDocRepoName: ${{parameters.TargetDocRepoName}}
\ No newline at end of file
diff --git a/eng/pipelines/templates/stages/archetype-sdk-pom-only.yml b/eng/pipelines/templates/stages/archetype-sdk-pom-only.yml
index 636a1ae88d77..682aa28c4909 100644
--- a/eng/pipelines/templates/stages/archetype-sdk-pom-only.yml
+++ b/eng/pipelines/templates/stages/archetype-sdk-pom-only.yml
@@ -4,7 +4,9 @@ parameters:
ServiceDirectory: not-specified
Skip.UpdatePackageVersion: true
Skip.VersionVerification: true
-
+ TargetDocRepoOwner: 'Azure'
+ TargetDocRepoName: 'azure-docs-sdk-java'
+
stages:
- stage: Build
jobs:
@@ -20,6 +22,11 @@ stages:
parameters:
DependsOn: Build
ServiceDirectory: ${{parameters.ServiceDirectory}}
+ RunIntegrationStage: false
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ArtifactName: packages
+ TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
+ TargetDocRepoName: ${{parameters.TargetDocRepoName}}
+ EnableIntegrationStage: false
+
diff --git a/eng/pipelines/templates/stages/cosmos-sdk-client.yml b/eng/pipelines/templates/stages/cosmos-sdk-client.yml
index 731134b514f1..b54fa96efd38 100644
--- a/eng/pipelines/templates/stages/cosmos-sdk-client.yml
+++ b/eng/pipelines/templates/stages/cosmos-sdk-client.yml
@@ -1,7 +1,9 @@
parameters:
Artifacts: []
ServiceDirectory: not-specified
-
+ TargetDocRepoOwner: 'Azure'
+ TargetDocRepoName: 'azure-docs-sdk-java'
+
stages:
- stage: Build
jobs:
@@ -143,12 +145,12 @@ stages:
# The Prerelease and Release stages are conditioned on whether we are building a pull request and the branch.
- ${{if and(ne(variables['Build.Reason'], 'PullRequest'), eq(variables['System.TeamProject'], 'internal'))}}:
- - template: pipelines/stages/archetype-java-release.yml@azure-sdk-build-tools
+ - template: archetype-java-release.yml
parameters:
DependsOn: Build
ServiceDirectory: ${{parameters.ServiceDirectory}}
SDKType: ${{parameters.SDKType}}
Artifacts: ${{parameters.Artifacts}}
ArtifactName: packages
-
-
\ No newline at end of file
+ TargetDocRepoOwner: ${{parameters.TargetDocRepoOwner}}
+ TargetDocRepoName: ${{parameters.TargetDocRepoName}}
diff --git a/eng/pipelines/templates/steps/stage-artifacts.yml b/eng/pipelines/templates/steps/stage-artifacts.yml
new file mode 100644
index 000000000000..61929573655f
--- /dev/null
+++ b/eng/pipelines/templates/steps/stage-artifacts.yml
@@ -0,0 +1,10 @@
+parameters:
+ SourceFolder: '' # ArtifactName (aka "packages")
+ TargetFolder: '' # artifact.safename (azuretemplate)
+ PackageName: '' # artifact.name (azure-template)
+
+steps:
+ - pwsh: |
+ New-Item -Force -Type Directory -Name ${{parameters.TargetFolder}} -Path $(Pipeline.Workspace)
+ Copy-Item $(Pipeline.Workspace)/${{parameters.SourceFolder}}/${{parameters.PackageName}}-[0-9]*.[0-9]*.[0-9]* $(Pipeline.Workspace)/${{parameters.TargetFolder}}
+ displayName: Stage artifacts
\ No newline at end of file
diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml
index 3633f542a2ef..7dd61a4e9244 100644
--- a/eng/spotbugs-aggregate-report/pom.xml
+++ b/eng/spotbugs-aggregate-report/pom.xml
@@ -117,17 +117,17 @@
com.microsoft.azure
azure-eventhubs
- 3.2.0-beta.1
+ 3.3.0-beta.1
com.microsoft.azure
azure-eventhubs-eph
- 3.2.0-beta.1
+ 3.3.0-beta.1
com.microsoft.azure
azure-eventhubs-extensions
- 3.2.0-beta.1
+ 3.3.0-beta.1
+ 3.4.0-beta.1
diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt
index 07ba36ba999b..79b0aa7e1324 100644
--- a/eng/versioning/external_dependencies.txt
+++ b/eng/versioning/external_dependencies.txt
@@ -15,11 +15,14 @@ com.microsoft.azure:azure-arm-client-runtime;1.7.3
com.microsoft.azure:azure-client-authentication;1.7.3
com.microsoft.azure:azure-client-runtime;1.7.3
com.microsoft.azure:azure-core;0.9.8
+com.microsoft.azure:azure-cosmos;3.7.1
com.microsoft.azure:azure-keyvault-cryptography;1.2.2
com.microsoft.azure:qpid-proton-j-extensions;1.2.3
com.microsoft.azure:spotbugs-maven-plugin;1.2.1
+com.microsoft.azure:spring-data-cosmosdb;2.2.3.FIX1
com.microsoft.rest:client-runtime;1.7.4
com.microsoft.rest.v2:client-runtime;2.1.1
+com.microsoft.spring.data.gremlin:spring-data-gremlin;2.2.3
com.squareup.okhttp3:okhttp;4.2.2
commons-codec:commons-codec;1.13
io.micrometer:micrometer-core;1.2.0
@@ -40,11 +43,13 @@ io.reactivex:rxjava;1.2.4
javax.annotation:javax.annotation-api;1.3.2
javax.servlet:javax.servlet-api;4.0.1
javax.validation:validation-api;2.0.1.Final
+org.apache.avro:avro;1.9.2
org.apache.httpcomponents:httpclient;4.3.6
org.apache.logging.log4j:log4j-api;2.11.1
org.apache.logging.log4j:log4j-core;2.11.1
org.apache.logging.log4j:log4j-slf4j-impl;2.13.0
org.apache.qpid:proton-j;0.33.4
+org.apache.qpid:qpid-jms-client;0.43.0
org.asynchttpclient:async-http-client;2.10.5
org.codehaus.groovy:groovy-eclipse-batch;2.5.8-01
org.codehaus.groovy:groovy-eclipse-compiler;3.4.0-01
@@ -70,6 +75,7 @@ org.springframework.security:spring-security-oauth2-client;5.2.0.RELEASE
org.springframework.security:spring-security-oauth2-core;5.2.0.RELEASE
org.springframework.security:spring-security-oauth2-jose;5.2.0.RELEASE
org.springframework:spring-web;5.2.5.RELEASE
+org.springframework:spring-jms;5.2.5.RELEASE
pl.pragmatists:JUnitParams;1.1.1
## Test dependency versions
@@ -227,3 +233,7 @@ media_com.microsoft.azure:adal4j;1.2.0
# sdk\storage\azure-storage-blob-cryptography\pom.xml
storage_com.microsoft.azure:azure-storage;8.4.0
+
+# sdk\spring\azure-spring-boot\pom.xml
+spring_io.micrometer:micrometer-core;1.3.0
+spring_io.micrometer:micrometer-registry-azure-monitor;1.3.0
diff --git a/eng/versioning/pom_file_version_scanner.ps1 b/eng/versioning/pom_file_version_scanner.ps1
index 48f925433eed..400fa5edc663 100644
--- a/eng/versioning/pom_file_version_scanner.ps1
+++ b/eng/versioning/pom_file_version_scanner.ps1
@@ -516,12 +516,12 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
if (!$includeNode.NextSibling -or $includeNode.NextSibling.NodeType -ne "Comment")
{
$script:FoundError = $true
- Write-Error-With-Color "Error: is missing the update tag which should be "
+ Write-Error-With-Color "Error: is missing the update tag which should be "
}
- elseif ($includeNode.NextSibling.Value.Trim() -notmatch "{x-include-update;(\w+)?$($groupId):$($artifactId);external_dependency}")
+ elseif ($includeNode.NextSibling.Value.Trim() -notmatch "{x-include-update;(\w+)?$($groupId):$($artifactId);(current|dependency|external_dependency)}")
{
$script:FoundError = $true
- Write-Error-With-Color "Error: version update tag for $($includeNode.InnerText) should be "
+ Write-Error-With-Color "Error: version update tag for $($includeNode.InnerText) should be "
}
else
{
@@ -539,18 +539,45 @@ Get-ChildItem -Path $Path -Filter pom*.xml -Recurse -File | ForEach-Object {
# entries in case it's an external dependency entry. Because this has already
# been validated for format, grab the group:artifact
$depKey = $includeNode.NextSibling.Value.Trim().Split(";")[1]
- if ($extDepHash.ContainsKey($depKey))
+ $depType = $includeNode.NextSibling.Value.Trim().Split(";")[2]
+ $depType = $depType.Substring(0, $depType.IndexOf("}"))
+ if ($depType -eq $DependencyTypeExternal)
{
- if ($versionWithoutBraces -ne $extDepHash[$depKey].ver)
+ if ($extDepHash.ContainsKey($depKey))
+ {
+ if ($versionWithoutBraces -ne $extDepHash[$depKey].ver)
+ {
+ $script:FoundError = $true
+ Write-Error-With-Color "Error: $($depKey)'s version is '$($versionWithoutBraces)' but the external_dependency version is listed as $($extDepHash[$depKey].ver)"
+ }
+ }
+ else
{
$script:FoundError = $true
- Write-Error-With-Color "Error: $($depKey)'s version is '$($versionWithoutBraces)' but the external_dependency version is listed as $($extDepHash[$depKey].ver)"
+ Write-Error-With-Color "Error: the groupId:artifactId entry '$($depKey)' for '$($rawIncludeText)' is not a valid external dependency. Please verify the entry exists in the external_dependencies.txt file. -->"
}
- }
+ }
else
{
- $script:FoundError = $true
- Write-Error-With-Color "Error: the groupId:artifactId entry '$($depKey)' for '$($rawIncludeText)' is not a valid external dependency. Please verify the entry exists in the external_dependencies.txt file. -->"
+ if ($depType -eq $DependencyTypeDependency)
+ {
+ if ($versionWithoutBraces -ne $libHash[$depKey].depVer)
+ {
+ return "Error: $($depKey)'s is '$($versionString)' but the dependency version is listed as $($libHash[$depKey].depVer)"
+ }
+ }
+ elseif ($depType -eq $DependencyTypeCurrent)
+ {
+ # Verify that none of the 'current' dependencies are using a groupId that starts with 'unreleased_' or 'beta_'
+ if ($depKey.StartsWith('unreleased_') -or $depKey.StartsWith('beta_'))
+ {
+ return "Error: $($versionUpdateString) is using an unreleased_ or beta_ dependency and trying to set current value. Only dependency versions can be set with an unreleased or beta dependency."
+ }
+ if ($versionWithoutBraces -ne $libHash[$depKey].curVer)
+ {
+ return "Error: $($depKey)'s is '$($versionString)' but the current version is listed as $($libHash[$depKey].curVer)"
+ }
+ }
}
}
}
diff --git a/eng/versioning/scan_for_unreleased_dependencies.ps1 b/eng/versioning/scan_for_unreleased_dependencies.ps1
index 40a6b761cfca..9a5720bdc10c 100644
--- a/eng/versioning/scan_for_unreleased_dependencies.ps1
+++ b/eng/versioning/scan_for_unreleased_dependencies.ps1
@@ -34,7 +34,7 @@ Get-ChildItem -Path $serviceDirectory -Filter pom*.xml -Recurse -File | ForEach-
$script:FoundPomFile = $true
Write-Host "Found pom file with matching groupId($($inputGroupId))/artifactId($($inputArtifactId)), pomFile=$($pomFile)"
$version = $xmlPomFile.project.version
- if ($version -like '*-beta.*')
+ if ($version -match '.*-beta(\.\d*)?')
{
$libraryIsBeta = $true
Write-Host "Library is releasing as Beta, version=$($version)"
@@ -99,7 +99,7 @@ Get-ChildItem -Path $serviceDirectory -Filter pom*.xml -Recurse -File | ForEach-
}
# If this isn't an external dependency then ensure that if the dependency
# version is beta, that we're releasing a beta, otherwise fail
- if ($versionNode.InnerText -like '*-beta.*')
+ if ($versionNode.InnerText -match '.*-beta(\.\d*)?')
{
if (!$libraryIsBeta)
{
diff --git a/eng/versioning/set_versions.py b/eng/versioning/set_versions.py
index d2611febc276..fd7e2c0e863a 100644
--- a/eng/versioning/set_versions.py
+++ b/eng/versioning/set_versions.py
@@ -42,6 +42,7 @@
from utils import CodeModule
from utils import UpdateType
from utils import version_regex_str_with_names_anchored
+from utils import prerelease_data_version_regex
from utils import prerelease_version_regex_with_name
# some things that should not be updated for devops builds, in the case where everything is being updated in one call
@@ -50,6 +51,7 @@
# The regex string we want should be the anchored one since the entire string is what's being matched
version_regex_named = re.compile(version_regex_str_with_names_anchored)
prerelease_regex_named = re.compile(prerelease_version_regex_with_name)
+prerelease_data_regex = re.compile(prerelease_data_version_regex)
# Update packages (excluding unreleased dependencies and packages which already
# have a dev version set) to use a "zero dev version" (e.g. dev.20201225.0).
@@ -249,10 +251,21 @@ def increment_library_version(build_type, artifact_id, group_id):
# This is the case where, somehow, the versioning verification has failed and
# the prerelease verification doesn't match "beta.X"
if prever is None:
- raise ValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format beta.X'.format(library_to_update, module.current, vmatch.group('prerelease')))
- rev = int(prever.group('revision'))
- rev += 1
- new_version = '{}.{}.{}-beta.{}'.format(vmatch.group('major'), vmatch.group('minor'), vmatch.group('patch'), str(rev))
+ # if the build_type isn't data then error
+ if build_type.name.lower() != 'data':
+ raise ValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format beta.X'.format(library_to_update, module.current, vmatch.group('prerelease')))
+ else:
+ # verify that prerelease is "beta"
+ if prerelease_data_regex.match(vmatch.group('prerelease')) is None:
+ raise ValueError('library_to_update ({}:{}) has an invalid prerelease version ({}) which should be of the format (beta) or (beta.X)'.format(library_to_update, module.current, vmatch.group('prerelease')))
+ # in the case there the prerelease version is just "beta", increment the minor and set the patch to 0
+ minor = int(vmatch.group('minor'))
+ minor += 1
+ new_version = '{}.{}.{}-beta'.format(vmatch.group('major'), minor, 0)
+ else:
+ rev = int(prever.group('revision'))
+ rev += 1
+ new_version = '{}.{}.{}-beta.{}'.format(vmatch.group('major'), vmatch.group('minor'), vmatch.group('patch'), str(rev))
else:
minor = int(vmatch.group('minor'))
minor += 1
@@ -308,12 +321,21 @@ def verify_current_version_of_artifact(build_type, artifact_id, group_id):
if vmatch.group('prerelease') is not None:
prerel = vmatch.group('prerelease')
+ # this regex is looking for beta.X
if prerelease_regex_named.match(prerel) is None:
- raise ValueError('library ({}) version ({}) in version file ({}) is not a correct version to release. The accepted prerelease tag is (beta.X) and the current prerelease tag is ({})'.format(library_to_update, module.current, version_file, prerel))
-
- prever = prerelease_regex_named.match(prerel)
- rev = int(prever.group('revision'))
- temp_ver = '{}-beta.{}'.format(temp_ver, str(rev))
+ # if the build_type isn't data then error
+ if build_type.name.lower() != 'data':
+ raise ValueError('library ({}) version ({}) in version file ({}) is not a correct version to release. The accepted prerelease tag is (beta.X) and the current prerelease tag is ({})'.format(library_to_update, module.current, version_file, prerel))
+ else:
+ # verify that the prerelease tag is "beta" which is the only allowable thing for data track aside from beta.X
+ if prerelease_data_regex.match(prerel) is None:
+ raise ValueError('library ({}) version ({}) in version file ({}) is not a correct version to release. The accepted prerelease tags for data track are (beta) or (beta.X) and the current prerelease tag is ({})'.format(library_to_update, module.current, version_file, prerel))
+ # at this point the version is ..-beta
+ temp_ver = '{}-{}'.format(temp_ver, str(prerel))
+ else:
+ prever = prerelease_regex_named.match(prerel)
+ rev = int(prever.group('revision'))
+ temp_ver = '{}-beta.{}'.format(temp_ver, str(rev))
# last but not least, for sanity verify that the version constructed from the
# semver pieces matches module's current version
diff --git a/eng/versioning/utils.py b/eng/versioning/utils.py
index c8d49d729317..47b054b30049 100644
--- a/eng/versioning/utils.py
+++ b/eng/versioning/utils.py
@@ -37,6 +37,8 @@
# This is specific to our revision which, if there is one, needs to have the format of beta.X
prerelease_version_regex_with_name = r'^beta\.(?P0|[1-9]\d*)$'
+# This is special for track 1, data track, which can be ..-beta with no ".X"
+prerelease_data_version_regex = r'^beta$'
class UpdateType(Enum):
external_dependency = 'external_dependency'
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index 67a1b99e03ca..66d34ceab6f9 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -5,7 +5,7 @@ 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-formrecognizer;1.0.0-beta.2;1.0.0-beta.3
-com.azure:azure-ai-textanalytics;1.0.0-beta.4;1.0.0-beta.5
+com.azure:azure-ai-textanalytics;1.0.0-beta.5;1.0.0-beta.6
com.azure:azure-core;1.5.0;1.6.0-beta.1
com.azure:azure-core-amqp;1.1.2;1.2.0-beta.1
com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1
@@ -16,10 +16,13 @@ com.azure:azure-core-serializer-json-gson;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-core-serializer-json-jackson;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-core-test;1.2.1;1.3.0-beta.1
com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.4;1.0.0-beta.5
-com.azure:azure-cosmos;4.0.1-beta.3;4.0.1-beta.4
+com.azure:azure-cosmos;4.0.1-beta.4;4.0.1-beta.5
com.azure:azure-cosmos-examples;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-data-appconfiguration;1.1.1;1.2.0-beta.1
+com.azure:azure-data-schemaregistry;1.0.0-beta.1;1.0.0-beta.1
+com.azure:azure-data-schemaregistry-avro;1.0.0-beta.1;1.0.0-beta.1
+com.azure:azure-data-tables;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-identity;1.0.6;1.1.0-beta.5
com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1
@@ -30,7 +33,7 @@ com.azure:azure-search-documents;1.0.0-beta.3;1.0.0-beta.4
com.azure:azure-security-keyvault-certificates;4.1.0-beta.2;4.1.0-beta.3
com.azure:azure-security-keyvault-keys;4.2.0-beta.3;4.2.0-beta.4
com.azure:azure-security-keyvault-secrets;4.2.0-beta.2;4.2.0-beta.3
-com.azure:azure-sdk-template;1.0.4-beta.12;1.0.4-beta.13
+com.azure:azure-sdk-template;1.0.4-beta.19;1.0.4-beta.20
com.azure:azure-storage-blob;12.6.1;12.7.0-beta.1
com.azure:azure-storage-blob-batch;12.5.1;12.6.0-beta.1
com.azure:azure-storage-blob-cryptography;12.6.1;12.7.0-beta.1
@@ -43,6 +46,15 @@ com.azure:azure-storage-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-storage-queue;12.5.1;12.6.0-beta.1
com.azure:perf-test-core;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-test-watcher;1.0.0-beta.1;1.0.0-beta.1
+com.microsoft.azure:azure-spring-boot;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-active-directory-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-active-directory-b2c-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-cosmosdb-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-data-gremlin-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-keyvault-secrets-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-servicebus-jms-spring-boot-starter;2.2.4;2.2.5-beta.1
+com.microsoft.azure:azure-spring-boot-metrics-starter;2.2.4;2.2.5-beta.1
# Unreleased dependencies: Copy the entry from above, prepend "unreleased_" and remove the current
# version. Unreleased dependencies are only valid for dependency versions.
diff --git a/eng/versioning/version_data.txt b/eng/versioning/version_data.txt
index 755387022e18..0d3379a10eea 100644
--- a/eng/versioning/version_data.txt
+++ b/eng/versioning/version_data.txt
@@ -18,15 +18,15 @@ com.microsoft.azure.cognitiveservices:azure-cognitiveservices-newssearch;1.1.0-b
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-videosearch;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-visualsearch;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-websearch;1.1.0-beta.1;1.1.0-beta.1
-com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;1.0.3-beta;1.0.3-beta
+com.microsoft.azure.cognitiveservices:azure-cognitiveservices-computervision;1.0.4-beta;1.0.4-beta
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-contentmoderator;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-prediction;1.1.0-beta.3;1.1.0-beta.3
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-customvision-training;1.1.0-beta.3;1.1.0-beta.3
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-faceapi;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure.cognitiveservices:azure-cognitiveservices-qnamaker;1.0.0-beta;1.0.0-beta
-com.microsoft.azure:azure-eventhubs;3.1.1;3.2.0-beta.1
-com.microsoft.azure:azure-eventhubs-eph;3.1.1;3.2.0-beta.1
-com.microsoft.azure:azure-eventhubs-extensions;3.1.1;3.2.0-beta.1
+com.microsoft.azure:azure-eventhubs;3.2.0;3.3.0-beta.1
+com.microsoft.azure:azure-eventhubs-eph;3.2.0;3.3.0-beta.1
+com.microsoft.azure:azure-eventhubs-extensions;3.2.0;3.3.0-beta.1
com.microsoft.azure:azure-keyvault;1.2.4;1.3.0-beta.1
com.microsoft.azure:azure-keyvault-complete;1.2.4;1.3.0-beta.1
com.microsoft.azure:azure-keyvault-core;1.2.4;1.3.0-beta.1
@@ -34,12 +34,9 @@ com.microsoft.azure:azure-keyvault-cryptography;1.2.4;1.3.0-beta.1
com.microsoft.azure:azure-keyvault-extensions;1.2.4;1.3.0-beta.1
com.microsoft.azure:azure-keyvault-test;1.2.3;1.2.4
com.microsoft.azure:azure-keyvault-webkey;1.2.4;1.3.0-beta.1
-com.microsoft.azure:azure-servicebus;3.2.0;3.3.0-beta.1
+com.microsoft.azure:azure-servicebus;3.3.0;3.4.0-beta.1
com.microsoft.azure:azure-storage-blob;11.0.2;11.0.2
com.microsoft.azure.msi_auth_token_provider:azure-authentication-msi-token-provider;1.1.0-beta.1;1.1.0-beta.1
com.microsoft.azure:azure-eventgrid;1.4.0-beta.1;1.4.0-beta.1
com.microsoft.azure:azure-loganalytics;1.0.0-beta-2;1.0.0-beta.2
com.microsoft.azure:azure-media;1.0.0-beta.1;1.0.0-beta.1
-com.microsoft.azure:azure-spring-boot;2.2.4;2.2.5-beta.1
-com.microsoft.azure:azure-spring-boot-starter;2.2.4;2.2.5-beta.1
-com.microsoft.azure:azure-active-directory-spring-boot-starter;2.2.4;2.2.5-beta.1
diff --git a/pom.xml b/pom.xml
index da436a3d829d..807e0f82055c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,9 +26,11 @@
sdk/keyvault
sdk/loganalytics
sdk/mediaservices
+ sdk/schemaregistry
sdk/search
sdk/servicebus
sdk/storage
+ sdk/tables
sdk/template
sdk/textanalytics
sdk/spring
diff --git a/profiles/2018-03-01-hybrid/pom.xml b/profiles/2018-03-01-hybrid/pom.xml
index cb10b9634c84..fa25b6fc1cd6 100644
--- a/profiles/2018-03-01-hybrid/pom.xml
+++ b/profiles/2018-03-01-hybrid/pom.xml
@@ -10,7 +10,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../pom.management.xml
+ ../../sdk/parents/azure-arm-parent
azure-profile-parent
1.0.0-beta
diff --git a/profiles/2019-03-01-hybrid/pom.xml b/profiles/2019-03-01-hybrid/pom.xml
index c5a31e37af6a..a03484a0f538 100644
--- a/profiles/2019-03-01-hybrid/pom.xml
+++ b/profiles/2019-03-01-hybrid/pom.xml
@@ -10,7 +10,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../pom.management.xml
+ ../../sdk/parents/azure-arm-parent
azure-profile-parent
1.0.0-beta-1
diff --git a/sdk/advisor/mgmt-v2017_04_19/pom.xml b/sdk/advisor/mgmt-v2017_04_19/pom.xml
index 0aac6cdd3cef..53d4ef915466 100644
--- a/sdk/advisor/mgmt-v2017_04_19/pom.xml
+++ b/sdk/advisor/mgmt-v2017_04_19/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-advisor
1.0.0-beta-2
diff --git a/sdk/apimanagement/mgmt-v2018_06_01_preview/pom.xml b/sdk/apimanagement/mgmt-v2018_06_01_preview/pom.xml
index da110780ad84..3b70cba0a9cc 100644
--- a/sdk/apimanagement/mgmt-v2018_06_01_preview/pom.xml
+++ b/sdk/apimanagement/mgmt-v2018_06_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-apimanagement
1.0.0-beta
diff --git a/sdk/apimanagement/mgmt-v2019_01_01/pom.xml b/sdk/apimanagement/mgmt-v2019_01_01/pom.xml
index c37efec5c0ee..d29b7db4f2ac 100644
--- a/sdk/apimanagement/mgmt-v2019_01_01/pom.xml
+++ b/sdk/apimanagement/mgmt-v2019_01_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-apimanagement
1.0.0-beta-1
diff --git a/sdk/apimanagement/mgmt-v2019_12_01/pom.xml b/sdk/apimanagement/mgmt-v2019_12_01/pom.xml
index d669593b4cd6..d9120c8be4df 100644
--- a/sdk/apimanagement/mgmt-v2019_12_01/pom.xml
+++ b/sdk/apimanagement/mgmt-v2019_12_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-apimanagement
1.0.0-beta
diff --git a/sdk/appconfiguration/mgmt-v2019_02_01_preview/pom.xml b/sdk/appconfiguration/mgmt-v2019_02_01_preview/pom.xml
index 1b3a28004a82..a6e6321fb507 100644
--- a/sdk/appconfiguration/mgmt-v2019_02_01_preview/pom.xml
+++ b/sdk/appconfiguration/mgmt-v2019_02_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appconfiguration
1.0.0-beta
diff --git a/sdk/appconfiguration/mgmt-v2019_10_01/pom.xml b/sdk/appconfiguration/mgmt-v2019_10_01/pom.xml
index f10240aa554f..3af16db74ddc 100644
--- a/sdk/appconfiguration/mgmt-v2019_10_01/pom.xml
+++ b/sdk/appconfiguration/mgmt-v2019_10_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appconfiguration
1.0.0-beta
diff --git a/sdk/appconfiguration/mgmt-v2019_11_01_preview/pom.xml b/sdk/appconfiguration/mgmt-v2019_11_01_preview/pom.xml
index 343893b5e286..ba0056e25f4d 100644
--- a/sdk/appconfiguration/mgmt-v2019_11_01_preview/pom.xml
+++ b/sdk/appconfiguration/mgmt-v2019_11_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appconfiguration
1.0.0-beta
diff --git a/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml b/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml
index ff6546f499a5..215ef68f5b64 100644
--- a/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml
+++ b/sdk/applicationinsights/mgmt-v2015_05_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-insights
1.0.0-beta
diff --git a/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml b/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
index 98f72fb94143..b53f0e308112 100644
--- a/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
+++ b/sdk/appplatform/mgmt-v2019_05_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appplatform
1.0.0-beta-1
diff --git a/sdk/appservice/mgmt-v2016_03_01/pom.xml b/sdk/appservice/mgmt-v2016_03_01/pom.xml
index 56f4a5e0773c..ea60b275d9e3 100644
--- a/sdk/appservice/mgmt-v2016_03_01/pom.xml
+++ b/sdk/appservice/mgmt-v2016_03_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appservice
1.0.0-beta-2
diff --git a/sdk/appservice/mgmt-v2016_08_01/pom.xml b/sdk/appservice/mgmt-v2016_08_01/pom.xml
index ae8ee04003b8..b5882e2eaab3 100644
--- a/sdk/appservice/mgmt-v2016_08_01/pom.xml
+++ b/sdk/appservice/mgmt-v2016_08_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appservice
1.0.0-beta
diff --git a/sdk/appservice/mgmt-v2016_09_01/pom.xml b/sdk/appservice/mgmt-v2016_09_01/pom.xml
index 2bc397bc185c..1f8d7b5cd804 100644
--- a/sdk/appservice/mgmt-v2016_09_01/pom.xml
+++ b/sdk/appservice/mgmt-v2016_09_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appservice
1.0.0-beta-2
diff --git a/sdk/appservice/mgmt-v2018_02_01/pom.xml b/sdk/appservice/mgmt-v2018_02_01/pom.xml
index 055b8a47eb54..234568411d6e 100644
--- a/sdk/appservice/mgmt-v2018_02_01/pom.xml
+++ b/sdk/appservice/mgmt-v2018_02_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-appservice
1.0.0-beta-1
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/FunctionApp.java b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/FunctionApp.java
index 1c5b59cb77f0..11f868807689 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/FunctionApp.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/FunctionApp.java
@@ -9,8 +9,8 @@
import com.azure.management.resources.fluentcore.model.Creatable;
import com.azure.management.resources.fluentcore.model.Refreshable;
import com.azure.management.resources.fluentcore.model.Updatable;
-import com.azure.management.storage.StorageAccount;
-import com.azure.management.storage.StorageAccountSkuType;
+import com.azure.management.storage.models.StorageAccount;
+import com.azure.management.storage.models.StorageAccountSkuType;
import java.util.Map;
import reactor.core.publisher.Mono;
@@ -314,7 +314,7 @@ interface WithStorageAccount {
* @return the next stage of the definition
*/
@Deprecated
- WithCreate withNewStorageAccount(String name, com.azure.management.storage.SkuName sku);
+ WithCreate withNewStorageAccount(String name, com.azure.management.storage.models.SkuName sku);
/**
* Creates a new storage account to use for the function app.
@@ -325,6 +325,14 @@ interface WithStorageAccount {
*/
WithCreate withNewStorageAccount(String name, StorageAccountSkuType sku);
+ /**
+ * Creates a new storage account to use for the function app.
+ *
+ * @param storageAccount a creatable definition for a new storage account
+ * @return the next stage of the definition
+ */
+ WithCreate withNewStorageAccount(Creatable storageAccount);
+
/**
* Specifies the storage account to use for the function app.
*
@@ -646,7 +654,7 @@ interface WithStorageAccount {
* @return the next stage of the function app update
*/
@Deprecated
- Update withNewStorageAccount(String name, com.azure.management.storage.SkuName sku);
+ Update withNewStorageAccount(String name, com.azure.management.storage.models.SkuName sku);
/**
* Creates a new storage account to use for the function app.
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceBaseImpl.java b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceBaseImpl.java
index 2ffbaa2f9cc9..c808c04d66e2 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceBaseImpl.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceBaseImpl.java
@@ -358,7 +358,7 @@ Mono updateDiagnosticLogsConfig(SiteLogsConfigInner siteLog
}
private AppServicePlanImpl newDefaultAppServicePlan() {
- String planName = this.manager().getSdkContext().randomResourceName(name() + "plan", 32);
+ String planName = this.manager().sdkContext().randomResourceName(name() + "plan", 32);
return newDefaultAppServicePlan(planName);
}
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceManager.java b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceManager.java
index b1740679a36b..2f9a0b5aa091 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceManager.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/AppServiceManager.java
@@ -21,7 +21,7 @@
import com.azure.management.resources.fluentcore.profile.AzureProfile;
import com.azure.management.resources.fluentcore.utils.HttpPipelineProvider;
import com.azure.management.resources.fluentcore.utils.SdkContext;
-import com.azure.management.storage.implementation.StorageManager;
+import com.azure.management.storage.StorageManager;
/** Entry point to Azure storage resource management. */
public final class AppServiceManager extends Manager {
diff --git a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/FunctionAppImpl.java b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/FunctionAppImpl.java
index cf2b548364fe..79a6f9cf2222 100644
--- a/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/FunctionAppImpl.java
+++ b/sdk/appservice/mgmt/src/main/java/com/azure/management/appservice/implementation/FunctionAppImpl.java
@@ -38,9 +38,9 @@
import com.azure.management.appservice.models.SiteLogsConfigInner;
import com.azure.management.resources.fluentcore.model.Creatable;
import com.azure.management.resources.fluentcore.model.Indexable;
-import com.azure.management.storage.StorageAccount;
-import com.azure.management.storage.StorageAccountKey;
-import com.azure.management.storage.StorageAccountSkuType;
+import com.azure.management.storage.models.StorageAccount;
+import com.azure.management.storage.models.StorageAccountKey;
+import com.azure.management.storage.models.StorageAccountSkuType;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.io.File;
import java.io.IOException;
@@ -216,7 +216,7 @@ Mono submitAppSettings() {
SETTING_WEBSITE_CONTENTAZUREFILECONNECTIONSTRING, connectionString);
addAppSettingIfNotModified(
SETTING_WEBSITE_CONTENTSHARE,
- this.manager().getSdkContext().randomResourceName(name(), 32));
+ this.manager().sdkContext().randomResourceName(name(), 32));
}
return FunctionAppImpl.super.submitAppSettings();
}))
@@ -297,7 +297,7 @@ private FunctionAppImpl autoSetAlwaysOn(PricingTier pricingTier) {
}
@Override
- public FunctionAppImpl withNewStorageAccount(String name, com.azure.management.storage.SkuName sku) {
+ public FunctionAppImpl withNewStorageAccount(String name, com.azure.management.storage.models.SkuName sku) {
StorageAccount.DefinitionStages.WithGroup storageDefine =
manager().storageManager().storageAccounts().define(name).withRegion(regionName());
if (super.creatableGroup != null && isInCreateMode()) {
@@ -332,6 +332,13 @@ public FunctionAppImpl withNewStorageAccount(String name, StorageAccountSkuType
return this;
}
+ @Override
+ public FunctionAppImpl withNewStorageAccount(Creatable storageAccount) {
+ storageAccountCreatable = storageAccount;
+ this.addDependency(storageAccountCreatable);
+ return this;
+ }
+
@Override
public FunctionAppImpl withExistingStorageAccount(StorageAccount storageAccount) {
this.storageAccountToSet = storageAccount;
@@ -631,8 +638,8 @@ public Flux createAsync() {
}
if (currentStorageAccount == null && storageAccountToSet == null && storageAccountCreatable == null) {
withNewStorageAccount(
- this.manager().getSdkContext().randomResourceName(name(), 20),
- com.azure.management.storage.SkuName.STANDARD_GRS);
+ this.manager().sdkContext().randomResourceName(name(), 20),
+ com.azure.management.storage.models.SkuName.STANDARD_GRS);
}
}
return super.createAsync();
diff --git a/sdk/appservice/mgmt/src/test/java/com/azure/management/appservice/FunctionAppsTests.java b/sdk/appservice/mgmt/src/test/java/com/azure/management/appservice/FunctionAppsTests.java
index 67512f0b957f..8ece1e7fa2c5 100644
--- a/sdk/appservice/mgmt/src/test/java/com/azure/management/appservice/FunctionAppsTests.java
+++ b/sdk/appservice/mgmt/src/test/java/com/azure/management/appservice/FunctionAppsTests.java
@@ -10,9 +10,9 @@
import com.azure.management.resources.fluentcore.arm.Region;
import com.azure.management.resources.fluentcore.profile.AzureProfile;
import com.azure.management.resources.fluentcore.utils.SdkContext;
-import com.azure.management.storage.StorageAccount;
-import com.azure.management.storage.StorageAccountSkuType;
-import com.azure.management.storage.implementation.StorageManager;
+import com.azure.management.storage.models.StorageAccount;
+import com.azure.management.storage.models.StorageAccountSkuType;
+import com.azure.management.storage.StorageManager;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
diff --git a/sdk/authorization/mgmt-v2015_06_01/pom.xml b/sdk/authorization/mgmt-v2015_06_01/pom.xml
index 879abd6dde2c..ff8bba430b0f 100644
--- a/sdk/authorization/mgmt-v2015_06_01/pom.xml
+++ b/sdk/authorization/mgmt-v2015_06_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-authorization
1.0.0-beta
diff --git a/sdk/authorization/mgmt-v2015_07_01/pom.xml b/sdk/authorization/mgmt-v2015_07_01/pom.xml
index 2b7a87e1fdc8..12c5b0d4f3c0 100644
--- a/sdk/authorization/mgmt-v2015_07_01/pom.xml
+++ b/sdk/authorization/mgmt-v2015_07_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-authorization
1.0.0-beta-2
diff --git a/sdk/authorization/mgmt-v2018_07_01_preview/pom.xml b/sdk/authorization/mgmt-v2018_07_01_preview/pom.xml
index 13346f4f8255..467bb0d8a80e 100644
--- a/sdk/authorization/mgmt-v2018_07_01_preview/pom.xml
+++ b/sdk/authorization/mgmt-v2018_07_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-authorization
1.0.0-beta
diff --git a/sdk/authorization/mgmt-v2018_09_01_preview/pom.xml b/sdk/authorization/mgmt-v2018_09_01_preview/pom.xml
index c1cca2005825..38cf3b9fc447 100644
--- a/sdk/authorization/mgmt-v2018_09_01_preview/pom.xml
+++ b/sdk/authorization/mgmt-v2018_09_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-authorization
1.0.0-beta-1
diff --git a/sdk/authorization/mgmt/pom.xml b/sdk/authorization/mgmt/pom.xml
index df6217b39de5..201e8b8ba879 100644
--- a/sdk/authorization/mgmt/pom.xml
+++ b/sdk/authorization/mgmt/pom.xml
@@ -55,10 +55,6 @@
com.azure
azure-core-management
-
- com.azure
- azure-identity
-
com.azure
azure-mgmt-resources
diff --git a/sdk/automation/mgmt-v2015_10_31/pom.xml b/sdk/automation/mgmt-v2015_10_31/pom.xml
index 6203fcc5fca3..4635076774c9 100644
--- a/sdk/automation/mgmt-v2015_10_31/pom.xml
+++ b/sdk/automation/mgmt-v2015_10_31/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-automation
1.0.0-beta
diff --git a/sdk/automation/mgmt-v2018_06_30/pom.xml b/sdk/automation/mgmt-v2018_06_30/pom.xml
index b46ba3197e24..daba07302f24 100644
--- a/sdk/automation/mgmt-v2018_06_30/pom.xml
+++ b/sdk/automation/mgmt-v2018_06_30/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-automation
1.0.0-beta
diff --git a/sdk/azurestack/mgmt-v2017_06_01/pom.xml b/sdk/azurestack/mgmt-v2017_06_01/pom.xml
index 0ce5d90d68ad..1891ac79e861 100644
--- a/sdk/azurestack/mgmt-v2017_06_01/pom.xml
+++ b/sdk/azurestack/mgmt-v2017_06_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-azurestack
1.0.0-beta-1
diff --git a/sdk/batch/microsoft-azure-batch/pom.xml b/sdk/batch/microsoft-azure-batch/pom.xml
index 059295ff2dac..00381ecdff89 100644
--- a/sdk/batch/microsoft-azure-batch/pom.xml
+++ b/sdk/batch/microsoft-azure-batch/pom.xml
@@ -10,7 +10,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
com.microsoft.azure
diff --git a/sdk/batchai/mgmt-v2017_09_01_preview/pom.xml b/sdk/batchai/mgmt-v2017_09_01_preview/pom.xml
index edb3126d91c0..f636cf7d4a6d 100644
--- a/sdk/batchai/mgmt-v2017_09_01_preview/pom.xml
+++ b/sdk/batchai/mgmt-v2017_09_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-batchai
1.0.0-beta
diff --git a/sdk/batchai/mgmt-v2018_03_01/pom.xml b/sdk/batchai/mgmt-v2018_03_01/pom.xml
index a6efbb66c746..fa5bb2894a94 100644
--- a/sdk/batchai/mgmt-v2018_03_01/pom.xml
+++ b/sdk/batchai/mgmt-v2018_03_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-batchai
1.0.0-beta
diff --git a/sdk/batchai/mgmt-v2018_05_01/pom.xml b/sdk/batchai/mgmt-v2018_05_01/pom.xml
index 6c4698b1b806..94faeb931665 100644
--- a/sdk/batchai/mgmt-v2018_05_01/pom.xml
+++ b/sdk/batchai/mgmt-v2018_05_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-batchai
1.0.0-beta-2
diff --git a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml
index a336d5ebe501..0d92b7c1dfc6 100644
--- a/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml
+++ b/sdk/cognitiveservices/mgmt-v2016_02_01_preview/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-cognitiveservices
1.0.0-beta-SNAPSHOT
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/pom.xml b/sdk/cognitiveservices/mgmt-v2017_04_18/pom.xml
index bb2a939e32d8..a5c934cf0896 100644
--- a/sdk/cognitiveservices/mgmt-v2017_04_18/pom.xml
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/pom.xml
@@ -12,10 +12,10 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent/pom.xml
azure-mgmt-cognitiveservices
- 1.0.0-beta-3
+ 1.0.0-beta-4
jar
Microsoft Azure SDK for CognitiveServices Management
This package contains Microsoft CognitiveServices Management SDK.
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Accounts.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Accounts.java
index 26e659d0c6b7..b78f3396353a 100644
--- a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Accounts.java
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/Accounts.java
@@ -25,7 +25,7 @@ public interface Accounts extends SupportsCreating capabilities;
+
/**
* Optional subdomain name used for token-based authentication.
*/
@@ -60,6 +69,21 @@ public class CognitiveServicesAccountProperties {
@JsonProperty(value = "userOwnedStorage")
private List userOwnedStorage;
+ /**
+ * The private endpoint connection associated with the Cognitive Services
+ * account.
+ */
+ @JsonProperty(value = "privateEndpointConnections")
+ private List privateEndpointConnections;
+
+ /**
+ * Whether or not public endpoint access is allowed for this account. Value
+ * is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible
+ * values include: 'Enabled', 'Disabled'.
+ */
+ @JsonProperty(value = "publicNetworkAccess")
+ private PublicNetworkAccess publicNetworkAccess;
+
/**
* The api properties for special APIs.
*/
@@ -93,6 +117,15 @@ public String internalId() {
return this.internalId;
}
+ /**
+ * Get gets the capabilities of the cognitive services account. Each item indicates the capability of a specific feature. The values are read-only and for reference only.
+ *
+ * @return the capabilities value
+ */
+ public List capabilities() {
+ return this.capabilities;
+ }
+
/**
* Get optional subdomain name used for token-based authentication.
*
@@ -173,6 +206,46 @@ public CognitiveServicesAccountProperties withUserOwnedStorage(List privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * Set the private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param privateEndpointConnections the privateEndpointConnections value to set
+ * @return the CognitiveServicesAccountProperties object itself.
+ */
+ public CognitiveServicesAccountProperties withPrivateEndpointConnections(List privateEndpointConnections) {
+ this.privateEndpointConnections = privateEndpointConnections;
+ return this;
+ }
+
+ /**
+ * Get whether or not public endpoint access is allowed for this account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @return the publicNetworkAccess value
+ */
+ public PublicNetworkAccess publicNetworkAccess() {
+ return this.publicNetworkAccess;
+ }
+
+ /**
+ * Set whether or not public endpoint access is allowed for this account. Value is optional but if passed in, must be 'Enabled' or 'Disabled'. Possible values include: 'Enabled', 'Disabled'.
+ *
+ * @param publicNetworkAccess the publicNetworkAccess value to set
+ * @return the CognitiveServicesAccountProperties object itself.
+ */
+ public CognitiveServicesAccountProperties withPublicNetworkAccess(PublicNetworkAccess publicNetworkAccess) {
+ this.publicNetworkAccess = publicNetworkAccess;
+ return this;
+ }
+
/**
* Get the api properties for special APIs.
*
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpoint.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpoint.java
new file mode 100644
index 000000000000..adc1c7d687f9
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpoint.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * The Private Endpoint resource.
+ */
+public class PrivateEndpoint {
+ /**
+ * The ARM identifier for Private Endpoint.
+ */
+ @JsonProperty(value = "id", access = JsonProperty.Access.WRITE_ONLY)
+ private String id;
+
+ /**
+ * Get the ARM identifier for Private Endpoint.
+ *
+ * @return the id value
+ */
+ public String id() {
+ return this.id;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnection.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnection.java
new file mode 100644
index 000000000000..4a4bac007472
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnection.java
@@ -0,0 +1,118 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.PrivateEndpointConnectionInner;
+import com.microsoft.azure.arm.model.Indexable;
+import com.microsoft.azure.arm.model.Refreshable;
+import com.microsoft.azure.arm.model.Updatable;
+import com.microsoft.azure.arm.model.Appliable;
+import com.microsoft.azure.arm.model.Creatable;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.CognitiveServicesManager;
+import java.util.List;
+
+/**
+ * Type representing PrivateEndpointConnection.
+ */
+public interface PrivateEndpointConnection extends HasInner, Indexable, Refreshable, Updatable, HasManager {
+ /**
+ * @return the id value.
+ */
+ String id();
+
+ /**
+ * @return the name value.
+ */
+ String name();
+
+ /**
+ * @return the properties value.
+ */
+ PrivateEndpointConnectionProperties properties();
+
+ /**
+ * @return the type value.
+ */
+ String type();
+
+ /**
+ * The entirety of the PrivateEndpointConnection definition.
+ */
+ interface Definition extends DefinitionStages.Blank, DefinitionStages.WithAccount, DefinitionStages.WithProperties, DefinitionStages.WithCreate {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection definition stages.
+ */
+ interface DefinitionStages {
+ /**
+ * The first stage of a PrivateEndpointConnection definition.
+ */
+ interface Blank extends WithAccount {
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify Account.
+ */
+ interface WithAccount {
+ /**
+ * Specifies resourceGroupName, accountName.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive
+ * @param accountName The name of Cognitive Services account
+ * @return the next definition stage
+ */
+ WithProperties withExistingAccount(String resourceGroupName, String accountName);
+ }
+
+ /**
+ * The stage of the privateendpointconnection definition allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties Resource properties
+ * @return the next definition stage
+ */
+ WithCreate withProperties(PrivateEndpointConnectionProperties properties);
+ }
+
+ /**
+ * The stage of the definition which contains all the minimum required inputs for
+ * the resource to be created (via {@link WithCreate#create()}), but also allows
+ * for any other optional settings to be specified.
+ */
+ interface WithCreate extends Creatable {
+ }
+ }
+ /**
+ * The template for a PrivateEndpointConnection update operation, containing all the settings that can be modified.
+ */
+ interface Update extends Appliable, UpdateStages.WithProperties {
+ }
+
+ /**
+ * Grouping of PrivateEndpointConnection update stages.
+ */
+ interface UpdateStages {
+ /**
+ * The stage of the privateendpointconnection update allowing to specify Properties.
+ */
+ interface WithProperties {
+ /**
+ * Specifies properties.
+ * @param properties Resource properties
+ * @return the next update stage
+ */
+ Update withProperties(PrivateEndpointConnectionProperties properties);
+ }
+
+ }
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnectionProperties.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnectionProperties.java
new file mode 100644
index 000000000000..2e1287693feb
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnectionProperties.java
@@ -0,0 +1,97 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of the PrivateEndpointConnectProperties.
+ */
+public class PrivateEndpointConnectionProperties {
+ /**
+ * The resource of private end point.
+ */
+ @JsonProperty(value = "privateEndpoint")
+ private PrivateEndpoint privateEndpoint;
+
+ /**
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+ @JsonProperty(value = "privateLinkServiceConnectionState", required = true)
+ private PrivateLinkServiceConnectionState privateLinkServiceConnectionState;
+
+ /**
+ * The private link resource group ids.
+ */
+ @JsonProperty(value = "groupIds")
+ private List groupIds;
+
+ /**
+ * Get the resource of private end point.
+ *
+ * @return the privateEndpoint value
+ */
+ public PrivateEndpoint privateEndpoint() {
+ return this.privateEndpoint;
+ }
+
+ /**
+ * Set the resource of private end point.
+ *
+ * @param privateEndpoint the privateEndpoint value to set
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateEndpoint(PrivateEndpoint privateEndpoint) {
+ this.privateEndpoint = privateEndpoint;
+ return this;
+ }
+
+ /**
+ * Get a collection of information about the state of the connection between service consumer and provider.
+ *
+ * @return the privateLinkServiceConnectionState value
+ */
+ public PrivateLinkServiceConnectionState privateLinkServiceConnectionState() {
+ return this.privateLinkServiceConnectionState;
+ }
+
+ /**
+ * Set a collection of information about the state of the connection between service consumer and provider.
+ *
+ * @param privateLinkServiceConnectionState the privateLinkServiceConnectionState value to set
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) {
+ this.privateLinkServiceConnectionState = privateLinkServiceConnectionState;
+ return this;
+ }
+
+ /**
+ * Get the private link resource group ids.
+ *
+ * @return the groupIds value
+ */
+ public List groupIds() {
+ return this.groupIds;
+ }
+
+ /**
+ * Set the private link resource group ids.
+ *
+ * @param groupIds the groupIds value to set
+ * @return the PrivateEndpointConnectionProperties object itself.
+ */
+ public PrivateEndpointConnectionProperties withGroupIds(List groupIds) {
+ this.groupIds = groupIds;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnections.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnections.java
new file mode 100644
index 000000000000..ed3ea424e1fb
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointConnections.java
@@ -0,0 +1,43 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.microsoft.azure.arm.collection.SupportsCreating;
+import rx.Completable;
+import rx.Observable;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.PrivateEndpointConnectionsInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateEndpointConnections.
+ */
+public interface PrivateEndpointConnections extends SupportsCreating, HasInner {
+ /**
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName);
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Completable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName);
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointServiceConnectionStatus.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointServiceConnectionStatus.java
new file mode 100644
index 000000000000..c5797d2ee4c5
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateEndpointServiceConnectionStatus.java
@@ -0,0 +1,47 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PrivateEndpointServiceConnectionStatus.
+ */
+public final class PrivateEndpointServiceConnectionStatus extends ExpandableStringEnum {
+ /** Static value Pending for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus PENDING = fromString("Pending");
+
+ /** Static value Approved for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus APPROVED = fromString("Approved");
+
+ /** Static value Rejected for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus REJECTED = fromString("Rejected");
+
+ /** Static value Disconnected for PrivateEndpointServiceConnectionStatus. */
+ public static final PrivateEndpointServiceConnectionStatus DISCONNECTED = fromString("Disconnected");
+
+ /**
+ * Creates or finds a PrivateEndpointServiceConnectionStatus from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PrivateEndpointServiceConnectionStatus
+ */
+ @JsonCreator
+ public static PrivateEndpointServiceConnectionStatus fromString(String name) {
+ return fromString(name, PrivateEndpointServiceConnectionStatus.class);
+ }
+
+ /**
+ * @return known PrivateEndpointServiceConnectionStatus values
+ */
+ public static Collection values() {
+ return values(PrivateEndpointServiceConnectionStatus.class);
+ }
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceListResult.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceListResult.java
new file mode 100644
index 000000000000..f65304232aca
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceListResult.java
@@ -0,0 +1,27 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.microsoft.azure.arm.model.HasInner;
+import com.microsoft.azure.arm.resources.models.HasManager;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.CognitiveServicesManager;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.PrivateLinkResourceListResultInner;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.PrivateLinkResourceInner;
+import java.util.List;
+
+/**
+ * Type representing PrivateLinkResourceListResult.
+ */
+public interface PrivateLinkResourceListResult extends HasInner, HasManager {
+ /**
+ * @return the value value.
+ */
+ List value();
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceProperties.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceProperties.java
new file mode 100644
index 000000000000..6a68768a9d6d
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResourceProperties.java
@@ -0,0 +1,89 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Properties of a private link resource.
+ */
+public class PrivateLinkResourceProperties {
+ /**
+ * The private link resource group id.
+ */
+ @JsonProperty(value = "groupId", access = JsonProperty.Access.WRITE_ONLY)
+ private String groupId;
+
+ /**
+ * The private link resource display name.
+ */
+ @JsonProperty(value = "displayName", access = JsonProperty.Access.WRITE_ONLY)
+ private String displayName;
+
+ /**
+ * The private link resource required member names.
+ */
+ @JsonProperty(value = "requiredMembers", access = JsonProperty.Access.WRITE_ONLY)
+ private List requiredMembers;
+
+ /**
+ * The private link resource Private link DNS zone name.
+ */
+ @JsonProperty(value = "requiredZoneNames")
+ private List requiredZoneNames;
+
+ /**
+ * Get the private link resource group id.
+ *
+ * @return the groupId value
+ */
+ public String groupId() {
+ return this.groupId;
+ }
+
+ /**
+ * Get the private link resource display name.
+ *
+ * @return the displayName value
+ */
+ public String displayName() {
+ return this.displayName;
+ }
+
+ /**
+ * Get the private link resource required member names.
+ *
+ * @return the requiredMembers value
+ */
+ public List requiredMembers() {
+ return this.requiredMembers;
+ }
+
+ /**
+ * Get the private link resource Private link DNS zone name.
+ *
+ * @return the requiredZoneNames value
+ */
+ public List requiredZoneNames() {
+ return this.requiredZoneNames;
+ }
+
+ /**
+ * Set the private link resource Private link DNS zone name.
+ *
+ * @param requiredZoneNames the requiredZoneNames value to set
+ * @return the PrivateLinkResourceProperties object itself.
+ */
+ public PrivateLinkResourceProperties withRequiredZoneNames(List requiredZoneNames) {
+ this.requiredZoneNames = requiredZoneNames;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResources.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResources.java
new file mode 100644
index 000000000000..5f20c12bc0e4
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkResources.java
@@ -0,0 +1,29 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import rx.Observable;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation.PrivateLinkResourcesInner;
+import com.microsoft.azure.arm.model.HasInner;
+
+/**
+ * Type representing PrivateLinkResources.
+ */
+public interface PrivateLinkResources extends HasInner {
+ /**
+ * Gets the private link resources that need to be created for a Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable for the request
+ */
+ Observable listAsync(String resourceGroupName, String accountName);
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkServiceConnectionState.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkServiceConnectionState.java
new file mode 100644
index 000000000000..a8dfe3ee1ad2
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PrivateLinkServiceConnectionState.java
@@ -0,0 +1,99 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A collection of information about the state of the connection between
+ * service consumer and provider.
+ */
+public class PrivateLinkServiceConnectionState {
+ /**
+ * Indicates whether the connection has been Approved/Rejected/Removed by
+ * the owner of the service. Possible values include: 'Pending',
+ * 'Approved', 'Rejected', 'Disconnected'.
+ */
+ @JsonProperty(value = "status")
+ private PrivateEndpointServiceConnectionStatus status;
+
+ /**
+ * The reason for approval/rejection of the connection.
+ */
+ @JsonProperty(value = "description")
+ private String description;
+
+ /**
+ * A message indicating if changes on the service provider require any
+ * updates on the consumer.
+ */
+ @JsonProperty(value = "actionRequired")
+ private String actionRequired;
+
+ /**
+ * Get indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @return the status value
+ */
+ public PrivateEndpointServiceConnectionStatus status() {
+ return this.status;
+ }
+
+ /**
+ * Set indicates whether the connection has been Approved/Rejected/Removed by the owner of the service. Possible values include: 'Pending', 'Approved', 'Rejected', 'Disconnected'.
+ *
+ * @param status the status value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withStatus(PrivateEndpointServiceConnectionStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get the reason for approval/rejection of the connection.
+ *
+ * @return the description value
+ */
+ public String description() {
+ return this.description;
+ }
+
+ /**
+ * Set the reason for approval/rejection of the connection.
+ *
+ * @param description the description value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withDescription(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * Get a message indicating if changes on the service provider require any updates on the consumer.
+ *
+ * @return the actionRequired value
+ */
+ public String actionRequired() {
+ return this.actionRequired;
+ }
+
+ /**
+ * Set a message indicating if changes on the service provider require any updates on the consumer.
+ *
+ * @param actionRequired the actionRequired value to set
+ * @return the PrivateLinkServiceConnectionState object itself.
+ */
+ public PrivateLinkServiceConnectionState withActionRequired(String actionRequired) {
+ this.actionRequired = actionRequired;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PublicNetworkAccess.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PublicNetworkAccess.java
new file mode 100644
index 000000000000..5bc13caa2851
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/PublicNetworkAccess.java
@@ -0,0 +1,41 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for PublicNetworkAccess.
+ */
+public final class PublicNetworkAccess extends ExpandableStringEnum {
+ /** Static value Enabled for PublicNetworkAccess. */
+ public static final PublicNetworkAccess ENABLED = fromString("Enabled");
+
+ /** Static value Disabled for PublicNetworkAccess. */
+ public static final PublicNetworkAccess DISABLED = fromString("Disabled");
+
+ /**
+ * Creates or finds a PublicNetworkAccess from its string representation.
+ * @param name a name to look for
+ * @return the corresponding PublicNetworkAccess
+ */
+ @JsonCreator
+ public static PublicNetworkAccess fromString(String name) {
+ return fromString(name, PublicNetworkAccess.class);
+ }
+
+ /**
+ * @return known PublicNetworkAccess values
+ */
+ public static Collection values() {
+ return values(PublicNetworkAccess.class);
+ }
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/SkuCapability.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/SkuCapability.java
new file mode 100644
index 000000000000..4c950424eb4f
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/SkuCapability.java
@@ -0,0 +1,69 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * SkuCapability indicates the capability of a certain feature.
+ */
+public class SkuCapability {
+ /**
+ * The name of the SkuCapability.
+ */
+ @JsonProperty(value = "name")
+ private String name;
+
+ /**
+ * The value of the SkuCapability.
+ */
+ @JsonProperty(value = "value")
+ private String value;
+
+ /**
+ * Get the name of the SkuCapability.
+ *
+ * @return the name value
+ */
+ public String name() {
+ return this.name;
+ }
+
+ /**
+ * Set the name of the SkuCapability.
+ *
+ * @param name the name value to set
+ * @return the SkuCapability object itself.
+ */
+ public SkuCapability withName(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Get the value of the SkuCapability.
+ *
+ * @return the value value
+ */
+ public String value() {
+ return this.value;
+ }
+
+ /**
+ * Set the value of the SkuCapability.
+ *
+ * @param value the value value to set
+ * @return the SkuCapability object itself.
+ */
+ public SkuCapability withValue(String value) {
+ this.value = value;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java
index 445794e8569a..e22e3e1b8e8e 100644
--- a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/AccountsInner.java
@@ -121,7 +121,7 @@ interface AccountsService {
/**
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param account The parameters to provide for the created account.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -136,7 +136,7 @@ public CognitiveServicesAccountInner create(String resourceGroupName, String acc
/**
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param account The parameters to provide for the created account.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
@@ -150,7 +150,7 @@ public ServiceFuture createAsync(String resourceG
/**
* Create Cognitive Services Account. Accounts is a resource group wide resource type. It holds the keys for developer to access intelligent APIs. It's also the resource type for billing.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param account The parameters to provide for the created account.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -168,7 +168,7 @@ public CognitiveServicesAccountInner call(ServiceResponse createDelegate(Response updateAsync(String resourceG
/**
* Updates a Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param account The parameters to provide for the created account.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -264,7 +264,7 @@ public CognitiveServicesAccountInner call(ServiceResponse updateDelegate(Response deleteAsync(String resourceGroupName, String accountN
/**
* Deletes a Cognitive Services account from the resource group.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
@@ -355,7 +355,7 @@ public Void call(ServiceResponse response) {
/**
* Deletes a Cognitive Services account from the resource group.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponse} object if successful.
@@ -399,7 +399,7 @@ private ServiceResponse deleteDelegate(Response response) th
/**
* Returns a Cognitive Services account specified by the parameters.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
@@ -413,7 +413,7 @@ public CognitiveServicesAccountInner getByResourceGroup(String resourceGroupName
/**
* Returns a Cognitive Services account specified by the parameters.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -426,7 +426,7 @@ public ServiceFuture getByResourceGroupAsync(Stri
/**
* Returns a Cognitive Services account specified by the parameters.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CognitiveServicesAccountInner object
@@ -443,7 +443,7 @@ public CognitiveServicesAccountInner call(ServiceResponse getByResourceGroupDelegat
/**
* Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
@@ -504,7 +504,7 @@ public Page nextPage(String nextPageLink) {
/**
* Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
@@ -524,7 +524,7 @@ public Observable>> call(Str
/**
* Returns all the resources of a particular type belonging to a resource group.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the PagedList<CognitiveServicesAccountInner> object
*/
@@ -541,7 +541,7 @@ public Page call(ServiceResponse>> call(Ser
/**
* Returns all the resources of a particular type belonging to a resource group.
*
- ServiceResponse> * @param resourceGroupName The name of the resource group within the user's subscription.
+ ServiceResponse> * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the PagedList<CognitiveServicesAccountInner> object wrapped in {@link ServiceResponse} if successful.
*/
@@ -707,7 +707,7 @@ private ServiceResponse> listDelegate(Re
/**
* Lists the account keys for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
@@ -721,7 +721,7 @@ public CognitiveServicesAccountKeysInner listKeys(String resourceGroupName, Stri
/**
* Lists the account keys for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -734,7 +734,7 @@ public ServiceFuture listKeysAsync(String res
/**
* Lists the account keys for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CognitiveServicesAccountKeysInner object
@@ -751,7 +751,7 @@ public CognitiveServicesAccountKeysInner call(ServiceResponse listKeysDelegate(Resp
/**
* Regenerates the specified account key for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -808,7 +808,7 @@ public CognitiveServicesAccountKeysInner regenerateKey(String resourceGroupName,
/**
* Regenerates the specified account key for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
@@ -822,7 +822,7 @@ public ServiceFuture regenerateKeyAsync(Strin
/**
* Regenerates the specified account key for the specified Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param keyName key name to generate (Key1|Key2). Possible values include: 'Key1', 'Key2'
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -840,7 +840,7 @@ public CognitiveServicesAccountKeysInner call(ServiceResponse regenerateKeyDelegate
/**
* List available SKUs for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
@@ -902,7 +902,7 @@ public CognitiveServicesAccountEnumerateSkusResultInner listSkus(String resource
/**
* List available SKUs for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -915,7 +915,7 @@ public ServiceFuture listSkusA
/**
* List available SKUs for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the CognitiveServicesAccountEnumerateSkusResultInner object
@@ -932,7 +932,7 @@ public CognitiveServicesAccountEnumerateSkusResultInner call(ServiceResponse listSk
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ErrorException thrown if the request is rejected by server
@@ -988,7 +988,7 @@ public UsagesResultInner getUsages(String resourceGroupName, String accountName)
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -1001,7 +1001,7 @@ public ServiceFuture getUsagesAsync(String resourceGroupName,
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the UsagesResultInner object
@@ -1018,7 +1018,7 @@ public UsagesResultInner call(ServiceResponse response) {
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the UsagesResultInner object
@@ -1054,7 +1054,7 @@ public Observable> call(Response getUsagesAsync(String resourceGroupName,
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).
* @throws IllegalArgumentException thrown if parameters fail the validation
@@ -1101,7 +1101,7 @@ public UsagesResultInner call(ServiceResponse response) {
/**
* Get usages for the requested Cognitive Services account.
*
- * @param resourceGroupName The name of the resource group within the user's subscription.
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName The name of Cognitive Services account.
* @param filter An OData filter expression that describes a subset of usages to return. The supported parameter is name.value (name of the metric, can have an or of multiple names).
* @throws IllegalArgumentException thrown if parameters fail the validation
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java
index 5da4953e335c..fe0d86ed21bf 100644
--- a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManagementClientImpl.java
@@ -50,11 +50,11 @@ public AzureClient getAzureClient() {
return this.azureClient;
}
- /** Azure Subscription ID. */
+ /** The ID of the target subscription. */
private String subscriptionId;
/**
- * Gets Azure Subscription ID.
+ * Gets The ID of the target subscription.
*
* @return the subscriptionId value.
*/
@@ -63,7 +63,7 @@ public String subscriptionId() {
}
/**
- * Sets Azure Subscription ID.
+ * Sets The ID of the target subscription.
*
* @param subscriptionId the subscriptionId value.
* @return the service client itself
@@ -73,11 +73,11 @@ public CognitiveServicesManagementClientImpl withSubscriptionId(String subscript
return this;
}
- /** Version of the API to be used with the client request. Current version is 2017-04-18. */
+ /** The API version to use for this operation. */
private String apiVersion;
/**
- * Gets Version of the API to be used with the client request. Current version is 2017-04-18.
+ * Gets The API version to use for this operation.
*
* @return the apiVersion value.
*/
@@ -193,6 +193,32 @@ public OperationsInner operations() {
return this.operations;
}
+ /**
+ * The PrivateEndpointConnectionsInner object to access its operations.
+ */
+ private PrivateEndpointConnectionsInner privateEndpointConnections;
+
+ /**
+ * Gets the PrivateEndpointConnectionsInner object to access its operations.
+ * @return the PrivateEndpointConnectionsInner object.
+ */
+ public PrivateEndpointConnectionsInner privateEndpointConnections() {
+ return this.privateEndpointConnections;
+ }
+
+ /**
+ * The PrivateLinkResourcesInner object to access its operations.
+ */
+ private PrivateLinkResourcesInner privateLinkResources;
+
+ /**
+ * Gets the PrivateLinkResourcesInner object to access its operations.
+ * @return the PrivateLinkResourcesInner object.
+ */
+ public PrivateLinkResourcesInner privateLinkResources() {
+ return this.privateLinkResources;
+ }
+
/**
* Initializes an instance of CognitiveServicesManagementClient client.
*
@@ -231,6 +257,8 @@ protected void initialize() {
this.accounts = new AccountsInner(restClient().retrofit(), this);
this.resourceSkus = new ResourceSkusInner(restClient().retrofit(), this);
this.operations = new OperationsInner(restClient().retrofit(), this);
+ this.privateEndpointConnections = new PrivateEndpointConnectionsInner(restClient().retrofit(), this);
+ this.privateLinkResources = new PrivateLinkResourcesInner(restClient().retrofit(), this);
this.azureClient = new AzureClient(this);
initializeService();
}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManager.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManager.java
index ae833c978ac3..efffb0db817a 100644
--- a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManager.java
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/CognitiveServicesManager.java
@@ -19,6 +19,8 @@
import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Accounts;
import com.microsoft.azure.management.cognitiveservices.v2017_04_18.ResourceSkus;
import com.microsoft.azure.management.cognitiveservices.v2017_04_18.Operations;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnections;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResources;
import com.microsoft.azure.arm.resources.implementation.AzureConfigurableCoreImpl;
import com.microsoft.azure.arm.resources.implementation.ManagerCore;
@@ -29,6 +31,8 @@ public final class CognitiveServicesManager extends ManagerCore implements PrivateEndpointConnection, PrivateEndpointConnection.Definition, PrivateEndpointConnection.Update {
+ private final CognitiveServicesManager manager;
+ private String resourceGroupName;
+ private String accountName;
+ private String privateEndpointConnectionName;
+ private PrivateEndpointConnectionProperties cproperties;
+ private PrivateEndpointConnectionProperties uproperties;
+
+ PrivateEndpointConnectionImpl(String name, CognitiveServicesManager manager) {
+ super(name, new PrivateEndpointConnectionInner());
+ this.manager = manager;
+ // Set resource name
+ this.privateEndpointConnectionName = name;
+ //
+ this.cproperties = new PrivateEndpointConnectionProperties();
+ this.uproperties = new PrivateEndpointConnectionProperties();
+ }
+
+ PrivateEndpointConnectionImpl(PrivateEndpointConnectionInner inner, CognitiveServicesManager manager) {
+ super(inner.name(), inner);
+ this.manager = manager;
+ // Set resource name
+ this.privateEndpointConnectionName = inner.name();
+ // set resource ancestor and positional variables
+ this.resourceGroupName = IdParsingUtils.getValueFromIdByName(inner.id(), "resourceGroups");
+ this.accountName = IdParsingUtils.getValueFromIdByName(inner.id(), "accounts");
+ this.privateEndpointConnectionName = IdParsingUtils.getValueFromIdByName(inner.id(), "privateEndpointConnections");
+ //
+ this.cproperties = new PrivateEndpointConnectionProperties();
+ this.uproperties = new PrivateEndpointConnectionProperties();
+ }
+
+ @Override
+ public CognitiveServicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable createResourceAsync() {
+ PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName, this.cproperties)
+ .map(new Func1() {
+ @Override
+ public PrivateEndpointConnectionInner call(PrivateEndpointConnectionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ public Observable updateResourceAsync() {
+ PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections();
+ return client.createOrUpdateAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName, this.uproperties)
+ .map(new Func1() {
+ @Override
+ public PrivateEndpointConnectionInner call(PrivateEndpointConnectionInner resource) {
+ resetCreateUpdateParameters();
+ return resource;
+ }
+ })
+ .map(innerToFluentMap(this));
+ }
+
+ @Override
+ protected Observable getInnerAsync() {
+ PrivateEndpointConnectionsInner client = this.manager().inner().privateEndpointConnections();
+ return client.getAsync(this.resourceGroupName, this.accountName, this.privateEndpointConnectionName);
+ }
+
+ @Override
+ public boolean isInCreateMode() {
+ return this.inner().id() == null;
+ }
+
+ private void resetCreateUpdateParameters() {
+ this.cproperties = new PrivateEndpointConnectionProperties();
+ this.uproperties = new PrivateEndpointConnectionProperties();
+ }
+
+ @Override
+ public String id() {
+ return this.inner().id();
+ }
+
+ @Override
+ public String name() {
+ return this.inner().name();
+ }
+
+ @Override
+ public PrivateEndpointConnectionProperties properties() {
+ return this.inner().properties();
+ }
+
+ @Override
+ public String type() {
+ return this.inner().type();
+ }
+
+ @Override
+ public PrivateEndpointConnectionImpl withExistingAccount(String resourceGroupName, String accountName) {
+ this.resourceGroupName = resourceGroupName;
+ this.accountName = accountName;
+ return this;
+ }
+
+ @Override
+ public PrivateEndpointConnectionImpl withProperties(PrivateEndpointConnectionProperties properties) {
+ if (isInCreateMode()) {
+ this.cproperties = properties;
+ } else {
+ this.uproperties = properties;
+ }
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionInner.java
new file mode 100644
index 000000000000..3f42b93709e0
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionInner.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnectionProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * The Private Endpoint Connection resource.
+ */
+public class PrivateEndpointConnectionInner extends ProxyResource {
+ /**
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateEndpointConnectionProperties properties;
+
+ /**
+ * Get resource properties.
+ *
+ * @return the properties value
+ */
+ public PrivateEndpointConnectionProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set resource properties.
+ *
+ * @param properties the properties value to set
+ * @return the PrivateEndpointConnectionInner object itself.
+ */
+ public PrivateEndpointConnectionInner withProperties(PrivateEndpointConnectionProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsImpl.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsImpl.java
new file mode 100644
index 000000000000..f904a6855252
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsImpl.java
@@ -0,0 +1,66 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ *
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnections;
+import rx.Completable;
+import rx.Observable;
+import rx.functions.Func1;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnection;
+
+class PrivateEndpointConnectionsImpl extends WrapperImpl implements PrivateEndpointConnections {
+ private final CognitiveServicesManager manager;
+
+ PrivateEndpointConnectionsImpl(CognitiveServicesManager manager) {
+ super(manager.inner().privateEndpointConnections());
+ this.manager = manager;
+ }
+
+ public CognitiveServicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public PrivateEndpointConnectionImpl define(String name) {
+ return wrapModel(name);
+ }
+
+ private PrivateEndpointConnectionImpl wrapModel(PrivateEndpointConnectionInner inner) {
+ return new PrivateEndpointConnectionImpl(inner, manager());
+ }
+
+ private PrivateEndpointConnectionImpl wrapModel(String name) {
+ return new PrivateEndpointConnectionImpl(name, this.manager());
+ }
+
+ @Override
+ public Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionsInner client = this.inner();
+ return client.getAsync(resourceGroupName, accountName, privateEndpointConnectionName)
+ .flatMap(new Func1>() {
+ @Override
+ public Observable call(PrivateEndpointConnectionInner inner) {
+ if (inner == null) {
+ return Observable.empty();
+ } else {
+ return Observable.just((PrivateEndpointConnection)wrapModel(inner));
+ }
+ }
+ });
+ }
+
+ @Override
+ public Completable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ PrivateEndpointConnectionsInner client = this.inner();
+ return client.deleteAsync(resourceGroupName, accountName, privateEndpointConnectionName).toCompletable();
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsInner.java
new file mode 100644
index 000000000000..c1183e1aa2cf
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateEndpointConnectionsInner.java
@@ -0,0 +1,448 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnectionProperties;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import com.microsoft.rest.Validator;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.HTTP;
+import retrofit2.http.Path;
+import retrofit2.http.PUT;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in PrivateEndpointConnections.
+ */
+public class PrivateEndpointConnectionsInner {
+ /** The Retrofit service to perform REST calls. */
+ private PrivateEndpointConnectionsService service;
+ /** The service client containing this operation class. */
+ private CognitiveServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateEndpointConnectionsInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public PrivateEndpointConnectionsInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) {
+ this.service = retrofit.create(PrivateEndpointConnectionsService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PrivateEndpointConnections to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface PrivateEndpointConnectionsService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnections get" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ Observable> get(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnections createOrUpdate" })
+ @PUT("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}")
+ Observable> createOrUpdate(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Body PrivateEndpointConnectionInner properties, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateEndpointConnections delete" })
+ @HTTP(path = "subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateEndpointConnections/{privateEndpointConnectionName}", method = "DELETE", hasBody = true)
+ Observable> delete(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Path("privateEndpointConnectionName") String privateEndpointConnectionName, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner get(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable getAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ return getWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable> getWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.get(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ final PrivateEndpointConnectionProperties properties = null;
+ PrivateEndpointConnectionInner properties1 = new PrivateEndpointConnectionInner();
+ properties1.withProperties(null);
+ return service.createOrUpdate(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), properties1, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param properties Resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PrivateEndpointConnectionInner object if successful.
+ */
+ public PrivateEndpointConnectionInner createOrUpdate(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties).toBlocking().single().body();
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param properties Resource properties.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture createOrUpdateAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties), serviceCallback);
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param properties Resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable createOrUpdateAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ return createOrUpdateWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName, properties).map(new Func1, PrivateEndpointConnectionInner>() {
+ @Override
+ public PrivateEndpointConnectionInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Update the state of specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param properties Resource properties.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateEndpointConnectionInner object
+ */
+ public Observable> createOrUpdateWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, PrivateEndpointConnectionProperties properties) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ Validator.validate(properties);
+ PrivateEndpointConnectionInner properties1 = new PrivateEndpointConnectionInner();
+ properties1.withProperties(properties);
+ return service.createOrUpdate(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), properties1, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = createOrUpdateDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse createOrUpdateDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void delete(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).toBlocking().single().body();
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName), serviceCallback);
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable deleteAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ return deleteWithServiceResponseAsync(resourceGroupName, accountName, privateEndpointConnectionName).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Deletes the specified private endpoint connection associated with the Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param privateEndpointConnectionName The name of the private endpoint connection associated with the Cognitive Services Account
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponse} object if successful.
+ */
+ public Observable> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String privateEndpointConnectionName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (privateEndpointConnectionName == null) {
+ throw new IllegalArgumentException("Parameter privateEndpointConnectionName is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.delete(resourceGroupName, accountName, this.client.subscriptionId(), privateEndpointConnectionName, this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = deleteDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse deleteDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .register(204, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceInner.java
new file mode 100644
index 000000000000..f86deee4ad14
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceInner.java
@@ -0,0 +1,45 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResourceProperties;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.microsoft.azure.ProxyResource;
+
+/**
+ * A private link resource.
+ */
+public class PrivateLinkResourceInner extends ProxyResource {
+ /**
+ * Resource properties.
+ */
+ @JsonProperty(value = "properties")
+ private PrivateLinkResourceProperties properties;
+
+ /**
+ * Get resource properties.
+ *
+ * @return the properties value
+ */
+ public PrivateLinkResourceProperties properties() {
+ return this.properties;
+ }
+
+ /**
+ * Set resource properties.
+ *
+ * @param properties the properties value to set
+ * @return the PrivateLinkResourceInner object itself.
+ */
+ public PrivateLinkResourceInner withProperties(PrivateLinkResourceProperties properties) {
+ this.properties = properties;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultImpl.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultImpl.java
new file mode 100644
index 000000000000..5477b8202eb2
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultImpl.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResourceListResult;
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import java.util.List;
+
+class PrivateLinkResourceListResultImpl extends WrapperImpl implements PrivateLinkResourceListResult {
+ private final CognitiveServicesManager manager;
+ PrivateLinkResourceListResultImpl(PrivateLinkResourceListResultInner inner, CognitiveServicesManager manager) {
+ super(inner);
+ this.manager = manager;
+ }
+
+ @Override
+ public CognitiveServicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public List value() {
+ return this.inner().value();
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultInner.java
new file mode 100644
index 000000000000..37a08b24031c
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourceListResultInner.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * A list of private link resources.
+ */
+public class PrivateLinkResourceListResultInner {
+ /**
+ * Array of private link resources.
+ */
+ @JsonProperty(value = "value")
+ private List value;
+
+ /**
+ * Get array of private link resources.
+ *
+ * @return the value value
+ */
+ public List value() {
+ return this.value;
+ }
+
+ /**
+ * Set array of private link resources.
+ *
+ * @param value the value value to set
+ * @return the PrivateLinkResourceListResultInner object itself.
+ */
+ public PrivateLinkResourceListResultInner withValue(List value) {
+ this.value = value;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesImpl.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesImpl.java
new file mode 100644
index 000000000000..281e0ccd4893
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesImpl.java
@@ -0,0 +1,42 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ * abc
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import com.microsoft.azure.arm.model.implementation.WrapperImpl;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResources;
+import rx.functions.Func1;
+import rx.Observable;
+import com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResourceListResult;
+
+class PrivateLinkResourcesImpl extends WrapperImpl implements PrivateLinkResources {
+ private final CognitiveServicesManager manager;
+
+ PrivateLinkResourcesImpl(CognitiveServicesManager manager) {
+ super(manager.inner().privateLinkResources());
+ this.manager = manager;
+ }
+
+ public CognitiveServicesManager manager() {
+ return this.manager;
+ }
+
+ @Override
+ public Observable listAsync(String resourceGroupName, String accountName) {
+ PrivateLinkResourcesInner client = this.inner();
+ return client.listAsync(resourceGroupName, accountName)
+ .map(new Func1() {
+ @Override
+ public PrivateLinkResourceListResult call(PrivateLinkResourceListResultInner inner) {
+ return new PrivateLinkResourceListResultImpl(inner, manager());
+ }
+ });
+ }
+
+}
diff --git a/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesInner.java b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesInner.java
new file mode 100644
index 000000000000..0c4c954e74c1
--- /dev/null
+++ b/sdk/cognitiveservices/mgmt-v2017_04_18/src/main/java/com/microsoft/azure/management/cognitiveservices/v2017_04_18/implementation/PrivateLinkResourcesInner.java
@@ -0,0 +1,146 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.management.cognitiveservices.v2017_04_18.implementation;
+
+import retrofit2.Retrofit;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.IOException;
+import okhttp3.ResponseBody;
+import retrofit2.http.GET;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.Path;
+import retrofit2.http.Query;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
+
+/**
+ * An instance of this class provides access to all the operations defined
+ * in PrivateLinkResources.
+ */
+public class PrivateLinkResourcesInner {
+ /** The Retrofit service to perform REST calls. */
+ private PrivateLinkResourcesService service;
+ /** The service client containing this operation class. */
+ private CognitiveServicesManagementClientImpl client;
+
+ /**
+ * Initializes an instance of PrivateLinkResourcesInner.
+ *
+ * @param retrofit the Retrofit instance built from a Retrofit Builder.
+ * @param client the instance of the service client containing this operation class.
+ */
+ public PrivateLinkResourcesInner(Retrofit retrofit, CognitiveServicesManagementClientImpl client) {
+ this.service = retrofit.create(PrivateLinkResourcesService.class);
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for PrivateLinkResources to be
+ * used by Retrofit to perform actually REST calls.
+ */
+ interface PrivateLinkResourcesService {
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.management.cognitiveservices.v2017_04_18.PrivateLinkResources list" })
+ @GET("subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{accountName}/privateLinkResources")
+ Observable> list(@Path("resourceGroupName") String resourceGroupName, @Path("accountName") String accountName, @Path("subscriptionId") String subscriptionId, @Query("api-version") String apiVersion, @Header("accept-language") String acceptLanguage, @Header("User-Agent") String userAgent);
+
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws CloudException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the PrivateLinkResourceListResultInner object if successful.
+ */
+ public PrivateLinkResourceListResultInner list(String resourceGroupName, String accountName) {
+ return listWithServiceResponseAsync(resourceGroupName, accountName).toBlocking().single().body();
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture listAsync(String resourceGroupName, String accountName, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(listWithServiceResponseAsync(resourceGroupName, accountName), serviceCallback);
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateLinkResourceListResultInner object
+ */
+ public Observable listAsync(String resourceGroupName, String accountName) {
+ return listWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1, PrivateLinkResourceListResultInner>() {
+ @Override
+ public PrivateLinkResourceListResultInner call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Gets the private link resources that need to be created for a Cognitive Services account.
+ *
+ * @param resourceGroupName The name of the resource group. The name is case insensitive.
+ * @param accountName The name of Cognitive Services account.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the PrivateLinkResourceListResultInner object
+ */
+ public Observable> listWithServiceResponseAsync(String resourceGroupName, String accountName) {
+ if (resourceGroupName == null) {
+ throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null.");
+ }
+ if (accountName == null) {
+ throw new IllegalArgumentException("Parameter accountName is required and cannot be null.");
+ }
+ if (this.client.subscriptionId() == null) {
+ throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot be null.");
+ }
+ if (this.client.apiVersion() == null) {
+ throw new IllegalArgumentException("Parameter this.client.apiVersion() is required and cannot be null.");
+ }
+ return service.list(resourceGroupName, accountName, this.client.subscriptionId(), this.client.apiVersion(), this.client.acceptLanguage(), this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = listDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse listDelegate(Response response) throws CloudException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(CloudException.class)
+ .build(response);
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml b/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
index 80e1171980ab..146f38711f8f 100644
--- a/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-autosuggest
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml b/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
index 0e1924609b71..b2fd1f40b026 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
@@ -11,11 +11,11 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-computervision
com.microsoft.azure.cognitiveservices
- 1.0.3-beta
+ 1.0.4-beta
jar
Microsoft Azure SDK for Cognitive Service Computer Vision
This package contains Microsoft Cognitive Service Computer Vision SDK.
@@ -92,4 +92,4 @@
-
\ No newline at end of file
+
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
index cb7f1679827d..22dfd80cde78 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVision.java
@@ -8,204 +8,142 @@
package com.microsoft.azure.cognitiveservices.vision.computervision;
-import com.microsoft.azure.CloudException;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageOptionalParameter;
+import com.microsoft.azure.CloudException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AreaOfInterestResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionErrorException;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescriptionExclude;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.Details;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DomainModelResults;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageAnalysis;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageDescription;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ListModelsResult;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrDetectionLanguage;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrLanguages;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOperationResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextOperationResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextRecognitionMode;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.VisualFeatureTypes;
-import rx.Observable;
-
import java.io.InputStream;
import java.util.List;
+import java.util.UUID;
+import rx.Observable;
/**
* An instance of this class provides access to all the operations defined
* in ComputerVision.
*/
public interface ComputerVision {
-
- /**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art
- * Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use
- * the Read Document interface, the response contains a field called 'Operation-Location'. The
- * 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation'
- * to access OCR results.
- *
- * @param image An image stream.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- void batchReadFileInStream(byte[] image);
-
- /**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art
- * Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use
- * the Read Document interface, the response contains a field called 'Operation-Location'. The
- * 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation'
- * to access OCR results.
- *
- * @param image An image stream.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return a representation of the deferred computation of this call if successful.
- */
- Observable batchReadFileInStreamAsync(byte[] image);
-
-
-
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
- * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
- * your Get Recognize Text Operation Result operation.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
- void recognizeTextInStream(byte[] image, TextRecognitionMode mode);
+ void readInStream(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter);
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
- * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
- * your Get Recognize Text Operation Result operation.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return a representation of the deferred computation of this call if successful.
*/
- Observable recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode);
-
-
-
- /**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should
- * be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ReadOperationResult object if successful.
- */
- ReadOperationResult getReadOperationResult(String operationId);
+ Observable readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter);
/**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should
- * be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ReadOperationResult object
- */
- Observable getReadOperationResultAsync(String operationId);
-
-
-
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
- * Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
- * File interface, the response contains a field called 'Operation-Location'. The
- * 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult'
- * operation to access OCR results.
- *
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- void batchReadFile(String url);
-
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical
- * Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read
- * File interface, the response contains a field called 'Operation-Location'. The
- * 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult'
- * operation to access OCR results.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
*
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return a representation of the deferred computation of this call if successful.
+ * @return the first stage of the readInStream call
*/
- Observable batchReadFileAsync(String url);
-
-
+ ComputerVisionReadInStreamDefinitionStages.WithImage readInStream();
/**
- * This interface is used for getting text operation result. The URL to this interface should be
- * retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the TextOperationResult object if successful.
+ * Grouping of readInStream definition stages.
*/
- TextOperationResult getTextOperationResult(String operationId);
+ interface ComputerVisionReadInStreamDefinitionStages {
+ /**
+ * The stage of the definition to be specify image.
+ */
+ interface WithImage {
+ /**
+ * An image stream.
+ *
+ * @return next definition stage
+ */
+ ComputerVisionReadInStreamDefinitionStages.WithExecute withImage(byte[] image);
+ }
- /**
- * This interface is used for getting text operation result. The URL to this interface should be
- * retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the TextOperationResult object
- */
- Observable getTextOperationResultAsync(String operationId);
+ /**
+ * The stage of the definition which allows for any other optional settings to be specified.
+ */
+ interface WithAllOptions {
+ /**
+ * The BCP-47 language code of the text to be detected in the image. In future versions, when language
+ * parameter is not passed, language detection will be used to determine the language. However, in the current
+ * version, missing language parameter will cause English to be used. To ensure that your document is always
+ * parsed in English without the use of language detection in the future, pass “en” in the language parameter.
+ * Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'.
+ *
+ * @return next definition stage
+ */
+ ComputerVisionReadInStreamDefinitionStages.WithExecute withLanguage(OcrDetectionLanguage language);
+ }
+ /**
+ * The last stage of the definition which will make the operation call.
+ */
+ interface WithExecute extends ComputerVisionReadInStreamDefinitionStages.WithAllOptions {
+ /**
+ * Execute the request.
+ *
+ */
+ void execute();
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
- * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
- * your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- void recognizeText(String url, TextRecognitionMode mode);
+ /**
+ * Execute the request asynchronously.
+ *
+ * @return a representation of the deferred computation of this call if successful.
+ */
+ Observable executeAsync();
+ }
+ }
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field
- * called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for
- * your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'.
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return a representation of the deferred computation of this call if successful.
+ * The entirety of readInStream definition.
*/
- Observable recognizeTextAsync(String url, TextRecognitionMode mode);
-
+ interface ComputerVisionReadInStreamDefinition extends
+ ComputerVisionReadInStreamDefinitionStages.WithImage,
+ ComputerVisionReadInStreamDefinitionStages.WithExecute {
+ }
/**
* This operation generates a list of words, or tags, that are relevant to the content of the supplied image.
@@ -1020,6 +958,127 @@ interface ComputerVisionAnalyzeImageInStreamDefinition extends
}
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should
+ * be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ComputerVisionErrorException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ReadOperationResult object if successful.
+ */
+ ReadOperationResult getReadResult(UUID operationId);
+
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should
+ * be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ReadOperationResult object
+ */
+ Observable getReadResultAsync(UUID operationId);
+
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ComputerVisionErrorException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ void read(String url, ReadOptionalParameter readOptionalParameter);
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return a representation of the deferred computation of this call if successful.
+ */
+ Observable readAsync(String url, ReadOptionalParameter readOptionalParameter);
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character
+ * Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the
+ * response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that
+ * you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @return the first stage of the read call
+ */
+ ComputerVisionReadDefinitionStages.WithUrl read();
+
+ /**
+ * Grouping of read definition stages.
+ */
+ interface ComputerVisionReadDefinitionStages {
+ /**
+ * The stage of the definition to be specify url.
+ */
+ interface WithUrl {
+ /**
+ * Publicly reachable URL of an image.
+ *
+ * @return next definition stage
+ */
+ ComputerVisionReadDefinitionStages.WithExecute withUrl(String url);
+ }
+
+ /**
+ * The stage of the definition which allows for any other optional settings to be specified.
+ */
+ interface WithAllOptions {
+ /**
+ * The BCP-47 language code of the text to be detected in the image. In future versions, when language
+ * parameter is not passed, language detection will be used to determine the language. However, in the current
+ * version, missing language parameter will cause English to be used. To ensure that your document is always
+ * parsed in English without the use of language detection in the future, pass “en” in the language parameter.
+ * Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'.
+ *
+ * @return next definition stage
+ */
+ ComputerVisionReadDefinitionStages.WithExecute withLanguage(OcrDetectionLanguage language);
+
+ }
+
+ /**
+ * The last stage of the definition which will make the operation call.
+ */
+ interface WithExecute extends ComputerVisionReadDefinitionStages.WithAllOptions {
+ /**
+ * Execute the request.
+ *
+ */
+ void execute();
+
+ /**
+ * Execute the request asynchronously.
+ *
+ * @return a representation of the deferred computation of this call if successful.
+ */
+ Observable executeAsync();
+ }
+ }
+
+ /**
+ * The entirety of read definition.
+ */
+ interface ComputerVisionReadDefinition extends
+ ComputerVisionReadDefinitionStages.WithUrl,
+ ComputerVisionReadDefinitionStages.WithExecute {
+ }
+
+
/**
* This operation returns a bounding box around the most important area of the image.
* A successful response will be returned in JSON. If the request failed, the response contains an
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
index 7cb29635a95f..54283a59d43a 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/ComputerVisionManager.java
@@ -27,7 +27,7 @@ public class ComputerVisionManager {
* @return the Computer Vision API client
*/
public static ComputerVisionClient authenticate(String subscriptionKey) {
- return authenticate("https://{endpoint}/vision/v2.1/", subscriptionKey);
+ return authenticate("https://{endpoint}/vision/v3.0/", subscriptionKey);
}
/**
@@ -67,7 +67,7 @@ public Response intercept(Chain chain) throws IOException {
* @return the Computer Vision API client
*/
public static ComputerVisionClient authenticate(ServiceClientCredentials credentials, String endpoint) {
- return authenticate("https://{endpoint}/vision/v2.1/", credentials)
+ return authenticate("https://{endpoint}/vision/v3.0/", credentials)
.withEndpoint(endpoint);
}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
index dd4a36ea98e7..217d1e1edfce 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionClientImpl.java
@@ -8,12 +8,31 @@
package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;
+import com.google.common.base.Joiner;
+import com.google.common.reflect.TypeToken;
import com.microsoft.azure.AzureClient;
import com.microsoft.azure.AzureServiceClient;
import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision;
import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVisionClient;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionErrorException;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectResult;
import com.microsoft.rest.credentials.ServiceClientCredentials;
import com.microsoft.rest.RestClient;
+import com.microsoft.rest.ServiceCallback;
+import com.microsoft.rest.ServiceFuture;
+import com.microsoft.rest.ServiceResponse;
+import java.io.InputStream;
+import java.io.IOException;
+import okhttp3.MediaType;
+import okhttp3.RequestBody;
+import okhttp3.ResponseBody;
+import retrofit2.http.Body;
+import retrofit2.http.Header;
+import retrofit2.http.Headers;
+import retrofit2.http.POST;
+import retrofit2.Response;
+import rx.functions.Func1;
+import rx.Observable;
/**
* Initializes a new instance of the ComputerVisionClientImpl class.
@@ -141,7 +160,7 @@ public ComputerVision computerVision() {
* @param credentials the management credentials for Azure
*/
public ComputerVisionClientImpl(ServiceClientCredentials credentials) {
- this("https://{Endpoint}/vision/v2.1", credentials);
+ this("https://{Endpoint}/vision/v3.0", credentials);
}
/**
@@ -180,6 +199,6 @@ protected void initialize() {
*/
@Override
public String userAgent() {
- return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionClient", "2.1");
+ return String.format("%s (%s, %s)", super.userAgent(), "ComputerVisionClient", "3.0");
}
}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
index 6ae903565bfe..188da0fbd000 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/implementation/ComputerVisionImpl.java
@@ -8,42 +8,42 @@
package com.microsoft.azure.cognitiveservices.vision.computervision.implementation;
-import com.google.common.base.Joiner;
-import com.google.common.reflect.TypeToken;
-import com.microsoft.azure.CloudException;
-import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageInStreamOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageByDomainOptionalParameter;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AnalyzeImageOptionalParameter;
+import retrofit2.Retrofit;
+import com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision;
+import com.google.common.base.Joiner;
+import com.google.common.reflect.TypeToken;
+import com.microsoft.azure.CloudException;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.AreaOfInterestResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.BatchReadFileHeaders;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.BatchReadFileInStreamHeaders;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ComputerVisionErrorException;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescribeImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DescriptionExclude;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.Details;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DetectResult;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.DomainModelResults;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.GenerateThumbnailOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageAnalysis;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageDescription;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ImageUrl;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ListModelsResult;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrDetectionLanguage;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrLanguages;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.OcrResult;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadHeaders;
+import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadInStreamHeaders;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.ReadOperationResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizePrintedTextOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextHeaders;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.RecognizeTextInStreamHeaders;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageInStreamOptionalParameter;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagImageOptionalParameter;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.TagResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextOperationResult;
-import com.microsoft.azure.cognitiveservices.vision.computervision.models.TextRecognitionMode;
import com.microsoft.azure.cognitiveservices.vision.computervision.models.VisualFeatureTypes;
import com.microsoft.rest.CollectionFormat;
import com.microsoft.rest.ServiceCallback;
@@ -51,25 +51,24 @@
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.ServiceResponseWithHeaders;
import com.microsoft.rest.Validator;
+import java.io.InputStream;
+import java.io.IOException;
+import java.util.List;
+import java.util.UUID;
import okhttp3.MediaType;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
-import retrofit2.Response;
-import retrofit2.Retrofit;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
-import retrofit2.http.POST;
import retrofit2.http.Path;
+import retrofit2.http.POST;
import retrofit2.http.Query;
import retrofit2.http.Streaming;
-import rx.Observable;
+import retrofit2.Response;
import rx.functions.Func1;
-
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
+import rx.Observable;
/**
* An instance of this class provides access to all the operations defined
@@ -97,29 +96,9 @@ public ComputerVisionImpl(Retrofit retrofit, ComputerVisionClientImpl client) {
* used by Retrofit to perform actually REST calls.
*/
interface ComputerVisionService {
- @Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision batchReadFileInStream" })
- @POST("read/core/asyncBatchAnalyze")
- Observable> batchReadFileInStream(@Body RequestBody image, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision recognizeTextInStream" })
- @POST("recognizeText")
- Observable> recognizeTextInStream(@Body RequestBody image, @Query("mode") TextRecognitionMode mode, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision getReadOperationResult" })
- @GET("read/operations/{operationId}")
- Observable> getReadOperationResult(@Path("operationId") String operationId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision batchReadFile" })
- @POST("read/core/asyncBatchAnalyze")
- Observable> batchReadFile(@Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision getTextOperationResult" })
- @GET("textOperations/{operationId}")
- Observable> getTextOperationResult(@Path("operationId") String operationId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
-
- @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision recognizeText" })
- @POST("recognizeText")
- Observable> recognizeText(@Query("mode") TextRecognitionMode mode, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ @Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision readInStream" })
+ @POST("read/analyze")
+ Observable> readInStream(@Query("language") OcrDetectionLanguage language, @Body RequestBody image, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision tagImageInStream" })
@POST("tag")
@@ -152,7 +131,15 @@ interface ComputerVisionService {
@Headers({ "Content-Type: application/octet-stream", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision analyzeImageInStream" })
@POST("analyze")
- Observable> analyzeImageInStream(@Query("visualFeatures") String visualFeatures, @Query("details") String details1, @Query("language") String language, @Query("descriptionExclude") String descriptionExclude1, @Body RequestBody image, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ Observable> analyzeImageInStream(@Query("visualFeatures") String visualFeatures, @Query("details") String details, @Query("language") String language, @Query("descriptionExclude") String descriptionExclude1, @Body RequestBody image, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision getReadResult" })
+ @GET("read/analyzeResults/{operationId}")
+ Observable> getReadResult(@Path("operationId") UUID operationId, @Header("accept-language") String acceptLanguage, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+
+ @Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision read" })
+ @POST("read/analyze")
+ Observable> read(@Query("language") OcrDetectionLanguage language, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision getAreaOfInterest" })
@POST("areaOfInterest")
@@ -189,156 +176,97 @@ interface ComputerVisionService {
@Headers({ "Content-Type: application/json; charset=utf-8", "x-ms-logging-context: com.microsoft.azure.cognitiveservices.vision.computervision.ComputerVision analyzeImage" })
@POST("analyze")
- Observable> analyzeImage(@Query("visualFeatures") String visualFeatures, @Query("details") String details1, @Query("language") String language, @Query("descriptionExclude") String descriptionExclude1, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
+ Observable> analyzeImage(@Query("visualFeatures") String visualFeatures, @Query("details") String details, @Query("language") String language, @Query("descriptionExclude") String descriptionExclude1, @Header("accept-language") String acceptLanguage, @Body ImageUrl imageUrl, @Header("x-ms-parameterized-host") String parameterizedHost, @Header("User-Agent") String userAgent);
}
+
/**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read Document interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation' to access OCR results.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @throws ComputerVisionErrorException thrown if the request is rejected by server
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
*/
- public void batchReadFileInStream(byte[] image) {
- batchReadFileInStreamWithServiceResponseAsync(image).toBlocking().single().body();
+ public void readInStream(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter) {
+ readInStreamWithServiceResponseAsync(image, readInStreamOptionalParameter).toBlocking().single().body();
}
/**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read Document interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation' to access OCR results.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceFuture} object
*/
- public ServiceFuture batchReadFileInStreamAsync(byte[] image, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(batchReadFileInStreamWithServiceResponseAsync(image), serviceCallback);
+ public ServiceFuture readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(readInStreamWithServiceResponseAsync(image, readInStreamOptionalParameter), serviceCallback);
}
/**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read Document interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation' to access OCR results.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable batchReadFileInStreamAsync(byte[] image) {
- return batchReadFileInStreamWithServiceResponseAsync(image).map(new Func1, Void>() {
+ public Observable readInStreamAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter) {
+ return readInStreamWithServiceResponseAsync(image, readInStreamOptionalParameter).map(new Func1, Void>() {
@Override
- public Void call(ServiceResponseWithHeaders response) {
+ public Void call(ServiceResponseWithHeaders response) {
return response.body();
}
});
}
/**
- * Use this interface to get the result of a Read Document operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read Document interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'Get Read Result operation' to access OCR results.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
+ * @param readInStreamOptionalParameter the object representing the optional parameters to be set before calling this API
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable> batchReadFileInStreamWithServiceResponseAsync(byte[] image) {
+ public Observable> readInStreamWithServiceResponseAsync(byte[] image, ReadInStreamOptionalParameter readInStreamOptionalParameter) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
}
if (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
- RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
- return service.batchReadFileInStream(imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponseWithHeaders clientResponse = batchReadFileInStreamDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponseWithHeaders batchReadFileInStreamDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(202, new TypeToken() { }.getType())
- .registerError(ComputerVisionErrorException.class)
- .buildWithHeaders(response, BatchReadFileInStreamHeaders.class);
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- public void recognizeTextInStream(byte[] image, TextRecognitionMode mode) {
- recognizeTextInStreamWithServiceResponseAsync(image, mode).toBlocking().single().body();
- }
+ final OcrDetectionLanguage language = readInStreamOptionalParameter != null ? readInStreamOptionalParameter.language() : null;
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(recognizeTextInStreamWithServiceResponseAsync(image, mode), serviceCallback);
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable recognizeTextInStreamAsync(byte[] image, TextRecognitionMode mode) {
- return recognizeTextInStreamWithServiceResponseAsync(image, mode).map(new Func1, Void>() {
- @Override
- public Void call(ServiceResponseWithHeaders response) {
- return response.body();
- }
- });
+ return readInStreamWithServiceResponseAsync(image, language);
}
/**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
*
* @param image An image stream.
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
+ * @param language The BCP-47 language code of the text to be detected in the image. In future versions, when language parameter is not passed, language detection will be used to determine the language. However, in the current version, missing language parameter will cause English to be used. To ensure that your document is always parsed in English without the use of language detection in the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the {@link ServiceResponseWithHeaders} object if successful.
*/
- public Observable> recognizeTextInStreamWithServiceResponseAsync(byte[] image, TextRecognitionMode mode) {
+ public Observable> readInStreamWithServiceResponseAsync(byte[] image, OcrDetectionLanguage language) {
if (this.client.endpoint() == null) {
throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
}
if (image == null) {
throw new IllegalArgumentException("Parameter image is required and cannot be null.");
}
- if (mode == null) {
- throw new IllegalArgumentException("Parameter mode is required and cannot be null.");
- }
String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
RequestBody imageConverted = RequestBody.create(MediaType.parse("application/octet-stream"), image);
- return service.recognizeTextInStream(imageConverted, mode, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ return service.readInStream(language, imageConverted, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
@Override
- public Observable> call(Response response) {
+ public Observable> call(Response response) {
try {
- ServiceResponseWithHeaders clientResponse = recognizeTextInStreamDelegate(response);
+ ServiceResponseWithHeaders clientResponse = readInStreamDelegate(response);
return Observable.just(clientResponse);
} catch (Throwable t) {
return Observable.error(t);
@@ -347,328 +275,60 @@ public Observable
});
}
- private ServiceResponseWithHeaders recognizeTextInStreamDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
+ private ServiceResponseWithHeaders readInStreamDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
.register(202, new TypeToken() { }.getType())
.registerError(ComputerVisionErrorException.class)
- .buildWithHeaders(response, RecognizeTextInStreamHeaders.class);
- }
-
- /**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the ReadOperationResult object if successful.
- */
- public ReadOperationResult getReadOperationResult(String operationId) {
- return getReadOperationResultWithServiceResponseAsync(operationId).toBlocking().single().body();
+ .buildWithHeaders(response, ReadInStreamHeaders.class);
}
- /**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture getReadOperationResultAsync(String operationId, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getReadOperationResultWithServiceResponseAsync(operationId), serviceCallback);
+ @Override
+ public ComputerVisionReadInStreamParameters readInStream() {
+ return new ComputerVisionReadInStreamParameters(this);
}
/**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ReadOperationResult object
+ * Internal class implementing ComputerVisionReadInStreamDefinition.
*/
- public Observable getReadOperationResultAsync(String operationId) {
- return getReadOperationResultWithServiceResponseAsync(operationId).map(new Func1, ReadOperationResult>() {
- @Override
- public ReadOperationResult call(ServiceResponse response) {
- return response.body();
- }
- });
- }
+ class ComputerVisionReadInStreamParameters implements ComputerVisionReadInStreamDefinition {
+ private ComputerVisionImpl parent;
+ private byte[] image;
+ private OcrDetectionLanguage language;
- /**
- * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Batch Read File interface.
- *
- * @param operationId Id of read operation returned in the response of the 'Batch Read File' interface.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the ReadOperationResult object
- */
- public Observable> getReadOperationResultWithServiceResponseAsync(String operationId) {
- if (this.client.endpoint() == null) {
- throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
- }
- if (operationId == null) {
- throw new IllegalArgumentException("Parameter operationId is required and cannot be null.");
+ /**
+ * Constructor.
+ * @param parent the parent object.
+ */
+ ComputerVisionReadInStreamParameters(ComputerVisionImpl parent) {
+ this.parent = parent;
}
- String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
- return service.getReadOperationResult(operationId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponse clientResponse = getReadOperationResultDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponse getReadOperationResultDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
- .registerError(ComputerVisionErrorException.class)
- .build(response);
- }
-
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read File interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult' operation to access OCR results.
- *
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- public void batchReadFile(String url) {
- batchReadFileWithServiceResponseAsync(url).toBlocking().single().body();
- }
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read File interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult' operation to access OCR results.
- *
- * @param url Publicly reachable URL of an image.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture batchReadFileAsync(String url, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(batchReadFileWithServiceResponseAsync(url), serviceCallback);
- }
-
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read File interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult' operation to access OCR results.
- *
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable batchReadFileAsync(String url) {
- return batchReadFileWithServiceResponseAsync(url).map(new Func1, Void>() {
- @Override
- public Void call(ServiceResponseWithHeaders response) {
- return response.body();
- }
- });
- }
-
- /**
- * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read File interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadOperationResult' operation to access OCR results.
- *
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable> batchReadFileWithServiceResponseAsync(String url) {
- if (this.client.endpoint() == null) {
- throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
- }
- if (url == null) {
- throw new IllegalArgumentException("Parameter url is required and cannot be null.");
+ @Override
+ public ComputerVisionReadInStreamParameters withImage(byte[] image) {
+ this.image = image;
+ return this;
}
- ImageUrl imageUrl = new ImageUrl();
- imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
- return service.batchReadFile(this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponseWithHeaders clientResponse = batchReadFileDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponseWithHeaders batchReadFileDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(202, new TypeToken() { }.getType())
- .registerError(ComputerVisionErrorException.class)
- .buildWithHeaders(response, BatchReadFileHeaders.class);
- }
-
- /**
- * This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- * @return the TextOperationResult object if successful.
- */
- public TextOperationResult getTextOperationResult(String operationId) {
- return getTextOperationResultWithServiceResponseAsync(operationId).toBlocking().single().body();
- }
-
- /**
- * This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture getTextOperationResultAsync(String operationId, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromResponse(getTextOperationResultWithServiceResponseAsync(operationId), serviceCallback);
- }
- /**
- * This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the TextOperationResult object
- */
- public Observable getTextOperationResultAsync(String operationId) {
- return getTextOperationResultWithServiceResponseAsync(operationId).map(new Func1, TextOperationResult>() {
- @Override
- public TextOperationResult call(ServiceResponse response) {
- return response.body();
- }
- });
- }
-
- /**
- * This interface is used for getting text operation result. The URL to this interface should be retrieved from 'Operation-Location' field returned from Recognize Text interface.
- *
- * @param operationId Id of the text operation returned in the response of the 'Recognize Text'
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the observable to the TextOperationResult object
- */
- public Observable> getTextOperationResultWithServiceResponseAsync(String operationId) {
- if (this.client.endpoint() == null) {
- throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
- }
- if (operationId == null) {
- throw new IllegalArgumentException("Parameter operationId is required and cannot be null.");
+ @Override
+ public ComputerVisionReadInStreamParameters withLanguage(OcrDetectionLanguage language) {
+ this.language = language;
+ return this;
}
- String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
- return service.getTextOperationResult(operationId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
- @Override
- public Observable> call(Response response) {
- try {
- ServiceResponse clientResponse = getTextOperationResultDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
- }
- });
- }
-
- private ServiceResponse getTextOperationResultDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(200, new TypeToken() { }.getType())
- .registerError(ComputerVisionErrorException.class)
- .build(response);
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @throws ComputerVisionErrorException thrown if the request is rejected by server
- * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
- */
- public void recognizeText(String url, TextRecognitionMode mode) {
- recognizeTextWithServiceResponseAsync(url, mode).toBlocking().single().body();
- }
-
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @param url Publicly reachable URL of an image.
- * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceFuture} object
- */
- public ServiceFuture recognizeTextAsync(String url, TextRecognitionMode mode, final ServiceCallback serviceCallback) {
- return ServiceFuture.fromHeaderResponse(recognizeTextWithServiceResponseAsync(url, mode), serviceCallback);
- }
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable recognizeTextAsync(String url, TextRecognitionMode mode) {
- return recognizeTextWithServiceResponseAsync(url, mode).map(new Func1, Void>() {
- @Override
- public Void call(ServiceResponseWithHeaders response) {
- return response.body();
- }
- });
+ @Override
+ public void execute() {
+ readInStreamWithServiceResponseAsync(image, language).toBlocking().single().body();
}
- /**
- * Recognize Text operation. When you use the Recognize Text interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your Get Recognize Text Operation Result operation.
- *
- * @param mode Type of text to recognize. Possible values include: 'Handwritten', 'Printed'
- * @param url Publicly reachable URL of an image.
- * @throws IllegalArgumentException thrown if parameters fail the validation
- * @return the {@link ServiceResponseWithHeaders} object if successful.
- */
- public Observable> recognizeTextWithServiceResponseAsync(String url, TextRecognitionMode mode) {
- if (this.client.endpoint() == null) {
- throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
- }
- if (mode == null) {
- throw new IllegalArgumentException("Parameter mode is required and cannot be null.");
- }
- if (url == null) {
- throw new IllegalArgumentException("Parameter url is required and cannot be null.");
- }
- ImageUrl imageUrl = new ImageUrl();
- imageUrl.withUrl(url);
- String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
- return service.recognizeText(mode, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
- .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable executeAsync() {
+ return readInStreamWithServiceResponseAsync(image, language).map(new Func1, Void>() {
@Override
- public Observable> call(Response response) {
- try {
- ServiceResponseWithHeaders clientResponse = recognizeTextDelegate(response);
- return Observable.just(clientResponse);
- } catch (Throwable t) {
- return Observable.error(t);
- }
+ public Void call(ServiceResponseWithHeaders response) {
+ return response.body();
}
});
- }
-
- private ServiceResponseWithHeaders recognizeTextDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
- return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
- .register(202, new TypeToken() { }.getType())
- .registerError(ComputerVisionErrorException.class)
- .buildWithHeaders(response, RecognizeTextHeaders.class);
+ }
}
@@ -1927,6 +1587,235 @@ public ImageAnalysis call(ServiceResponse response) {
}
}
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ComputerVisionErrorException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ * @return the ReadOperationResult object if successful.
+ */
+ public ReadOperationResult getReadResult(UUID operationId) {
+ return getReadResultWithServiceResponseAsync(operationId).toBlocking().single().body();
+ }
+
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture getReadResultAsync(UUID operationId, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromResponse(getReadResultWithServiceResponseAsync(operationId), serviceCallback);
+ }
+
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ReadOperationResult object
+ */
+ public Observable getReadResultAsync(UUID operationId) {
+ return getReadResultWithServiceResponseAsync(operationId).map(new Func1, ReadOperationResult>() {
+ @Override
+ public ReadOperationResult call(ServiceResponse response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * This interface is used for getting OCR results of Read operation. The URL to this interface should be retrieved from 'Operation-Location' field returned from Read interface.
+ *
+ * @param operationId Id of read operation returned in the response of the 'Read' interface.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the observable to the ReadOperationResult object
+ */
+ public Observable> getReadResultWithServiceResponseAsync(UUID operationId) {
+ if (this.client.endpoint() == null) {
+ throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
+ }
+ if (operationId == null) {
+ throw new IllegalArgumentException("Parameter operationId is required and cannot be null.");
+ }
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
+ return service.getReadResult(operationId, this.client.acceptLanguage(), parameterizedHost, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponse clientResponse = getReadResultDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponse getReadResultDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(200, new TypeToken() { }.getType())
+ .registerError(ComputerVisionErrorException.class)
+ .build(response);
+ }
+
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @throws ComputerVisionErrorException thrown if the request is rejected by server
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent
+ */
+ public void read(String url, ReadOptionalParameter readOptionalParameter) {
+ readWithServiceResponseAsync(url, readOptionalParameter).toBlocking().single().body();
+ }
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @param serviceCallback the async ServiceCallback to handle successful and failed responses.
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceFuture} object
+ */
+ public ServiceFuture readAsync(String url, ReadOptionalParameter readOptionalParameter, final ServiceCallback serviceCallback) {
+ return ServiceFuture.fromHeaderResponse(readWithServiceResponseAsync(url, readOptionalParameter), serviceCallback);
+ }
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponseWithHeaders} object if successful.
+ */
+ public Observable readAsync(String url, ReadOptionalParameter readOptionalParameter) {
+ return readWithServiceResponseAsync(url, readOptionalParameter).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponseWithHeaders response) {
+ return response.body();
+ }
+ });
+ }
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param readOptionalParameter the object representing the optional parameters to be set before calling this API
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponseWithHeaders} object if successful.
+ */
+ public Observable> readWithServiceResponseAsync(String url, ReadOptionalParameter readOptionalParameter) {
+ if (this.client.endpoint() == null) {
+ throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
+ }
+ if (url == null) {
+ throw new IllegalArgumentException("Parameter url is required and cannot be null.");
+ }
+ final OcrDetectionLanguage language = readOptionalParameter != null ? readOptionalParameter.language() : null;
+
+ return readWithServiceResponseAsync(url, language);
+ }
+
+ /**
+ * Use this interface to get the result of a Read operation, employing the state-of-the-art Optical Character Recognition (OCR) algorithms optimized for text-heavy documents. When you use the Read interface, the response contains a field called 'Operation-Location'. The 'Operation-Location' field contains the URL that you must use for your 'GetReadResult' operation to access OCR results..
+ *
+ * @param url Publicly reachable URL of an image.
+ * @param language The BCP-47 language code of the text to be detected in the image. In future versions, when language parameter is not passed, language detection will be used to determine the language. However, in the current version, missing language parameter will cause English to be used. To ensure that your document is always parsed in English without the use of language detection in the future, pass “en” in the language parameter. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl', 'pt'
+ * @throws IllegalArgumentException thrown if parameters fail the validation
+ * @return the {@link ServiceResponseWithHeaders} object if successful.
+ */
+ public Observable> readWithServiceResponseAsync(String url, OcrDetectionLanguage language) {
+ if (this.client.endpoint() == null) {
+ throw new IllegalArgumentException("Parameter this.client.endpoint() is required and cannot be null.");
+ }
+ if (url == null) {
+ throw new IllegalArgumentException("Parameter url is required and cannot be null.");
+ }
+ ImageUrl imageUrl = new ImageUrl();
+ imageUrl.withUrl(url);
+ String parameterizedHost = Joiner.on(", ").join("{Endpoint}", this.client.endpoint());
+ return service.read(language, this.client.acceptLanguage(), imageUrl, parameterizedHost, this.client.userAgent())
+ .flatMap(new Func1, Observable>>() {
+ @Override
+ public Observable> call(Response response) {
+ try {
+ ServiceResponseWithHeaders clientResponse = readDelegate(response);
+ return Observable.just(clientResponse);
+ } catch (Throwable t) {
+ return Observable.error(t);
+ }
+ }
+ });
+ }
+
+ private ServiceResponseWithHeaders readDelegate(Response response) throws ComputerVisionErrorException, IOException, IllegalArgumentException {
+ return this.client.restClient().responseBuilderFactory().newInstance(this.client.serializerAdapter())
+ .register(202, new TypeToken() { }.getType())
+ .registerError(ComputerVisionErrorException.class)
+ .buildWithHeaders(response, ReadHeaders.class);
+ }
+
+ @Override
+ public ComputerVisionReadParameters read() {
+ return new ComputerVisionReadParameters(this);
+ }
+
+ /**
+ * Internal class implementing ComputerVisionReadDefinition.
+ */
+ class ComputerVisionReadParameters implements ComputerVisionReadDefinition {
+ private ComputerVisionImpl parent;
+ private String url;
+ private OcrDetectionLanguage language;
+
+ /**
+ * Constructor.
+ * @param parent the parent object.
+ */
+ ComputerVisionReadParameters(ComputerVisionImpl parent) {
+ this.parent = parent;
+ }
+
+ @Override
+ public ComputerVisionReadParameters withUrl(String url) {
+ this.url = url;
+ return this;
+ }
+
+ @Override
+ public ComputerVisionReadParameters withLanguage(OcrDetectionLanguage language) {
+ this.language = language;
+ return this;
+ }
+
+ @Override
+ public void execute() {
+ readWithServiceResponseAsync(url, language).toBlocking().single().body();
+ }
+
+ @Override
+ public Observable executeAsync() {
+ return readWithServiceResponseAsync(url, language).map(new Func1, Void>() {
+ @Override
+ public Void call(ServiceResponseWithHeaders response) {
+ return response.body();
+ }
+ });
+ }
+ }
+
/**
* This operation returns a bounding box around the most important area of the image.
A successful response will be returned in JSON. If the request failed, the response contains an error code and a message to help determine what went wrong.
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeResults.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeResults.java
new file mode 100644
index 000000000000..9583d598cd73
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/AnalyzeResults.java
@@ -0,0 +1,70 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Analyze batch operation result.
+ */
+public class AnalyzeResults {
+ /**
+ * Version of schema used for this result.
+ */
+ @JsonProperty(value = "version", required = true)
+ private String version;
+
+ /**
+ * Text extracted from the input.
+ */
+ @JsonProperty(value = "readResults", required = true)
+ private List readResults;
+
+ /**
+ * Get the version value.
+ *
+ * @return the version value
+ */
+ public String version() {
+ return this.version;
+ }
+
+ /**
+ * Set the version value.
+ *
+ * @param version the version value to set
+ * @return the AnalyzeResults object itself.
+ */
+ public AnalyzeResults withVersion(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get the readResults value.
+ *
+ * @return the readResults value
+ */
+ public List readResults() {
+ return this.readResults;
+ }
+
+ /**
+ * Set the readResults value.
+ *
+ * @param readResults the readResults value to set
+ * @return the AnalyzeResults object itself.
+ */
+ public AnalyzeResults withReadResults(List readResults) {
+ this.readResults = readResults;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileHeaders.java
deleted file mode 100644
index 22f0ae6546d7..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileHeaders.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Defines headers for BatchReadFile operation.
- */
-public class BatchReadFileHeaders {
- /**
- * URL to query for status of the operation. The operation ID will expire
- * in 48 hours.
- */
- @JsonProperty(value = "Operation-Location")
- private String operationLocation;
-
- /**
- * Get the operationLocation value.
- *
- * @return the operationLocation value
- */
- public String operationLocation() {
- return this.operationLocation;
- }
-
- /**
- * Set the operationLocation value.
- *
- * @param operationLocation the operationLocation value to set
- * @return the BatchReadFileHeaders object itself.
- */
- public BatchReadFileHeaders withOperationLocation(String operationLocation) {
- this.operationLocation = operationLocation;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileInStreamHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileInStreamHeaders.java
deleted file mode 100644
index 62e02c24f58e..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/BatchReadFileInStreamHeaders.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Defines headers for BatchReadFileInStream operation.
- */
-public class BatchReadFileInStreamHeaders {
- /**
- * URL to query for status of the operation. The operation ID will expire
- * in 48 hours.
- */
- @JsonProperty(value = "Operation-Location")
- private String operationLocation;
-
- /**
- * Get the operationLocation value.
- *
- * @return the operationLocation value
- */
- public String operationLocation() {
- return this.operationLocation;
- }
-
- /**
- * Set the operationLocation value.
- *
- * @param operationLocation the operationLocation value to set
- * @return the BatchReadFileInStreamHeaders object itself.
- */
- public BatchReadFileInStreamHeaders withOperationLocation(String operationLocation) {
- this.operationLocation = operationLocation;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Line.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Line.java
index 308c35b4e064..ab137c3f599e 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Line.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Line.java
@@ -15,24 +15,51 @@
* An object representing a recognized text line.
*/
public class Line {
+ /**
+ * The BCP-47 language code of the recognized text line. Only provided
+ * where the language of the line differs from the page's.
+ */
+ @JsonProperty(value = "language")
+ private String language;
+
/**
* Bounding box of a recognized line.
*/
- @JsonProperty(value = "boundingBox")
+ @JsonProperty(value = "boundingBox", required = true)
private List boundingBox;
/**
* The text content of the line.
*/
- @JsonProperty(value = "text")
+ @JsonProperty(value = "text", required = true)
private String text;
/**
* List of words in the text line.
*/
- @JsonProperty(value = "words")
+ @JsonProperty(value = "words", required = true)
private List words;
+ /**
+ * Get the language value.
+ *
+ * @return the language value
+ */
+ public String language() {
+ return this.language;
+ }
+
+ /**
+ * Set the language value.
+ *
+ * @param language the language value to set
+ * @return the Line object itself.
+ */
+ public Line withLanguage(String language) {
+ this.language = language;
+ return this;
+ }
+
/**
* Get the boundingBox value.
*
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OcrDetectionLanguage.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OcrDetectionLanguage.java
new file mode 100644
index 000000000000..0e1cc6dcd9c9
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OcrDetectionLanguage.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import java.util.Collection;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.microsoft.rest.ExpandableStringEnum;
+
+/**
+ * Defines values for OcrDetectionLanguage.
+ */
+public final class OcrDetectionLanguage extends ExpandableStringEnum {
+ /** Static value en for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage EN = fromString("en");
+
+ /** Static value es for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage ES = fromString("es");
+
+ /** Static value fr for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage FR = fromString("fr");
+
+ /** Static value de for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage DE = fromString("de");
+
+ /** Static value it for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage IT = fromString("it");
+
+ /** Static value nl for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage NL = fromString("nl");
+
+ /** Static value pt for OcrDetectionLanguage. */
+ public static final OcrDetectionLanguage PT = fromString("pt");
+
+ /**
+ * Creates or finds a OcrDetectionLanguage from its string representation.
+ * @param name a name to look for
+ * @return the corresponding OcrDetectionLanguage
+ */
+ @JsonCreator
+ public static OcrDetectionLanguage fromString(String name) {
+ return fromString(name, OcrDetectionLanguage.class);
+ }
+
+ /**
+ * @return known OcrDetectionLanguage values
+ */
+ public static Collection values() {
+ return values(OcrDetectionLanguage.class);
+ }
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OperationStatusCodes.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OperationStatusCodes.java
new file mode 100644
index 000000000000..f5a881200fa1
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/OperationStatusCodes.java
@@ -0,0 +1,59 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Defines values for OperationStatusCodes.
+ */
+public enum OperationStatusCodes {
+ /** Enum value notStarted. */
+ NOT_STARTED("notStarted"),
+
+ /** Enum value running. */
+ RUNNING("running"),
+
+ /** Enum value failed. */
+ FAILED("failed"),
+
+ /** Enum value succeeded. */
+ SUCCEEDED("succeeded");
+
+ /** The actual serialized value for a OperationStatusCodes instance. */
+ private String value;
+
+ OperationStatusCodes(String value) {
+ this.value = value;
+ }
+
+ /**
+ * Parses a serialized value to a OperationStatusCodes instance.
+ *
+ * @param value the serialized value to parse.
+ * @return the parsed OperationStatusCodes object, or null if unable to parse.
+ */
+ @JsonCreator
+ public static OperationStatusCodes fromString(String value) {
+ OperationStatusCodes[] items = OperationStatusCodes.values();
+ for (OperationStatusCodes item : items) {
+ if (item.toString().equalsIgnoreCase(value)) {
+ return item;
+ }
+ }
+ return null;
+ }
+
+ @JsonValue
+ @Override
+ public String toString() {
+ return this.value;
+ }
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadHeaders.java
new file mode 100644
index 000000000000..0e5ab8c7dd99
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadHeaders.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Defines headers for Read operation.
+ */
+public class ReadHeaders {
+ /**
+ * URL to query for status of the operation. The operation ID will expire
+ * in 48 hours.
+ */
+ @JsonProperty(value = "Operation-Location")
+ private String operationLocation;
+
+ /**
+ * Get the operationLocation value.
+ *
+ * @return the operationLocation value
+ */
+ public String operationLocation() {
+ return this.operationLocation;
+ }
+
+ /**
+ * Set the operationLocation value.
+ *
+ * @param operationLocation the operationLocation value to set
+ * @return the ReadHeaders object itself.
+ */
+ public ReadHeaders withOperationLocation(String operationLocation) {
+ this.operationLocation = operationLocation;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamHeaders.java
new file mode 100644
index 000000000000..a4fe26a86197
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamHeaders.java
@@ -0,0 +1,44 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Defines headers for ReadInStream operation.
+ */
+public class ReadInStreamHeaders {
+ /**
+ * URL to query for status of the operation. The operation ID will expire
+ * in 48 hours.
+ */
+ @JsonProperty(value = "Operation-Location")
+ private String operationLocation;
+
+ /**
+ * Get the operationLocation value.
+ *
+ * @return the operationLocation value
+ */
+ public String operationLocation() {
+ return this.operationLocation;
+ }
+
+ /**
+ * Set the operationLocation value.
+ *
+ * @param operationLocation the operationLocation value to set
+ * @return the ReadInStreamHeaders object itself.
+ */
+ public ReadInStreamHeaders withOperationLocation(String operationLocation) {
+ this.operationLocation = operationLocation;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamOptionalParameter.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamOptionalParameter.java
new file mode 100644
index 000000000000..1a49b82a7c3e
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadInStreamOptionalParameter.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+
+/**
+ * The ReadInStreamOptionalParameter model.
+ */
+public class ReadInStreamOptionalParameter {
+ /**
+ * The BCP-47 language code of the text to be detected in the image. In
+ * future versions, when language parameter is not passed, language
+ * detection will be used to determine the language. However, in the
+ * current version, missing language parameter will cause English to be
+ * used. To ensure that your document is always parsed in English without
+ * the use of language detection in the future, pass “en” in the language
+ * parameter. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl',
+ * 'pt'.
+ */
+ private OcrDetectionLanguage language;
+
+ /**
+ * Gets or sets the preferred language for the response.
+ */
+ private String thisclientacceptLanguage;
+
+ /**
+ * Get the language value.
+ *
+ * @return the language value
+ */
+ public OcrDetectionLanguage language() {
+ return this.language;
+ }
+
+ /**
+ * Set the language value.
+ *
+ * @param language the language value to set
+ * @return the ReadInStreamOptionalParameter object itself.
+ */
+ public ReadInStreamOptionalParameter withLanguage(OcrDetectionLanguage language) {
+ this.language = language;
+ return this;
+ }
+
+ /**
+ * Get the thisclientacceptLanguage value.
+ *
+ * @return the thisclientacceptLanguage value
+ */
+ public String thisclientacceptLanguage() {
+ return this.thisclientacceptLanguage;
+ }
+
+ /**
+ * Set the thisclientacceptLanguage value.
+ *
+ * @param thisclientacceptLanguage the thisclientacceptLanguage value to set
+ * @return the ReadInStreamOptionalParameter object itself.
+ */
+ public ReadInStreamOptionalParameter withThisclientacceptLanguage(String thisclientacceptLanguage) {
+ this.thisclientacceptLanguage = thisclientacceptLanguage;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOperationResult.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOperationResult.java
index e07f016f6372..795d0add57ee 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOperationResult.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOperationResult.java
@@ -8,7 +8,6 @@
package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
@@ -16,24 +15,36 @@
*/
public class ReadOperationResult {
/**
- * Status of the read operation. Possible values include: 'NotStarted',
- * 'Running', 'Failed', 'Succeeded'.
+ * Status of the read operation. Possible values include: 'notStarted',
+ * 'running', 'failed', 'succeeded'.
*/
@JsonProperty(value = "status")
- private TextOperationStatusCodes status;
+ private OperationStatusCodes status;
/**
- * An array of text recognition result of the read operation.
+ * Get UTC date time the batch operation was submitted.
*/
- @JsonProperty(value = "recognitionResults")
- private List recognitionResults;
+ @JsonProperty(value = "createdDateTime")
+ private String createdDateTime;
+
+ /**
+ * Get last updated UTC date time of this batch operation.
+ */
+ @JsonProperty(value = "lastUpdatedDateTime")
+ private String lastUpdatedDateTime;
+
+ /**
+ * Analyze batch operation result.
+ */
+ @JsonProperty(value = "analyzeResult")
+ private AnalyzeResults analyzeResult;
/**
* Get the status value.
*
* @return the status value
*/
- public TextOperationStatusCodes status() {
+ public OperationStatusCodes status() {
return this.status;
}
@@ -43,28 +54,68 @@ public TextOperationStatusCodes status() {
* @param status the status value to set
* @return the ReadOperationResult object itself.
*/
- public ReadOperationResult withStatus(TextOperationStatusCodes status) {
+ public ReadOperationResult withStatus(OperationStatusCodes status) {
this.status = status;
return this;
}
/**
- * Get the recognitionResults value.
+ * Get the createdDateTime value.
+ *
+ * @return the createdDateTime value
+ */
+ public String createdDateTime() {
+ return this.createdDateTime;
+ }
+
+ /**
+ * Set the createdDateTime value.
+ *
+ * @param createdDateTime the createdDateTime value to set
+ * @return the ReadOperationResult object itself.
+ */
+ public ReadOperationResult withCreatedDateTime(String createdDateTime) {
+ this.createdDateTime = createdDateTime;
+ return this;
+ }
+
+ /**
+ * Get the lastUpdatedDateTime value.
+ *
+ * @return the lastUpdatedDateTime value
+ */
+ public String lastUpdatedDateTime() {
+ return this.lastUpdatedDateTime;
+ }
+
+ /**
+ * Set the lastUpdatedDateTime value.
+ *
+ * @param lastUpdatedDateTime the lastUpdatedDateTime value to set
+ * @return the ReadOperationResult object itself.
+ */
+ public ReadOperationResult withLastUpdatedDateTime(String lastUpdatedDateTime) {
+ this.lastUpdatedDateTime = lastUpdatedDateTime;
+ return this;
+ }
+
+ /**
+ * Get the analyzeResult value.
*
- * @return the recognitionResults value
+ * @return the analyzeResult value
*/
- public List recognitionResults() {
- return this.recognitionResults;
+ public AnalyzeResults analyzeResult() {
+ return this.analyzeResult;
}
/**
- * Set the recognitionResults value.
+ * Set the analyzeResult value.
*
- * @param recognitionResults the recognitionResults value to set
+ * @param analyzeResult the analyzeResult value to set
* @return the ReadOperationResult object itself.
*/
- public ReadOperationResult withRecognitionResults(List recognitionResults) {
- this.recognitionResults = recognitionResults;
+ public ReadOperationResult withAnalyzeResult(AnalyzeResults analyzeResult) {
+ this.analyzeResult = analyzeResult;
return this;
}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOptionalParameter.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOptionalParameter.java
new file mode 100644
index 000000000000..64ef3880343e
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadOptionalParameter.java
@@ -0,0 +1,73 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+
+/**
+ * The ReadOptionalParameter model.
+ */
+public class ReadOptionalParameter {
+ /**
+ * The BCP-47 language code of the text to be detected in the image. In
+ * future versions, when language parameter is not passed, language
+ * detection will be used to determine the language. However, in the
+ * current version, missing language parameter will cause English to be
+ * used. To ensure that your document is always parsed in English without
+ * the use of language detection in the future, pass “en” in the language
+ * parameter. Possible values include: 'en', 'es', 'fr', 'de', 'it', 'nl',
+ * 'pt'.
+ */
+ private OcrDetectionLanguage language;
+
+ /**
+ * Gets or sets the preferred language for the response.
+ */
+ private String thisclientacceptLanguage;
+
+ /**
+ * Get the language value.
+ *
+ * @return the language value
+ */
+ public OcrDetectionLanguage language() {
+ return this.language;
+ }
+
+ /**
+ * Set the language value.
+ *
+ * @param language the language value to set
+ * @return the ReadOptionalParameter object itself.
+ */
+ public ReadOptionalParameter withLanguage(OcrDetectionLanguage language) {
+ this.language = language;
+ return this;
+ }
+
+ /**
+ * Get the thisclientacceptLanguage value.
+ *
+ * @return the thisclientacceptLanguage value
+ */
+ public String thisclientacceptLanguage() {
+ return this.thisclientacceptLanguage;
+ }
+
+ /**
+ * Set the thisclientacceptLanguage value.
+ *
+ * @param thisclientacceptLanguage the thisclientacceptLanguage value to set
+ * @return the ReadOptionalParameter object itself.
+ */
+ public ReadOptionalParameter withThisclientacceptLanguage(String thisclientacceptLanguage) {
+ this.thisclientacceptLanguage = thisclientacceptLanguage;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadResult.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadResult.java
new file mode 100644
index 000000000000..c4f24fc0927c
--- /dev/null
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/ReadResult.java
@@ -0,0 +1,203 @@
+/**
+ * Copyright (c) Microsoft Corporation. All rights reserved.
+ * Licensed under the MIT License. See License.txt in the project root for
+ * license information.
+ *
+ * Code generated by Microsoft (R) AutoRest Code Generator.
+ */
+
+package com.microsoft.azure.cognitiveservices.vision.computervision.models;
+
+import java.util.List;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Text extracted from a page in the input document.
+ */
+public class ReadResult {
+ /**
+ * The 1-based page number of the recognition result.
+ */
+ @JsonProperty(value = "page", required = true)
+ private int page;
+
+ /**
+ * The BCP-47 language code of the recognized text page.
+ */
+ @JsonProperty(value = "language")
+ private String language;
+
+ /**
+ * The orientation of the image in degrees in the clockwise direction.
+ * Range between [-180, 180).
+ */
+ @JsonProperty(value = "angle", required = true)
+ private double angle;
+
+ /**
+ * The width of the image in pixels or the PDF in inches.
+ */
+ @JsonProperty(value = "width", required = true)
+ private double width;
+
+ /**
+ * The height of the image in pixels or the PDF in inches.
+ */
+ @JsonProperty(value = "height", required = true)
+ private double height;
+
+ /**
+ * The unit used in the Width, Height and BoundingBox. For images, the unit
+ * is 'pixel'. For PDF, the unit is 'inch'. Possible values include:
+ * 'pixel', 'inch'.
+ */
+ @JsonProperty(value = "unit", required = true)
+ private TextRecognitionResultDimensionUnit unit;
+
+ /**
+ * A list of recognized text lines.
+ */
+ @JsonProperty(value = "lines", required = true)
+ private List lines;
+
+ /**
+ * Get the page value.
+ *
+ * @return the page value
+ */
+ public int page() {
+ return this.page;
+ }
+
+ /**
+ * Set the page value.
+ *
+ * @param page the page value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withPage(int page) {
+ this.page = page;
+ return this;
+ }
+
+ /**
+ * Get the language value.
+ *
+ * @return the language value
+ */
+ public String language() {
+ return this.language;
+ }
+
+ /**
+ * Set the language value.
+ *
+ * @param language the language value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withLanguage(String language) {
+ this.language = language;
+ return this;
+ }
+
+ /**
+ * Get the angle value.
+ *
+ * @return the angle value
+ */
+ public double angle() {
+ return this.angle;
+ }
+
+ /**
+ * Set the angle value.
+ *
+ * @param angle the angle value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withAngle(double angle) {
+ this.angle = angle;
+ return this;
+ }
+
+ /**
+ * Get the width value.
+ *
+ * @return the width value
+ */
+ public double width() {
+ return this.width;
+ }
+
+ /**
+ * Set the width value.
+ *
+ * @param width the width value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withWidth(double width) {
+ this.width = width;
+ return this;
+ }
+
+ /**
+ * Get the height value.
+ *
+ * @return the height value
+ */
+ public double height() {
+ return this.height;
+ }
+
+ /**
+ * Set the height value.
+ *
+ * @param height the height value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withHeight(double height) {
+ this.height = height;
+ return this;
+ }
+
+ /**
+ * Get the unit value.
+ *
+ * @return the unit value
+ */
+ public TextRecognitionResultDimensionUnit unit() {
+ return this.unit;
+ }
+
+ /**
+ * Set the unit value.
+ *
+ * @param unit the unit value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withUnit(TextRecognitionResultDimensionUnit unit) {
+ this.unit = unit;
+ return this;
+ }
+
+ /**
+ * Get the lines value.
+ *
+ * @return the lines value
+ */
+ public List lines() {
+ return this.lines;
+ }
+
+ /**
+ * Set the lines value.
+ *
+ * @param lines the lines value to set
+ * @return the ReadResult object itself.
+ */
+ public ReadResult withLines(List lines) {
+ this.lines = lines;
+ return this;
+ }
+
+}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextHeaders.java
deleted file mode 100644
index 1925ac1c1062..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextHeaders.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Defines headers for RecognizeText operation.
- */
-public class RecognizeTextHeaders {
- /**
- * URL to query for status of the operation. The operation ID will expire
- * in 48 hours.
- */
- @JsonProperty(value = "Operation-Location")
- private String operationLocation;
-
- /**
- * Get the operationLocation value.
- *
- * @return the operationLocation value
- */
- public String operationLocation() {
- return this.operationLocation;
- }
-
- /**
- * Set the operationLocation value.
- *
- * @param operationLocation the operationLocation value to set
- * @return the RecognizeTextHeaders object itself.
- */
- public RecognizeTextHeaders withOperationLocation(String operationLocation) {
- this.operationLocation = operationLocation;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextInStreamHeaders.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextInStreamHeaders.java
deleted file mode 100644
index c52814205c9a..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/RecognizeTextInStreamHeaders.java
+++ /dev/null
@@ -1,44 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Defines headers for RecognizeTextInStream operation.
- */
-public class RecognizeTextInStreamHeaders {
- /**
- * URL to query for status of the operation. The operation ID will expire
- * in 48 hours.
- */
- @JsonProperty(value = "Operation-Location")
- private String operationLocation;
-
- /**
- * Get the operationLocation value.
- *
- * @return the operationLocation value
- */
- public String operationLocation() {
- return this.operationLocation;
- }
-
- /**
- * Set the operationLocation value.
- *
- * @param operationLocation the operationLocation value to set
- * @return the RecognizeTextInStreamHeaders object itself.
- */
- public RecognizeTextInStreamHeaders withOperationLocation(String operationLocation) {
- this.operationLocation = operationLocation;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationResult.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationResult.java
deleted file mode 100644
index c4448b35c356..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationResult.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * Result of recognition text operation.
- */
-public class TextOperationResult {
- /**
- * Status of the text operation. Possible values include: 'NotStarted',
- * 'Running', 'Failed', 'Succeeded'.
- */
- @JsonProperty(value = "status")
- private TextOperationStatusCodes status;
-
- /**
- * Text recognition result of the text operation.
- */
- @JsonProperty(value = "recognitionResult")
- private TextRecognitionResult recognitionResult;
-
- /**
- * Get the status value.
- *
- * @return the status value
- */
- public TextOperationStatusCodes status() {
- return this.status;
- }
-
- /**
- * Set the status value.
- *
- * @param status the status value to set
- * @return the TextOperationResult object itself.
- */
- public TextOperationResult withStatus(TextOperationStatusCodes status) {
- this.status = status;
- return this;
- }
-
- /**
- * Get the recognitionResult value.
- *
- * @return the recognitionResult value
- */
- public TextRecognitionResult recognitionResult() {
- return this.recognitionResult;
- }
-
- /**
- * Set the recognitionResult value.
- *
- * @param recognitionResult the recognitionResult value to set
- * @return the TextOperationResult object itself.
- */
- public TextOperationResult withRecognitionResult(TextRecognitionResult recognitionResult) {
- this.recognitionResult = recognitionResult;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationStatusCodes.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationStatusCodes.java
deleted file mode 100644
index 0dd754df317d..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextOperationStatusCodes.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Defines values for TextOperationStatusCodes.
- */
-public enum TextOperationStatusCodes {
- /** Enum value NotStarted. */
- NOT_STARTED("NotStarted"),
-
- /** Enum value Running. */
- RUNNING("Running"),
-
- /** Enum value Failed. */
- FAILED("Failed"),
-
- /** Enum value Succeeded. */
- SUCCEEDED("Succeeded");
-
- /** The actual serialized value for a TextOperationStatusCodes instance. */
- private String value;
-
- TextOperationStatusCodes(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a TextOperationStatusCodes instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed TextOperationStatusCodes object, or null if unable to parse.
- */
- @JsonCreator
- public static TextOperationStatusCodes fromString(String value) {
- TextOperationStatusCodes[] items = TextOperationStatusCodes.values();
- for (TextOperationStatusCodes item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionMode.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionMode.java
deleted file mode 100644
index 8a33c1ee4d69..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionMode.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Defines values for TextRecognitionMode.
- */
-public enum TextRecognitionMode {
- /** Enum value Handwritten. */
- HANDWRITTEN("Handwritten"),
-
- /** Enum value Printed. */
- PRINTED("Printed");
-
- /** The actual serialized value for a TextRecognitionMode instance. */
- private String value;
-
- TextRecognitionMode(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a TextRecognitionMode instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed TextRecognitionMode object, or null if unable to parse.
- */
- @JsonCreator
- public static TextRecognitionMode fromString(String value) {
- TextRecognitionMode[] items = TextRecognitionMode.values();
- for (TextRecognitionMode item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResult.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResult.java
deleted file mode 100644
index ef5d10cb76a3..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResult.java
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import java.util.List;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/**
- * An object representing a recognized text region.
- */
-public class TextRecognitionResult {
- /**
- * The 1-based page number of the recognition result.
- */
- @JsonProperty(value = "page")
- private Integer page;
-
- /**
- * The orientation of the image in degrees in the clockwise direction.
- * Range between [0, 360).
- */
- @JsonProperty(value = "clockwiseOrientation")
- private Double clockwiseOrientation;
-
- /**
- * The width of the image in pixels or the PDF in inches.
- */
- @JsonProperty(value = "width")
- private Double width;
-
- /**
- * The height of the image in pixels or the PDF in inches.
- */
- @JsonProperty(value = "height")
- private Double height;
-
- /**
- * The unit used in the Width, Height and BoundingBox. For images, the unit
- * is 'pixel'. For PDF, the unit is 'inch'. Possible values include:
- * 'pixel', 'inch'.
- */
- @JsonProperty(value = "unit")
- private TextRecognitionResultDimensionUnit unit;
-
- /**
- * A list of recognized text lines.
- */
- @JsonProperty(value = "lines", required = true)
- private List lines;
-
- /**
- * Get the page value.
- *
- * @return the page value
- */
- public Integer page() {
- return this.page;
- }
-
- /**
- * Set the page value.
- *
- * @param page the page value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withPage(Integer page) {
- this.page = page;
- return this;
- }
-
- /**
- * Get the clockwiseOrientation value.
- *
- * @return the clockwiseOrientation value
- */
- public Double clockwiseOrientation() {
- return this.clockwiseOrientation;
- }
-
- /**
- * Set the clockwiseOrientation value.
- *
- * @param clockwiseOrientation the clockwiseOrientation value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withClockwiseOrientation(Double clockwiseOrientation) {
- this.clockwiseOrientation = clockwiseOrientation;
- return this;
- }
-
- /**
- * Get the width value.
- *
- * @return the width value
- */
- public Double width() {
- return this.width;
- }
-
- /**
- * Set the width value.
- *
- * @param width the width value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withWidth(Double width) {
- this.width = width;
- return this;
- }
-
- /**
- * Get the height value.
- *
- * @return the height value
- */
- public Double height() {
- return this.height;
- }
-
- /**
- * Set the height value.
- *
- * @param height the height value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withHeight(Double height) {
- this.height = height;
- return this;
- }
-
- /**
- * Get the unit value.
- *
- * @return the unit value
- */
- public TextRecognitionResultDimensionUnit unit() {
- return this.unit;
- }
-
- /**
- * Set the unit value.
- *
- * @param unit the unit value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withUnit(TextRecognitionResultDimensionUnit unit) {
- this.unit = unit;
- return this;
- }
-
- /**
- * Get the lines value.
- *
- * @return the lines value
- */
- public List lines() {
- return this.lines;
- }
-
- /**
- * Set the lines value.
- *
- * @param lines the lines value to set
- * @return the TextRecognitionResult object itself.
- */
- public TextRecognitionResult withLines(List lines) {
- this.lines = lines;
- return this;
- }
-
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResultConfidenceClass.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResultConfidenceClass.java
deleted file mode 100644
index 890490ec8292..000000000000
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/TextRecognitionResultConfidenceClass.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/**
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Licensed under the MIT License. See License.txt in the project root for
- * license information.
- *
- * Code generated by Microsoft (R) AutoRest Code Generator.
- */
-
-package com.microsoft.azure.cognitiveservices.vision.computervision.models;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/**
- * Defines values for TextRecognitionResultConfidenceClass.
- */
-public enum TextRecognitionResultConfidenceClass {
- /** Enum value High. */
- HIGH("High"),
-
- /** Enum value Low. */
- LOW("Low");
-
- /** The actual serialized value for a TextRecognitionResultConfidenceClass instance. */
- private String value;
-
- TextRecognitionResultConfidenceClass(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a TextRecognitionResultConfidenceClass instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed TextRecognitionResultConfidenceClass object, or null if unable to parse.
- */
- @JsonCreator
- public static TextRecognitionResultConfidenceClass fromString(String value) {
- TextRecognitionResultConfidenceClass[] items = TextRecognitionResultConfidenceClass.values();
- for (TextRecognitionResultConfidenceClass item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Word.java b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Word.java
index 9d4d8ccd36b4..a85b4b50feb4 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Word.java
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/src/main/java/com/microsoft/azure/cognitiveservices/vision/computervision/models/Word.java
@@ -28,10 +28,10 @@ public class Word {
private String text;
/**
- * Qualitative confidence measure. Possible values include: 'High', 'Low'.
+ * Qualitative confidence measure.
*/
- @JsonProperty(value = "confidence")
- private TextRecognitionResultConfidenceClass confidence;
+ @JsonProperty(value = "confidence", required = true)
+ private double confidence;
/**
* Get the boundingBox value.
@@ -78,7 +78,7 @@ public Word withText(String text) {
*
* @return the confidence value
*/
- public TextRecognitionResultConfidenceClass confidence() {
+ public double confidence() {
return this.confidence;
}
@@ -88,7 +88,7 @@ public TextRecognitionResultConfidenceClass confidence() {
* @param confidence the confidence value to set
* @return the Word object itself.
*/
- public Word withConfidence(TextRecognitionResultConfidenceClass confidence) {
+ public Word withConfidence(double confidence) {
this.confidence = confidence;
return this;
}
diff --git a/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml b/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
index bb49e61dc16d..90199df0ff3d 100644
--- a/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-contentmoderator
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
index a2231a399afd..001a4303df7c 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-customimagesearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
index d55567de6603..ca4d910243bc 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-customsearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
index a3c95093f497..497b32800d2c 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-customvision-prediction
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
index cc6b3106acc0..9b7768a37b50 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-customvision-training
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
index 47b803841d93..4e2a45712578 100644
--- a/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-entitysearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml b/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
index c76d540f4f2e..c4b48125406c 100644
--- a/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-faceapi
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
index ef961acb032b..797f5cc93cc6 100644
--- a/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-imagesearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml b/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
index d1c9208c057e..1ac80de0c8a9 100644
--- a/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-luis-authoring
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml b/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
index e559681b9942..41ce2b48521e 100644
--- a/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-luis-runtime
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
index c8d4e12181ef..b555aaf42481 100644
--- a/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-newssearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml b/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
index fc8fea6d5d6a..abefe6dd54e8 100644
--- a/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-qnamaker
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml b/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
index 811991e09c2e..4a86f185efc7 100644
--- a/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
1.1.0-beta.1
azure-cognitiveservices-spellcheck
diff --git a/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml b/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
index 76d75db7bf8c..7a52ce5f3e0f 100644
--- a/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
@@ -11,7 +11,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-textanalytics
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
index f2095a71a717..76fdcaf82bd1 100644
--- a/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-videosearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
index b82907b8eb5a..c839b6df6c1f 100644
--- a/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-visualsearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
index db8edd4797e0..c4b2a074cb3c 100644
--- a/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
@@ -9,7 +9,7 @@
com.azure
azure-data-sdk-parent
1.3.0
- ../../parents/azure-data-sdk-client
+ ../../parents/azure-data-sdk-parent
azure-cognitiveservices-websearch
com.microsoft.azure.cognitiveservices
diff --git a/sdk/compute/mgmt-v2017_03_30/pom.xml b/sdk/compute/mgmt-v2017_03_30/pom.xml
index 21259d629c66..f3adb54ef20f 100644
--- a/sdk/compute/mgmt-v2017_03_30/pom.xml
+++ b/sdk/compute/mgmt-v2017_03_30/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta-2
diff --git a/sdk/compute/mgmt-v2017_09_01/pom.xml b/sdk/compute/mgmt-v2017_09_01/pom.xml
index 6c6c55514d32..512ed7415d5f 100644
--- a/sdk/compute/mgmt-v2017_09_01/pom.xml
+++ b/sdk/compute/mgmt-v2017_09_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta
diff --git a/sdk/compute/mgmt-v2017_12_01/pom.xml b/sdk/compute/mgmt-v2017_12_01/pom.xml
index 4ff37f03a98e..baae466750ce 100644
--- a/sdk/compute/mgmt-v2017_12_01/pom.xml
+++ b/sdk/compute/mgmt-v2017_12_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta-1
diff --git a/sdk/compute/mgmt-v2018_04_01/pom.xml b/sdk/compute/mgmt-v2018_04_01/pom.xml
index 123d2bbce2d4..04828ca27096 100644
--- a/sdk/compute/mgmt-v2018_04_01/pom.xml
+++ b/sdk/compute/mgmt-v2018_04_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta
diff --git a/sdk/compute/mgmt-v2018_09_30/pom.xml b/sdk/compute/mgmt-v2018_09_30/pom.xml
index ffcb82f68aa7..034668b871c5 100644
--- a/sdk/compute/mgmt-v2018_09_30/pom.xml
+++ b/sdk/compute/mgmt-v2018_09_30/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.2.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta
diff --git a/sdk/compute/mgmt-v2019_03_01/pom.xml b/sdk/compute/mgmt-v2019_03_01/pom.xml
index 9ce317f92e2d..96252f44dcbb 100644
--- a/sdk/compute/mgmt-v2019_03_01/pom.xml
+++ b/sdk/compute/mgmt-v2019_03_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.1.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta
diff --git a/sdk/compute/mgmt-v2019_11_01/pom.xml b/sdk/compute/mgmt-v2019_11_01/pom.xml
index e1027fbceeef..cbf550e63f94 100644
--- a/sdk/compute/mgmt-v2019_11_01/pom.xml
+++ b/sdk/compute/mgmt-v2019_11_01/pom.xml
@@ -12,7 +12,7 @@
com.microsoft.azure
azure-arm-parent
1.3.0
- ../../../pom.management.xml
+ ../../parents/azure-arm-parent
azure-mgmt-compute
1.0.0-beta
diff --git a/sdk/compute/mgmt/pom.xml b/sdk/compute/mgmt/pom.xml
index d084f0b2610e..54bfbc172e20 100644
--- a/sdk/compute/mgmt/pom.xml
+++ b/sdk/compute/mgmt/pom.xml
@@ -54,10 +54,6 @@
com.azure
azure-core-management
-
- com.azure
- azure-identity
-
com.azure
azure-mgmt-resources
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClient.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClient.java
new file mode 100644
index 000000000000..473889a72080
--- /dev/null
+++ b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClient.java
@@ -0,0 +1,463 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.management.compute;
+
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.management.AzureEnvironment;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.management.AzureServiceClient;
+import com.azure.management.compute.fluent.AvailabilitySetsClient;
+import com.azure.management.compute.fluent.ContainerServicesClient;
+import com.azure.management.compute.fluent.DedicatedHostGroupsClient;
+import com.azure.management.compute.fluent.DedicatedHostsClient;
+import com.azure.management.compute.fluent.DiskEncryptionSetsClient;
+import com.azure.management.compute.fluent.DisksClient;
+import com.azure.management.compute.fluent.GalleriesClient;
+import com.azure.management.compute.fluent.GalleryApplicationVersionsClient;
+import com.azure.management.compute.fluent.GalleryApplicationsClient;
+import com.azure.management.compute.fluent.GalleryImageVersionsClient;
+import com.azure.management.compute.fluent.GalleryImagesClient;
+import com.azure.management.compute.fluent.ImagesClient;
+import com.azure.management.compute.fluent.LogAnalyticsClient;
+import com.azure.management.compute.fluent.OperationsClient;
+import com.azure.management.compute.fluent.ProximityPlacementGroupsClient;
+import com.azure.management.compute.fluent.ResourceSkusClient;
+import com.azure.management.compute.fluent.SnapshotsClient;
+import com.azure.management.compute.fluent.UsagesClient;
+import com.azure.management.compute.fluent.VirtualMachineExtensionImagesClient;
+import com.azure.management.compute.fluent.VirtualMachineExtensionsClient;
+import com.azure.management.compute.fluent.VirtualMachineImagesClient;
+import com.azure.management.compute.fluent.VirtualMachineRunCommandsClient;
+import com.azure.management.compute.fluent.VirtualMachineScaleSetExtensionsClient;
+import com.azure.management.compute.fluent.VirtualMachineScaleSetRollingUpgradesClient;
+import com.azure.management.compute.fluent.VirtualMachineScaleSetVMsClient;
+import com.azure.management.compute.fluent.VirtualMachineScaleSetsClient;
+import com.azure.management.compute.fluent.VirtualMachineSizesClient;
+import com.azure.management.compute.fluent.VirtualMachinesClient;
+
+/** Initializes a new instance of the ComputeManagementClient type. */
+@ServiceClient(builder = ComputeManagementClientBuilder.class)
+public final class ComputeManagementClient extends AzureServiceClient {
+ private final ClientLogger logger = new ClientLogger(ComputeManagementClient.class);
+
+ /**
+ * Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of
+ * the URI for every service call.
+ */
+ private final String subscriptionId;
+
+ /**
+ * Gets Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms
+ * part of the URI for every service call.
+ *
+ * @return the subscriptionId value.
+ */
+ public String getSubscriptionId() {
+ return this.subscriptionId;
+ }
+
+ /** server parameter. */
+ private final String endpoint;
+
+ /**
+ * Gets server parameter.
+ *
+ * @return the endpoint value.
+ */
+ public String getEndpoint() {
+ return this.endpoint;
+ }
+
+ /** The HTTP pipeline to send requests through. */
+ private final HttpPipeline httpPipeline;
+
+ /**
+ * Gets The HTTP pipeline to send requests through.
+ *
+ * @return the httpPipeline value.
+ */
+ public HttpPipeline getHttpPipeline() {
+ return this.httpPipeline;
+ }
+
+ /** The OperationsClient object to access its operations. */
+ private final OperationsClient operations;
+
+ /**
+ * Gets the OperationsClient object to access its operations.
+ *
+ * @return the OperationsClient object.
+ */
+ public OperationsClient getOperations() {
+ return this.operations;
+ }
+
+ /** The AvailabilitySetsClient object to access its operations. */
+ private final AvailabilitySetsClient availabilitySets;
+
+ /**
+ * Gets the AvailabilitySetsClient object to access its operations.
+ *
+ * @return the AvailabilitySetsClient object.
+ */
+ public AvailabilitySetsClient getAvailabilitySets() {
+ return this.availabilitySets;
+ }
+
+ /** The ProximityPlacementGroupsClient object to access its operations. */
+ private final ProximityPlacementGroupsClient proximityPlacementGroups;
+
+ /**
+ * Gets the ProximityPlacementGroupsClient object to access its operations.
+ *
+ * @return the ProximityPlacementGroupsClient object.
+ */
+ public ProximityPlacementGroupsClient getProximityPlacementGroups() {
+ return this.proximityPlacementGroups;
+ }
+
+ /** The DedicatedHostGroupsClient object to access its operations. */
+ private final DedicatedHostGroupsClient dedicatedHostGroups;
+
+ /**
+ * Gets the DedicatedHostGroupsClient object to access its operations.
+ *
+ * @return the DedicatedHostGroupsClient object.
+ */
+ public DedicatedHostGroupsClient getDedicatedHostGroups() {
+ return this.dedicatedHostGroups;
+ }
+
+ /** The DedicatedHostsClient object to access its operations. */
+ private final DedicatedHostsClient dedicatedHosts;
+
+ /**
+ * Gets the DedicatedHostsClient object to access its operations.
+ *
+ * @return the DedicatedHostsClient object.
+ */
+ public DedicatedHostsClient getDedicatedHosts() {
+ return this.dedicatedHosts;
+ }
+
+ /** The VirtualMachineExtensionImagesClient object to access its operations. */
+ private final VirtualMachineExtensionImagesClient virtualMachineExtensionImages;
+
+ /**
+ * Gets the VirtualMachineExtensionImagesClient object to access its operations.
+ *
+ * @return the VirtualMachineExtensionImagesClient object.
+ */
+ public VirtualMachineExtensionImagesClient getVirtualMachineExtensionImages() {
+ return this.virtualMachineExtensionImages;
+ }
+
+ /** The VirtualMachineExtensionsClient object to access its operations. */
+ private final VirtualMachineExtensionsClient virtualMachineExtensions;
+
+ /**
+ * Gets the VirtualMachineExtensionsClient object to access its operations.
+ *
+ * @return the VirtualMachineExtensionsClient object.
+ */
+ public VirtualMachineExtensionsClient getVirtualMachineExtensions() {
+ return this.virtualMachineExtensions;
+ }
+
+ /** The VirtualMachineImagesClient object to access its operations. */
+ private final VirtualMachineImagesClient virtualMachineImages;
+
+ /**
+ * Gets the VirtualMachineImagesClient object to access its operations.
+ *
+ * @return the VirtualMachineImagesClient object.
+ */
+ public VirtualMachineImagesClient getVirtualMachineImages() {
+ return this.virtualMachineImages;
+ }
+
+ /** The UsagesClient object to access its operations. */
+ private final UsagesClient usages;
+
+ /**
+ * Gets the UsagesClient object to access its operations.
+ *
+ * @return the UsagesClient object.
+ */
+ public UsagesClient getUsages() {
+ return this.usages;
+ }
+
+ /** The VirtualMachinesClient object to access its operations. */
+ private final VirtualMachinesClient virtualMachines;
+
+ /**
+ * Gets the VirtualMachinesClient object to access its operations.
+ *
+ * @return the VirtualMachinesClient object.
+ */
+ public VirtualMachinesClient getVirtualMachines() {
+ return this.virtualMachines;
+ }
+
+ /** The VirtualMachineSizesClient object to access its operations. */
+ private final VirtualMachineSizesClient virtualMachineSizes;
+
+ /**
+ * Gets the VirtualMachineSizesClient object to access its operations.
+ *
+ * @return the VirtualMachineSizesClient object.
+ */
+ public VirtualMachineSizesClient getVirtualMachineSizes() {
+ return this.virtualMachineSizes;
+ }
+
+ /** The ImagesClient object to access its operations. */
+ private final ImagesClient images;
+
+ /**
+ * Gets the ImagesClient object to access its operations.
+ *
+ * @return the ImagesClient object.
+ */
+ public ImagesClient getImages() {
+ return this.images;
+ }
+
+ /** The VirtualMachineScaleSetsClient object to access its operations. */
+ private final VirtualMachineScaleSetsClient virtualMachineScaleSets;
+
+ /**
+ * Gets the VirtualMachineScaleSetsClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetsClient object.
+ */
+ public VirtualMachineScaleSetsClient getVirtualMachineScaleSets() {
+ return this.virtualMachineScaleSets;
+ }
+
+ /** The VirtualMachineScaleSetExtensionsClient object to access its operations. */
+ private final VirtualMachineScaleSetExtensionsClient virtualMachineScaleSetExtensions;
+
+ /**
+ * Gets the VirtualMachineScaleSetExtensionsClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetExtensionsClient object.
+ */
+ public VirtualMachineScaleSetExtensionsClient getVirtualMachineScaleSetExtensions() {
+ return this.virtualMachineScaleSetExtensions;
+ }
+
+ /** The VirtualMachineScaleSetRollingUpgradesClient object to access its operations. */
+ private final VirtualMachineScaleSetRollingUpgradesClient virtualMachineScaleSetRollingUpgrades;
+
+ /**
+ * Gets the VirtualMachineScaleSetRollingUpgradesClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetRollingUpgradesClient object.
+ */
+ public VirtualMachineScaleSetRollingUpgradesClient getVirtualMachineScaleSetRollingUpgrades() {
+ return this.virtualMachineScaleSetRollingUpgrades;
+ }
+
+ /** The VirtualMachineScaleSetVMsClient object to access its operations. */
+ private final VirtualMachineScaleSetVMsClient virtualMachineScaleSetVMs;
+
+ /**
+ * Gets the VirtualMachineScaleSetVMsClient object to access its operations.
+ *
+ * @return the VirtualMachineScaleSetVMsClient object.
+ */
+ public VirtualMachineScaleSetVMsClient getVirtualMachineScaleSetVMs() {
+ return this.virtualMachineScaleSetVMs;
+ }
+
+ /** The LogAnalyticsClient object to access its operations. */
+ private final LogAnalyticsClient logAnalytics;
+
+ /**
+ * Gets the LogAnalyticsClient object to access its operations.
+ *
+ * @return the LogAnalyticsClient object.
+ */
+ public LogAnalyticsClient getLogAnalytics() {
+ return this.logAnalytics;
+ }
+
+ /** The VirtualMachineRunCommandsClient object to access its operations. */
+ private final VirtualMachineRunCommandsClient virtualMachineRunCommands;
+
+ /**
+ * Gets the VirtualMachineRunCommandsClient object to access its operations.
+ *
+ * @return the VirtualMachineRunCommandsClient object.
+ */
+ public VirtualMachineRunCommandsClient getVirtualMachineRunCommands() {
+ return this.virtualMachineRunCommands;
+ }
+
+ /** The ResourceSkusClient object to access its operations. */
+ private final ResourceSkusClient resourceSkus;
+
+ /**
+ * Gets the ResourceSkusClient object to access its operations.
+ *
+ * @return the ResourceSkusClient object.
+ */
+ public ResourceSkusClient getResourceSkus() {
+ return this.resourceSkus;
+ }
+
+ /** The DisksClient object to access its operations. */
+ private final DisksClient disks;
+
+ /**
+ * Gets the DisksClient object to access its operations.
+ *
+ * @return the DisksClient object.
+ */
+ public DisksClient getDisks() {
+ return this.disks;
+ }
+
+ /** The SnapshotsClient object to access its operations. */
+ private final SnapshotsClient snapshots;
+
+ /**
+ * Gets the SnapshotsClient object to access its operations.
+ *
+ * @return the SnapshotsClient object.
+ */
+ public SnapshotsClient getSnapshots() {
+ return this.snapshots;
+ }
+
+ /** The DiskEncryptionSetsClient object to access its operations. */
+ private final DiskEncryptionSetsClient diskEncryptionSets;
+
+ /**
+ * Gets the DiskEncryptionSetsClient object to access its operations.
+ *
+ * @return the DiskEncryptionSetsClient object.
+ */
+ public DiskEncryptionSetsClient getDiskEncryptionSets() {
+ return this.diskEncryptionSets;
+ }
+
+ /** The GalleriesClient object to access its operations. */
+ private final GalleriesClient galleries;
+
+ /**
+ * Gets the GalleriesClient object to access its operations.
+ *
+ * @return the GalleriesClient object.
+ */
+ public GalleriesClient getGalleries() {
+ return this.galleries;
+ }
+
+ /** The GalleryImagesClient object to access its operations. */
+ private final GalleryImagesClient galleryImages;
+
+ /**
+ * Gets the GalleryImagesClient object to access its operations.
+ *
+ * @return the GalleryImagesClient object.
+ */
+ public GalleryImagesClient getGalleryImages() {
+ return this.galleryImages;
+ }
+
+ /** The GalleryImageVersionsClient object to access its operations. */
+ private final GalleryImageVersionsClient galleryImageVersions;
+
+ /**
+ * Gets the GalleryImageVersionsClient object to access its operations.
+ *
+ * @return the GalleryImageVersionsClient object.
+ */
+ public GalleryImageVersionsClient getGalleryImageVersions() {
+ return this.galleryImageVersions;
+ }
+
+ /** The GalleryApplicationsClient object to access its operations. */
+ private final GalleryApplicationsClient galleryApplications;
+
+ /**
+ * Gets the GalleryApplicationsClient object to access its operations.
+ *
+ * @return the GalleryApplicationsClient object.
+ */
+ public GalleryApplicationsClient getGalleryApplications() {
+ return this.galleryApplications;
+ }
+
+ /** The GalleryApplicationVersionsClient object to access its operations. */
+ private final GalleryApplicationVersionsClient galleryApplicationVersions;
+
+ /**
+ * Gets the GalleryApplicationVersionsClient object to access its operations.
+ *
+ * @return the GalleryApplicationVersionsClient object.
+ */
+ public GalleryApplicationVersionsClient getGalleryApplicationVersions() {
+ return this.galleryApplicationVersions;
+ }
+
+ /** The ContainerServicesClient object to access its operations. */
+ private final ContainerServicesClient containerServices;
+
+ /**
+ * Gets the ContainerServicesClient object to access its operations.
+ *
+ * @return the ContainerServicesClient object.
+ */
+ public ContainerServicesClient getContainerServices() {
+ return this.containerServices;
+ }
+
+ /**
+ * Initializes an instance of ComputeManagementClient client.
+ *
+ * @param httpPipeline The HTTP pipeline to send requests through.
+ * @param environment The Azure environment.
+ */
+ ComputeManagementClient(
+ HttpPipeline httpPipeline, AzureEnvironment environment, String subscriptionId, String endpoint) {
+ super(httpPipeline, environment);
+ this.httpPipeline = httpPipeline;
+ this.subscriptionId = subscriptionId;
+ this.endpoint = endpoint;
+ this.operations = new OperationsClient(this);
+ this.availabilitySets = new AvailabilitySetsClient(this);
+ this.proximityPlacementGroups = new ProximityPlacementGroupsClient(this);
+ this.dedicatedHostGroups = new DedicatedHostGroupsClient(this);
+ this.dedicatedHosts = new DedicatedHostsClient(this);
+ this.virtualMachineExtensionImages = new VirtualMachineExtensionImagesClient(this);
+ this.virtualMachineExtensions = new VirtualMachineExtensionsClient(this);
+ this.virtualMachineImages = new VirtualMachineImagesClient(this);
+ this.usages = new UsagesClient(this);
+ this.virtualMachines = new VirtualMachinesClient(this);
+ this.virtualMachineSizes = new VirtualMachineSizesClient(this);
+ this.images = new ImagesClient(this);
+ this.virtualMachineScaleSets = new VirtualMachineScaleSetsClient(this);
+ this.virtualMachineScaleSetExtensions = new VirtualMachineScaleSetExtensionsClient(this);
+ this.virtualMachineScaleSetRollingUpgrades = new VirtualMachineScaleSetRollingUpgradesClient(this);
+ this.virtualMachineScaleSetVMs = new VirtualMachineScaleSetVMsClient(this);
+ this.logAnalytics = new LogAnalyticsClient(this);
+ this.virtualMachineRunCommands = new VirtualMachineRunCommandsClient(this);
+ this.resourceSkus = new ResourceSkusClient(this);
+ this.disks = new DisksClient(this);
+ this.snapshots = new SnapshotsClient(this);
+ this.diskEncryptionSets = new DiskEncryptionSetsClient(this);
+ this.galleries = new GalleriesClient(this);
+ this.galleryImages = new GalleryImagesClient(this);
+ this.galleryImageVersions = new GalleryImageVersionsClient(this);
+ this.galleryApplications = new GalleryApplicationsClient(this);
+ this.galleryApplicationVersions = new GalleryApplicationVersionsClient(this);
+ this.containerServices = new ContainerServicesClient(this);
+ }
+}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/models/ComputeManagementClientBuilder.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClientBuilder.java
similarity index 77%
rename from sdk/compute/mgmt/src/main/java/com/azure/management/compute/models/ComputeManagementClientBuilder.java
rename to sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClientBuilder.java
index fdd46448cb7f..0c1b97653159 100644
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/models/ComputeManagementClientBuilder.java
+++ b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManagementClientBuilder.java
@@ -2,7 +2,7 @@
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
-package com.azure.management.compute.models;
+package com.azure.management.compute;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.http.HttpPipeline;
@@ -12,8 +12,8 @@
import com.azure.core.http.policy.UserAgentPolicy;
import com.azure.core.management.AzureEnvironment;
-/** A builder for creating a new instance of the ComputeManagementClientImpl type. */
-@ServiceClientBuilder(serviceClients = {ComputeManagementClientImpl.class})
+/** A builder for creating a new instance of the ComputeManagementClient type. */
+@ServiceClientBuilder(serviceClients = {ComputeManagementClient.class})
public final class ComputeManagementClientBuilder {
/*
* Subscription credentials which uniquely identify Microsoft Azure
@@ -37,16 +37,16 @@ public ComputeManagementClientBuilder subscriptionId(String subscriptionId) {
/*
* server parameter
*/
- private String host;
+ private String endpoint;
/**
* Sets server parameter.
*
- * @param host the host value.
+ * @param endpoint the endpoint value.
* @return the ComputeManagementClientBuilder.
*/
- public ComputeManagementClientBuilder host(String host) {
- this.host = host;
+ public ComputeManagementClientBuilder endpoint(String endpoint) {
+ this.endpoint = endpoint;
return this;
}
@@ -83,13 +83,13 @@ public ComputeManagementClientBuilder pipeline(HttpPipeline pipeline) {
}
/**
- * Builds an instance of ComputeManagementClientImpl with the provided parameters.
+ * Builds an instance of ComputeManagementClient with the provided parameters.
*
- * @return an instance of ComputeManagementClientImpl.
+ * @return an instance of ComputeManagementClient.
*/
- public ComputeManagementClientImpl buildClient() {
- if (host == null) {
- this.host = "https://management.azure.com";
+ public ComputeManagementClient buildClient() {
+ if (endpoint == null) {
+ this.endpoint = "https://management.azure.com";
}
if (environment == null) {
this.environment = AzureEnvironment.AZURE;
@@ -100,9 +100,7 @@ public ComputeManagementClientImpl buildClient() {
.policies(new UserAgentPolicy(), new RetryPolicy(), new CookiePolicy())
.build();
}
- ComputeManagementClientImpl client = new ComputeManagementClientImpl(pipeline, environment);
- client.setSubscriptionId(this.subscriptionId);
- client.setHost(this.host);
+ ComputeManagementClient client = new ComputeManagementClient(pipeline, environment, subscriptionId, endpoint);
return client;
}
}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/implementation/ComputeManager.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManager.java
similarity index 77%
rename from sdk/compute/mgmt/src/main/java/com/azure/management/compute/implementation/ComputeManager.java
rename to sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManager.java
index 45d577f67af8..9a579c798ab5 100644
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/implementation/ComputeManager.java
+++ b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ComputeManager.java
@@ -1,25 +1,37 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
-package com.azure.management.compute.implementation;
+package com.azure.management.compute;
import com.azure.core.credential.TokenCredential;
import com.azure.core.http.HttpPipeline;
-import com.azure.management.compute.AvailabilitySets;
-import com.azure.management.compute.ComputeSkus;
-import com.azure.management.compute.ComputeUsages;
-import com.azure.management.compute.Disks;
-import com.azure.management.compute.Galleries;
-import com.azure.management.compute.GalleryImageVersions;
-import com.azure.management.compute.GalleryImages;
-import com.azure.management.compute.Snapshots;
-import com.azure.management.compute.VirtualMachineCustomImages;
-import com.azure.management.compute.VirtualMachineExtensionImages;
-import com.azure.management.compute.VirtualMachineImages;
-import com.azure.management.compute.VirtualMachineScaleSets;
-import com.azure.management.compute.VirtualMachines;
-import com.azure.management.compute.models.ComputeManagementClientBuilder;
-import com.azure.management.compute.models.ComputeManagementClientImpl;
+import com.azure.management.compute.implementation.AvailabilitySetsImpl;
+import com.azure.management.compute.implementation.ComputeSkusImpl;
+import com.azure.management.compute.implementation.ComputeUsagesImpl;
+import com.azure.management.compute.implementation.DisksImpl;
+import com.azure.management.compute.implementation.GalleriesImpl;
+import com.azure.management.compute.implementation.GalleryImageVersionsImpl;
+import com.azure.management.compute.implementation.GalleryImagesImpl;
+import com.azure.management.compute.implementation.SnapshotsImpl;
+import com.azure.management.compute.implementation.VirtualMachineCustomImagesImpl;
+import com.azure.management.compute.implementation.VirtualMachineExtensionImagesImpl;
+import com.azure.management.compute.implementation.VirtualMachineImagesImpl;
+import com.azure.management.compute.implementation.VirtualMachinePublishersImpl;
+import com.azure.management.compute.implementation.VirtualMachineScaleSetsImpl;
+import com.azure.management.compute.implementation.VirtualMachinesImpl;
+import com.azure.management.compute.models.AvailabilitySets;
+import com.azure.management.compute.models.ComputeSkus;
+import com.azure.management.compute.models.ComputeUsages;
+import com.azure.management.compute.models.Disks;
+import com.azure.management.compute.models.Galleries;
+import com.azure.management.compute.models.GalleryImageVersions;
+import com.azure.management.compute.models.GalleryImages;
+import com.azure.management.compute.models.Snapshots;
+import com.azure.management.compute.models.VirtualMachineCustomImages;
+import com.azure.management.compute.models.VirtualMachineExtensionImages;
+import com.azure.management.compute.models.VirtualMachineImages;
+import com.azure.management.compute.models.VirtualMachineScaleSets;
+import com.azure.management.compute.models.VirtualMachines;
import com.azure.management.graphrbac.implementation.GraphRbacManager;
import com.azure.management.network.implementation.NetworkManager;
import com.azure.management.resources.fluentcore.arm.AzureConfigurable;
@@ -28,14 +40,14 @@
import com.azure.management.resources.fluentcore.profile.AzureProfile;
import com.azure.management.resources.fluentcore.utils.HttpPipelineProvider;
import com.azure.management.resources.fluentcore.utils.SdkContext;
-import com.azure.management.storage.implementation.StorageManager;
+import com.azure.management.storage.StorageManager;
/** Entry point to Azure compute resource management. */
-public final class ComputeManager extends Manager {
+public final class ComputeManager extends Manager {
// The service managers
- private StorageManager storageManager;
- private NetworkManager networkManager;
- private GraphRbacManager rbacManager;
+ private final StorageManager storageManager;
+ private final NetworkManager networkManager;
+ private final GraphRbacManager rbacManager;
// The collections
private AvailabilitySets availabilitySets;
@@ -151,9 +163,9 @@ public VirtualMachineImages virtualMachineImages() {
virtualMachineImages =
new VirtualMachineImagesImpl(
new VirtualMachinePublishersImpl(
- super.innerManagementClient.virtualMachineImages(),
- super.innerManagementClient.virtualMachineExtensionImages()),
- super.innerManagementClient.virtualMachineImages());
+ super.innerManagementClient.getVirtualMachineImages(),
+ super.innerManagementClient.getVirtualMachineExtensionImages()),
+ super.innerManagementClient.getVirtualMachineImages());
}
return virtualMachineImages;
}
@@ -164,8 +176,8 @@ public VirtualMachineExtensionImages virtualMachineExtensionImages() {
virtualMachineExtensionImages =
new VirtualMachineExtensionImagesImpl(
new VirtualMachinePublishersImpl(
- super.innerManagementClient.virtualMachineImages(),
- super.innerManagementClient.virtualMachineExtensionImages()));
+ super.innerManagementClient.getVirtualMachineImages(),
+ super.innerManagementClient.getVirtualMachineExtensionImages()));
}
return virtualMachineExtensionImages;
}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDataDiskImage.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDataDiskImage.java
deleted file mode 100644
index 1485c46b6591..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDataDiskImage.java
+++ /dev/null
@@ -1,46 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The GalleryDataDiskImage model. */
-@Immutable
-public final class GalleryDataDiskImage extends GalleryDiskImage {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryDataDiskImage.class);
-
- /*
- * This property specifies the logical unit number of the data disk. This
- * value is used to identify data disks within the Virtual Machine and
- * therefore must be unique for each data disk attached to the Virtual
- * Machine.
- */
- @JsonProperty(value = "lun", access = JsonProperty.Access.WRITE_ONLY)
- private Integer lun;
-
- /**
- * Get the lun property: This property specifies the logical unit number of the data disk. This value is used to
- * identify data disks within the Virtual Machine and therefore must be unique for each data disk attached to the
- * Virtual Machine.
- *
- * @return the lun value.
- */
- public Integer lun() {
- return this.lun;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDiskImage.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDiskImage.java
deleted file mode 100644
index f5a0254dd911..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryDiskImage.java
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The GalleryDiskImage model. */
-@Immutable
-public class GalleryDiskImage {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryDiskImage.class);
-
- /*
- * This property indicates the size of the VHD to be created.
- */
- @JsonProperty(value = "sizeInGB", access = JsonProperty.Access.WRITE_ONLY)
- private Integer sizeInGB;
-
- /*
- * The host caching of the disk. Valid values are 'None', 'ReadOnly', and
- * 'ReadWrite'
- */
- @JsonProperty(value = "hostCaching", access = JsonProperty.Access.WRITE_ONLY)
- private HostCaching hostCaching;
-
- /**
- * Get the sizeInGB property: This property indicates the size of the VHD to be created.
- *
- * @return the sizeInGB value.
- */
- public Integer sizeInGB() {
- return this.sizeInGB;
- }
-
- /**
- * Get the hostCaching property: The host caching of the disk. Valid values are 'None', 'ReadOnly', and 'ReadWrite'.
- *
- * @return the hostCaching value.
- */
- public HostCaching hostCaching() {
- return this.hostCaching;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionPublishingProfile.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionPublishingProfile.java
deleted file mode 100644
index 968424b5bba5..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionPublishingProfile.java
+++ /dev/null
@@ -1,60 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The GalleryImageVersionPublishingProfile model. */
-@Fluent
-public final class GalleryImageVersionPublishingProfile extends GalleryArtifactPublishingProfileBase {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImageVersionPublishingProfile.class);
-
- /*
- * The source image from which the Image Version is going to be created.
- */
- @JsonProperty(value = "source", required = true)
- private GalleryArtifactSource source;
-
- /**
- * Get the source property: The source image from which the Image Version is going to be created.
- *
- * @return the source value.
- */
- public GalleryArtifactSource source() {
- return this.source;
- }
-
- /**
- * Set the source property: The source image from which the Image Version is going to be created.
- *
- * @param source the source value to set.
- * @return the GalleryImageVersionPublishingProfile object itself.
- */
- public GalleryImageVersionPublishingProfile withSource(GalleryArtifactSource source) {
- this.source = source;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- @Override
- public void validate() {
- super.validate();
- if (source() == null) {
- throw logger
- .logExceptionAsError(
- new IllegalArgumentException(
- "Missing required property source in model GalleryImageVersionPublishingProfile"));
- } else {
- source().validate();
- }
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionStorageProfile.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionStorageProfile.java
deleted file mode 100644
index 927cd8944f28..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/GalleryImageVersionStorageProfile.java
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Immutable;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-import java.util.List;
-
-/** The GalleryImageVersionStorageProfile model. */
-@Immutable
-public final class GalleryImageVersionStorageProfile {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(GalleryImageVersionStorageProfile.class);
-
- /*
- * This is the disk image base class.
- */
- @JsonProperty(value = "osDiskImage", access = JsonProperty.Access.WRITE_ONLY)
- private GalleryDiskImage osDiskImage;
-
- /*
- * A list of data disk images.
- */
- @JsonProperty(value = "dataDiskImages", access = JsonProperty.Access.WRITE_ONLY)
- private List dataDiskImages;
-
- /**
- * Get the osDiskImage property: This is the disk image base class.
- *
- * @return the osDiskImage value.
- */
- public GalleryDiskImage osDiskImage() {
- return this.osDiskImage;
- }
-
- /**
- * Get the dataDiskImages property: A list of data disk images.
- *
- * @return the dataDiskImages value.
- */
- public List dataDiskImages() {
- return this.dataDiskImages;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- if (osDiskImage() != null) {
- osDiskImage().validate();
- }
- if (dataDiskImages() != null) {
- dataDiskImages().forEach(e -> e.validate());
- }
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Plan.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Plan.java
deleted file mode 100644
index a4e1ce1bd39e..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Plan.java
+++ /dev/null
@@ -1,131 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The Plan model. */
-@Fluent
-public final class Plan {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(Plan.class);
-
- /*
- * The plan ID.
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * The publisher ID.
- */
- @JsonProperty(value = "publisher")
- private String publisher;
-
- /*
- * Specifies the product of the image from the marketplace. This is the
- * same value as Offer under the imageReference element.
- */
- @JsonProperty(value = "product")
- private String product;
-
- /*
- * The promotion code.
- */
- @JsonProperty(value = "promotionCode")
- private String promotionCode;
-
- /**
- * Get the name property: The plan ID.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The plan ID.
- *
- * @param name the name value to set.
- * @return the Plan object itself.
- */
- public Plan withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the publisher property: The publisher ID.
- *
- * @return the publisher value.
- */
- public String publisher() {
- return this.publisher;
- }
-
- /**
- * Set the publisher property: The publisher ID.
- *
- * @param publisher the publisher value to set.
- * @return the Plan object itself.
- */
- public Plan withPublisher(String publisher) {
- this.publisher = publisher;
- return this;
- }
-
- /**
- * Get the product property: Specifies the product of the image from the marketplace. This is the same value as
- * Offer under the imageReference element.
- *
- * @return the product value.
- */
- public String product() {
- return this.product;
- }
-
- /**
- * Set the product property: Specifies the product of the image from the marketplace. This is the same value as
- * Offer under the imageReference element.
- *
- * @param product the product value to set.
- * @return the Plan object itself.
- */
- public Plan withProduct(String product) {
- this.product = product;
- return this;
- }
-
- /**
- * Get the promotionCode property: The promotion code.
- *
- * @return the promotionCode value.
- */
- public String promotionCode() {
- return this.promotionCode;
- }
-
- /**
- * Set the promotionCode property: The promotion code.
- *
- * @param promotionCode the promotionCode value to set.
- * @return the Plan object itself.
- */
- public Plan withPromotionCode(String promotionCode) {
- this.promotionCode = promotionCode;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ResourceIdentityType.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ResourceIdentityType.java
deleted file mode 100644
index 21488da07c8c..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/ResourceIdentityType.java
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.fasterxml.jackson.annotation.JsonCreator;
-import com.fasterxml.jackson.annotation.JsonValue;
-
-/** Defines values for ResourceIdentityType. */
-public enum ResourceIdentityType {
- /** Enum value SystemAssigned. */
- SYSTEM_ASSIGNED("SystemAssigned"),
-
- /** Enum value UserAssigned. */
- USER_ASSIGNED("UserAssigned"),
-
- /** Enum value SystemAssigned, UserAssigned. */
- SYSTEM_ASSIGNED__USER_ASSIGNED("SystemAssigned, UserAssigned"),
-
- /** Enum value None. */
- NONE("None");
-
- /** The actual serialized value for a ResourceIdentityType instance. */
- private final String value;
-
- ResourceIdentityType(String value) {
- this.value = value;
- }
-
- /**
- * Parses a serialized value to a ResourceIdentityType instance.
- *
- * @param value the serialized value to parse.
- * @return the parsed ResourceIdentityType object, or null if unable to parse.
- */
- @JsonCreator
- public static ResourceIdentityType fromString(String value) {
- ResourceIdentityType[] items = ResourceIdentityType.values();
- for (ResourceIdentityType item : items) {
- if (item.toString().equalsIgnoreCase(value)) {
- return item;
- }
- }
- return null;
- }
-
- @JsonValue
- @Override
- public String toString() {
- return this.value;
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Sku.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Sku.java
deleted file mode 100644
index 826ab540a17e..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/Sku.java
+++ /dev/null
@@ -1,105 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The Sku model. */
-@Fluent
-public final class Sku {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(Sku.class);
-
- /*
- * The sku name.
- */
- @JsonProperty(value = "name")
- private String name;
-
- /*
- * Specifies the tier of virtual machines in a scale set.
- * Possible Values:
**Standard**
**Basic**
- */
- @JsonProperty(value = "tier")
- private String tier;
-
- /*
- * Specifies the number of virtual machines in the scale set.
- */
- @JsonProperty(value = "capacity")
- private Long capacity;
-
- /**
- * Get the name property: The sku name.
- *
- * @return the name value.
- */
- public String name() {
- return this.name;
- }
-
- /**
- * Set the name property: The sku name.
- *
- * @param name the name value to set.
- * @return the Sku object itself.
- */
- public Sku withName(String name) {
- this.name = name;
- return this;
- }
-
- /**
- * Get the tier property: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible
- * Values:<br /><br /> **Standard**<br /><br /> **Basic**.
- *
- * @return the tier value.
- */
- public String tier() {
- return this.tier;
- }
-
- /**
- * Set the tier property: Specifies the tier of virtual machines in a scale set.<br /><br /> Possible
- * Values:<br /><br /> **Standard**<br /><br /> **Basic**.
- *
- * @param tier the tier value to set.
- * @return the Sku object itself.
- */
- public Sku withTier(String tier) {
- this.tier = tier;
- return this;
- }
-
- /**
- * Get the capacity property: Specifies the number of virtual machines in the scale set.
- *
- * @return the capacity value.
- */
- public Long capacity() {
- return this.capacity;
- }
-
- /**
- * Set the capacity property: Specifies the number of virtual machines in the scale set.
- *
- * @param capacity the capacity value to set.
- * @return the Sku object itself.
- */
- public Sku withCapacity(Long capacity) {
- this.capacity = capacity;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/UsageName.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/UsageName.java
deleted file mode 100644
index 0cdc0341f28f..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/UsageName.java
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.management.compute;
-
-import com.azure.core.annotation.Fluent;
-import com.azure.core.util.logging.ClientLogger;
-import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
-
-/** The UsageName model. */
-@Fluent
-public final class UsageName {
- @JsonIgnore private final ClientLogger logger = new ClientLogger(UsageName.class);
-
- /*
- * The name of the resource.
- */
- @JsonProperty(value = "value")
- private String value;
-
- /*
- * The localized name of the resource.
- */
- @JsonProperty(value = "localizedValue")
- private String localizedValue;
-
- /**
- * Get the value property: The name of the resource.
- *
- * @return the value value.
- */
- public String value() {
- return this.value;
- }
-
- /**
- * Set the value property: The name of the resource.
- *
- * @param value the value value to set.
- * @return the UsageName object itself.
- */
- public UsageName withValue(String value) {
- this.value = value;
- return this;
- }
-
- /**
- * Get the localizedValue property: The localized name of the resource.
- *
- * @return the localizedValue value.
- */
- public String localizedValue() {
- return this.localizedValue;
- }
-
- /**
- * Set the localizedValue property: The localized name of the resource.
- *
- * @param localizedValue the localizedValue value to set.
- * @return the UsageName object itself.
- */
- public UsageName withLocalizedValue(String localizedValue) {
- this.localizedValue = localizedValue;
- return this;
- }
-
- /**
- * Validates the instance.
- *
- * @throws IllegalArgumentException thrown if the instance is not valid.
- */
- public void validate() {
- }
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/VirtualMachines.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/VirtualMachines.java
deleted file mode 100644
index aa85ef191916..000000000000
--- a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/VirtualMachines.java
+++ /dev/null
@@ -1,251 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.management.compute;
-
-import com.azure.management.compute.implementation.ComputeManager;
-import com.azure.management.compute.models.VirtualMachinesInner;
-import com.azure.management.resources.fluentcore.arm.collection.SupportsBatchDeletion;
-import com.azure.management.resources.fluentcore.arm.collection.SupportsDeletingByResourceGroup;
-import com.azure.management.resources.fluentcore.arm.collection.SupportsGettingById;
-import com.azure.management.resources.fluentcore.arm.collection.SupportsGettingByResourceGroup;
-import com.azure.management.resources.fluentcore.arm.collection.SupportsListingByResourceGroup;
-import com.azure.management.resources.fluentcore.arm.models.HasManager;
-import com.azure.management.resources.fluentcore.collection.SupportsBatchCreation;
-import com.azure.management.resources.fluentcore.collection.SupportsCreating;
-import com.azure.management.resources.fluentcore.collection.SupportsDeletingById;
-import com.azure.management.resources.fluentcore.collection.SupportsListing;
-import com.azure.management.resources.fluentcore.model.HasInner;
-import java.util.List;
-import reactor.core.publisher.Mono;
-
-/** Entry point to virtual machine management API. */
-public interface VirtualMachines
- extends SupportsListing,
- SupportsListingByResourceGroup,
- SupportsGettingByResourceGroup,
- SupportsGettingById,
- SupportsCreating,
- SupportsDeletingById,
- SupportsDeletingByResourceGroup,
- SupportsBatchCreation,
- SupportsBatchDeletion,
- HasManager,
- HasInner {
-
- /** @return available virtual machine sizes */
- VirtualMachineSizes sizes();
-
- /**
- * Shuts down the virtual machine and releases the compute resources.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void deallocate(String groupName, String name);
-
- /**
- * Shuts down the virtual machine and releases the compute resources asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono deallocateAsync(String groupName, String name);
-
- /**
- * Generalizes the virtual machine.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void generalize(String groupName, String name);
-
- /**
- * Generalizes the virtual machine asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono generalizeAsync(String groupName, String name);
-
- /**
- * Powers off (stops) a virtual machine.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void powerOff(String groupName, String name);
-
- /**
- * Powers off (stops) the virtual machine asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono powerOffAsync(String groupName, String name);
-
- /**
- * Restarts a virtual machine.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void restart(String groupName, String name);
-
- /**
- * Restarts the virtual machine asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono restartAsync(String groupName, String name);
-
- /**
- * Starts a virtual machine.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void start(String groupName, String name);
-
- /**
- * Starts the virtual machine asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono startAsync(String groupName, String name);
-
- /**
- * Redeploys a virtual machine.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- */
- void redeploy(String groupName, String name);
-
- /**
- * Redeploys the virtual machine asynchronously.
- *
- * @param groupName the name of the resource group the virtual machine is in
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono redeployAsync(String groupName, String name);
-
- /**
- * Captures the virtual machine by copying virtual hard disks of the VM and returns template as a JSON string that
- * can be used to create similar VMs.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param containerName destination container name to store the captured VHD
- * @param vhdPrefix the prefix for the VHD holding captured image
- * @param overwriteVhd whether to overwrites destination VHD if it exists
- * @return the template as JSON string
- */
- String capture(String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd);
-
- /**
- * Captures the virtual machine by copying virtual hard disks of the VM asynchronously.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param containerName destination container name to store the captured VHD
- * @param vhdPrefix the prefix for the VHD holding captured image
- * @param overwriteVhd whether to overwrites destination VHD if it exists
- * @return a representation of the deferred computation of this call
- */
- Mono captureAsync(
- String groupName, String name, String containerName, String vhdPrefix, boolean overwriteVhd);
-
- /**
- * Migrates the virtual machine with unmanaged disks to use managed disks.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- */
- void migrateToManaged(String groupName, String name);
-
- /**
- * Converts (migrates) the virtual machine with un-managed disks to use managed disk asynchronously.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @return a representation of the deferred computation of this call
- */
- Mono migrateToManagedAsync(String groupName, String name);
-
- /**
- * Run shell script in a virtual machine.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param scriptLines PowerShell script lines
- * @param scriptParameters script parameters
- * @return result of PowerShell script execution
- */
- RunCommandResult runPowerShellScript(
- String groupName, String name, List scriptLines, List scriptParameters);
-
- /**
- * Run shell script in a virtual machine asynchronously.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param scriptLines PowerShell script lines
- * @param scriptParameters script parameters
- * @return handle to the asynchronous execution
- */
- Mono runPowerShellScriptAsync(
- String groupName, String name, List scriptLines, List scriptParameters);
-
- /**
- * Run shell script in a virtual machine.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param scriptLines shell script lines
- * @param scriptParameters script parameters
- * @return result of shell script execution
- */
- RunCommandResult runShellScript(
- String groupName, String name, List scriptLines, List scriptParameters);
-
- /**
- * Run shell script in a virtual machine asynchronously.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param scriptLines shell script lines
- * @param scriptParameters script parameters
- * @return handle to the asynchronous execution
- */
- Mono runShellScriptAsync(
- String groupName, String name, List scriptLines, List scriptParameters);
-
- /**
- * Run commands in a virtual machine.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param inputCommand command input
- * @return result of execution
- */
- RunCommandResult runCommand(String groupName, String name, RunCommandInput inputCommand);
-
- /**
- * Run commands in a virtual machine asynchronously.
- *
- * @param groupName the resource group name
- * @param name the virtual machine name
- * @param inputCommand command input
- * @return handle to the asynchronous execution
- */
- Mono runCommandAsync(String groupName, String name, RunCommandInput inputCommand);
-}
diff --git a/sdk/compute/mgmt/src/main/java/com/azure/management/compute/fluent/AvailabilitySetsClient.java b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/fluent/AvailabilitySetsClient.java
new file mode 100644
index 000000000000..1c3f94574466
--- /dev/null
+++ b/sdk/compute/mgmt/src/main/java/com/azure/management/compute/fluent/AvailabilitySetsClient.java
@@ -0,0 +1,1561 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.management.compute.fluent;
+
+import com.azure.core.annotation.BodyParam;
+import com.azure.core.annotation.Delete;
+import com.azure.core.annotation.ExpectedResponses;
+import com.azure.core.annotation.Get;
+import com.azure.core.annotation.Headers;
+import com.azure.core.annotation.Host;
+import com.azure.core.annotation.HostParam;
+import com.azure.core.annotation.Patch;
+import com.azure.core.annotation.PathParam;
+import com.azure.core.annotation.Put;
+import com.azure.core.annotation.QueryParam;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceInterface;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.annotation.UnexpectedResponseExceptionType;
+import com.azure.core.http.rest.PagedFlux;
+import com.azure.core.http.rest.PagedIterable;
+import com.azure.core.http.rest.PagedResponse;
+import com.azure.core.http.rest.PagedResponseBase;
+import com.azure.core.http.rest.Response;
+import com.azure.core.http.rest.RestProxy;
+import com.azure.core.management.exception.ManagementException;
+import com.azure.core.util.Context;
+import com.azure.core.util.FluxUtil;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.management.compute.ComputeManagementClient;
+import com.azure.management.compute.fluent.inner.AvailabilitySetInner;
+import com.azure.management.compute.fluent.inner.AvailabilitySetListResultInner;
+import com.azure.management.compute.fluent.inner.VirtualMachineSizeInner;
+import com.azure.management.compute.fluent.inner.VirtualMachineSizeListResultInner;
+import com.azure.management.compute.models.AvailabilitySetUpdate;
+import com.azure.management.resources.fluentcore.collection.InnerSupportsDelete;
+import com.azure.management.resources.fluentcore.collection.InnerSupportsGet;
+import com.azure.management.resources.fluentcore.collection.InnerSupportsListing;
+import reactor.core.publisher.Mono;
+
+/** An instance of this class provides access to all the operations defined in AvailabilitySets. */
+public final class AvailabilitySetsClient
+ implements InnerSupportsGet,
+ InnerSupportsListing,
+ InnerSupportsDelete {
+ private final ClientLogger logger = new ClientLogger(AvailabilitySetsClient.class);
+
+ /** The proxy service used to perform REST calls. */
+ private final AvailabilitySetsService service;
+
+ /** The service client containing this operation class. */
+ private final ComputeManagementClient client;
+
+ /**
+ * Initializes an instance of AvailabilitySetsClient.
+ *
+ * @param client the instance of the service client containing this operation class.
+ */
+ public AvailabilitySetsClient(ComputeManagementClient client) {
+ this.service =
+ RestProxy.create(AvailabilitySetsService.class, client.getHttpPipeline(), client.getSerializerAdapter());
+ this.client = client;
+ }
+
+ /**
+ * The interface defining all the services for ComputeManagementClientAvailabilitySets to be used by the proxy
+ * service to perform REST calls.
+ */
+ @Host("{$host}")
+ @ServiceInterface(name = "ComputeManagementCli")
+ private interface AvailabilitySetsService {
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Put(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets/{availabilitySetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> createOrUpdate(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("availabilitySetName") String availabilitySetName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") AvailabilitySetInner parameters,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Patch(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets/{availabilitySetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> update(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("availabilitySetName") String availabilitySetName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @BodyParam("application/json") AvailabilitySetUpdate parameters,
+ Context context);
+
+ @Headers({"Accept: application/json;q=0.9", "Content-Type: application/json"})
+ @Delete(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets/{availabilitySetName}")
+ @ExpectedResponses({200, 204})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> delete(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("availabilitySetName") String availabilitySetName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets/{availabilitySetName}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> getByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("availabilitySetName") String availabilitySetName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("/subscriptions/{subscriptionId}/providers/Microsoft.Compute/availabilitySets")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> list(
+ @HostParam("$host") String endpoint,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ @QueryParam("$expand") String expand,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listByResourceGroup(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get(
+ "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute"
+ + "/availabilitySets/{availabilitySetName}/vmSizes")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listAvailableSizes(
+ @HostParam("$host") String endpoint,
+ @PathParam("resourceGroupName") String resourceGroupName,
+ @PathParam("availabilitySetName") String availabilitySetName,
+ @QueryParam("api-version") String apiVersion,
+ @PathParam("subscriptionId") String subscriptionId,
+ Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listBySubscriptionNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+
+ @Headers({"Accept: application/json", "Content-Type: application/json"})
+ @Get("{nextLink}")
+ @ExpectedResponses({200})
+ @UnexpectedResponseExceptionType(ManagementException.class)
+ Mono> listNext(
+ @PathParam(value = "nextLink", encoded = true) String nextLink, Context context);
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2019-03-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ parameters,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> createOrUpdateWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2019-03-01";
+ return service
+ .createOrUpdate(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ parameters,
+ context);
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono createOrUpdateAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters, Context context) {
+ return createOrUpdateWithResponseAsync(resourceGroupName, availabilitySetName, parameters, context)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner createOrUpdate(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters) {
+ return createOrUpdateAsync(resourceGroupName, availabilitySetName, parameters).block();
+ }
+
+ /**
+ * Create or update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Virtual machines specified in the same availability set are allocated to different nodes to maximize
+ * availability. For more information about availability sets, see [Manage the availability of virtual
+ * machines](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-manage-availability?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json).
+ * <br><br> For more information on Azure planned maintenance, see [Planned maintenance for virtual
+ * machines in
+ * Azure](https://docs.microsoft.com/azure/virtual-machines/virtual-machines-windows-planned-maintenance?toc=%2fazure%2fvirtual-machines%2fwindows%2ftoc.json)
+ * <br><br> Currently, a VM can only be added to availability set at creation time. An existing VM
+ * cannot be added to an availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner createOrUpdate(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetInner parameters, Context context) {
+ return createOrUpdateAsync(resourceGroupName, availabilitySetName, parameters, context).block();
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> updateWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2019-03-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ parameters,
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> updateWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ if (parameters == null) {
+ return Mono.error(new IllegalArgumentException("Parameter parameters is required and cannot be null."));
+ } else {
+ parameters.validate();
+ }
+ final String apiVersion = "2019-03-01";
+ return service
+ .update(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ parameters,
+ context);
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) {
+ return updateWithResponseAsync(resourceGroupName, availabilitySetName, parameters)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono updateAsync(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters, Context context) {
+ return updateWithResponseAsync(resourceGroupName, availabilitySetName, parameters, context)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner update(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) {
+ return updateAsync(resourceGroupName, availabilitySetName, parameters).block();
+ }
+
+ /**
+ * Update an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param parameters Specifies information about the availability set that the virtual machine should be assigned
+ * to. Only tags may be updated.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner update(
+ String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters, Context context) {
+ return updateAsync(resourceGroupName, availabilitySetName, parameters, context).block();
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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> deleteWithResponseAsync(String resourceGroupName, String availabilitySetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2019-03-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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> deleteWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2019-03-01";
+ return service
+ .delete(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ context);
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 deleteAsync(String resourceGroupName, String availabilitySetName) {
+ return deleteWithResponseAsync(resourceGroupName, availabilitySetName)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 deleteAsync(String resourceGroupName, String availabilitySetName, Context context) {
+ return deleteWithResponseAsync(resourceGroupName, availabilitySetName, context)
+ .flatMap((Response res) -> Mono.empty());
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 delete(String resourceGroupName, String availabilitySetName) {
+ deleteAsync(resourceGroupName, availabilitySetName).block();
+ }
+
+ /**
+ * Delete an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException 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 delete(String resourceGroupName, String availabilitySetName, Context context) {
+ deleteAsync(resourceGroupName, availabilitySetName, context).block();
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String availabilitySetName) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2019-03-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ context))
+ .subscriberContext(context -> context.putAll(FluxUtil.toReactorContext(this.client.getContext())));
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> getByResourceGroupWithResponseAsync(
+ String resourceGroupName, String availabilitySetName, Context context) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (resourceGroupName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."));
+ }
+ if (availabilitySetName == null) {
+ return Mono
+ .error(new IllegalArgumentException("Parameter availabilitySetName is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2019-03-01";
+ return service
+ .getByResourceGroup(
+ this.client.getEndpoint(),
+ resourceGroupName,
+ availabilitySetName,
+ apiVersion,
+ this.client.getSubscriptionId(),
+ context);
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getByResourceGroupAsync(String resourceGroupName, String availabilitySetName) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetName)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono getByResourceGroupAsync(
+ String resourceGroupName, String availabilitySetName, Context context) {
+ return getByResourceGroupWithResponseAsync(resourceGroupName, availabilitySetName, context)
+ .flatMap(
+ (Response res) -> {
+ if (res.getValue() != null) {
+ return Mono.just(res.getValue());
+ } else {
+ return Mono.empty();
+ }
+ });
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner getByResourceGroup(String resourceGroupName, String availabilitySetName) {
+ return getByResourceGroupAsync(resourceGroupName, availabilitySetName).block();
+ }
+
+ /**
+ * Retrieves information about an availability set.
+ *
+ * @param resourceGroupName The name of the resource group.
+ * @param availabilitySetName The name of the availability set.
+ * @param context The context to associate with this operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return specifies information about the availability set that the virtual machine should be assigned to.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public AvailabilitySetInner getByResourceGroup(
+ String resourceGroupName, String availabilitySetName, Context context) {
+ return getByResourceGroupAsync(resourceGroupName, availabilitySetName, context).block();
+ }
+
+ /**
+ * Lists all availability sets in a subscription.
+ *
+ * @param expand The expand expression to apply to the operation.
+ * @throws IllegalArgumentException thrown if parameters fail the validation.
+ * @throws ManagementException thrown if the request is rejected by server.
+ * @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
+ * @return the List Availability Set operation response.
+ */
+ @ServiceMethod(returns = ReturnType.SINGLE)
+ public Mono> listSinglePageAsync(String expand) {
+ if (this.client.getEndpoint() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getEndpoint() is required and cannot be null."));
+ }
+ if (this.client.getSubscriptionId() == null) {
+ return Mono
+ .error(
+ new IllegalArgumentException(
+ "Parameter this.client.getSubscriptionId() is required and cannot be null."));
+ }
+ final String apiVersion = "2019-03-01";
+ return FluxUtil
+ .withContext(
+ context ->
+ service
+ .list(this.client.getEndpoint(), apiVersion, this.client.getSubscriptionId(), expand, context))
+ .